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

New podcasts overwrite existing files if filenames coincide #48

Closed
lapseofreason opened this issue Oct 23, 2012 · 6 comments
Closed

New podcasts overwrite existing files if filenames coincide #48

lapseofreason opened this issue Oct 23, 2012 · 6 comments
Labels
Type: Confirmed bug Bugs confirmed by a lead developer
Milestone

Comments

@lapseofreason
Copy link

Some feeds give all their audio files the same name (e.g. http://rss.sciam.com/sciam/60-second-earth). This will lead to AntennaPod overwriting the existing audio file when a new episode is downloaded, so basically only one episode can be present at any time.

@danieloeh
Copy link
Member

I have made some changes to how the downloaded files are named and made sure that they are named differently (for example episode-1.mp3 if episode.mp3 already exists) if necessary.So it should work in the next version of the app.

@lapseofreason
Copy link
Author

Thanks a lot, I will do some testing when the next version is out.

@lapseofreason
Copy link
Author

I just tested Antennapod-issue47.apk and it now correctly uses a different name if the name already exists, thanks!

@oaubert
Copy link

oaubert commented Dec 3, 2012

I still have the same issue, using for instance feed http://radiofrance-podcast.net/podcast09/rss_10867.xml : media file enclosures all have the same advertised name, even though they point to different URLs. Antennapod just uses the advertised name and overwrites previous episodes.

Looking at the DownloadRequester.java code, code seems to be in place to avoid this, but could this be a concurrency issue ? This happened during my migration from google listen to antennapod, so I downloaded multiple medias almost at the same time. If a download is enqueued but not started (with a given filename) when a second download of the same stream (different episode, but same filename) is initiated, the " if (dest.exists()) { " test will not succeed, since the first download has just been registered but not started, and this could lead to filename overwriting.

@danieloeh danieloeh reopened this Dec 3, 2012
@oaubert
Copy link

oaubert commented Dec 10, 2012

After further testing, it looks like the bug is indeed closed: I noticed it on 0.9.5.3, and thought to still see it after upgrading to 0.9.6, but in fact I was just confused by some remaining downloads from the previous version. Sorry for the false alert, and thanks for the great app. I am looking forward to finding some time to contribute.

@danieloeh
Copy link
Member

I just tried to reproduce the problem you had and it turns out that you have to enqeue more downloads than the maximum number of parallel downloads (which is 4 at the moment) for this bug to occur. So the problem is that the DownloadRequester isn't checking if any of the pending downloads has been given the same filename as the one which is being requested.

danieloeh added a commit that referenced this issue Dec 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Confirmed bug Bugs confirmed by a lead developer
Projects
None yet
Development

No branches or pull requests

3 participants