Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epsiodes re-posted with identical GUID but new pubDate are not auto-downloaded #6792

Open
4 tasks done
terminalmage opened this issue Dec 4, 2023 · 6 comments · May be fixed by #6793
Open
4 tasks done

Epsiodes re-posted with identical GUID but new pubDate are not auto-downloaded #6792

terminalmage opened this issue Dec 4, 2023 · 6 comments · May be fixed by #6793
Labels
Needs: Decision Proposal and most arguments are clear, but needs a verdict. Type: Possible bug Issues that seem to be a bug, but haven't been confirmed yet

Comments

@terminalmage
Copy link
Contributor

terminalmage commented Dec 4, 2023

Checklist

  • I have used the search function for OPEN issues to see if someone else has already submitted the same bug report.
  • I have also used the search function for CLOSED issues to see if the problem is already solved and just waiting to be released.
  • I will describe the problem with as much detail as possible.
  • If the bug only to occurs with a certain podcast, I will include the URL of that podcast.

App version

3.2.0

Where did you get the app from

Google Play

Android version

14

Device model

Pixel 7

First occurred

I first noticed this a few weeks ago

Steps to reproduce

  1. Subscribe to Das sagt man so. This feed is currently re-posting earlier episodes by doing the following:
    • Removing the original entry from the RSS feed
    • Re-inserting that entry with an updated pubDate, and leaving all other information identical to the original entry
  2. (Optional) Make a database backup (helps with development)
  3. Wait for new episode (feed is updated weekly on Monday mornings)

Expected behaviour

Assuming the following are all true:

  • Automatic download is enabled
  • Feed is included in automatic downloads
  • The episode is not already downloaded

The expectation is that the episode will be downloaded.

Current behaviour

Episode is not downloaded

Logs

No response

@terminalmage terminalmage added the Type: Possible bug Issues that seem to be a bug, but haven't been confirmed yet label Dec 4, 2023
terminalmage added a commit to terminalmage/AntennaPod that referenced this issue Dec 4, 2023
@terminalmage terminalmage linked a pull request Dec 4, 2023 that will close this issue
@terminalmage
Copy link
Contributor Author

I opened #6793 as a first draft at fixing this. However, it is not a complete fix, because it doesn't clean up the existing entry from FeedItems. In version 3.2.0, as well as the current develop branch, the existing entry in FeedItems is updated with the new pubDate when an the same episode is re-posted. But with #6793, this results in a new entry being added to FeedItems. So I think a different approach is necessary, I'm just not certain what it is.

@terminalmage
Copy link
Contributor Author

Current behavior when an episode is re-posted with the same guid, and there is a download already, is again to simply update the pubDate. So perhaps the correct approach is to simply set the episode as new when the pubDate is newer.

@terminalmage
Copy link
Contributor Author

I reverted the initial commit in #6793 and replaced it with a pubDate check in updateFromOther(). This works much nicer, as it updates the existing entry in FeedItems rather than adding a new entry. The only thing I don't like about this fix is that, if the episode is already downloaded, it still gets set to a state of NEW, meaning that it ends up in the Inbox. Normal behavior is to only place new and un-downloaded episodes into the Inbox. So I think that I need to do another check for whether or not that item is downloaded.

If the episode is downloaded to the device, and the pubDate is newer than the current pubDate, then we should either set the state to UNPLAYED, or leave the state as-is.

However, if there is no download for the episode, and it is re-posted with a new pubDate, then it should be set as NEW so that it is treated like any other new episode.

I'm just not sure right now how to determine if there is a local download for the episode.

@ByteHamster
Copy link
Member

Hmm, isn't this intended behavior? If I have already decided what to do with the episode, why do I need to decide again just because the host changes the date?

@terminalmage
Copy link
Contributor Author

terminalmage commented Dec 4, 2023

Well, it seems pretty clear that this is their way of "rebroadcasting" the episode. Most feeds will just make a new post for the episode, so it gets a new guid, etc. But in this case they are removing and re-posting the same episode with a new pubDate. It's not the same thing as a simple update of the pubDate, because the episode now appears at the top of the feed XML instead of its original position.

I think that the expectation is that the episode is included in auto-downloads when it appears at the top of the feed like that.

@keunes keunes added the Needs: Decision Proposal and most arguments are clear, but needs a verdict. label Dec 4, 2023
@terminalmage
Copy link
Contributor Author

Just for a little additional insight... think of the use case where someone subscribes to a podcast, but has no desire to listen to the entire back catalog. So, instead the user marks everything as played. I do this myself, to keep older episodes from showing up in a filtered episode list, when using the Not Played filter. In this case, all the user notices is that there's a new episode, and that it didn't auto-download.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Decision Proposal and most arguments are clear, but needs a verdict. Type: Possible bug Issues that seem to be a bug, but haven't been confirmed yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants