After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 330766 - Incorrectly downloading lugradio podcasts
Incorrectly downloading lugradio podcasts
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: Podcast
0.9.x
Other All
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
: 340463 356604 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-02-11 07:51 UTC by lexual
Modified: 2006-09-18 23:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix local podcast file names in most cases (9.34 KB, patch)
2006-08-02 05:01 UTC, Jonathan Matthew
accepted-commit_now Details | Review
combined patch (11.49 KB, patch)
2006-08-05 02:22 UTC, Jonathan Matthew
committed Details | Review

Description lexual 2006-02-11 07:51:56 UTC
Please describe the problem:
downloading lugradio feeds:
http://lugradio.org/episodes.ogglow.rss 

downloads the episodes as:
lugradio-someepisode.ogg?podcast

running rhythmbox from dapper
version:  0.9.3.1-0ubuntu1

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 James "Doc" Livingston 2006-02-14 09:05:17 UTC
Is the problem that it downloads it as "lugradio-someepisode.ogg?podcast" instead of "lugradio-someepisode.ogg", which means applications that go on the file extension don't see it?

Fixing that will probably require us to think of a good file-naming algorithm. Simply chopping off anything after a "?" won't work too well, since some feeds use episodes like "download.php?episode=4".
Comment 2 lexual 2006-02-14 09:20:09 UTC
https://lists.ubuntu.com/archives/ubuntu-users/2006-February/066931.html

I suppose the main concern is that having a file of the form foo.ogg?podcast is probably going to mess up on a lot of portable digital audio players.
Comment 3 James "Doc" Livingston 2006-02-14 13:35:19 UTC
The only thing I can think of doing would be to append the "right" extension, if it isn't already there. However:

a) figuring out what the "right" extension is, is Very Hard.
b) everything else I've seen (browsers, a few other podcast apps) also download it with that file name - presumably because of (a).


If we wanted to implement this, we would need "deep typefinding" of files 
(telling us that a file is audio/mpeg data wrapped in ID3 tags), and some way of mapping this to a file extension. I don't know if this is easily doable.
Comment 4 Jonathan Matthew 2006-05-02 22:25:56 UTC
*** Bug 340463 has been marked as a duplicate of this bug. ***
Comment 5 Jonathan Matthew 2006-08-02 05:01:56 UTC
Created attachment 70054 [details] [review]
fix local podcast file names in most cases

This uses gnome_vfs_async_get_file_info to figure out the local file name.  This follows redirects, so most of the time we get a useful unique local file name.  

This fixes most cases except the one originally reported in this bug, where the query string isn't used to construct a redirect, but (I'm guessing) just for statistics on the server.  I have a few (hackish) ideas on how we can handle that, but I'd like to get some testing for this before I do anything silly.

It also doesn't handle cases like bug 321991, where the query string contains the complete redirect URL.
Comment 6 James "Doc" Livingston 2006-08-02 06:27:40 UTC
Looks okay to me.
Comment 7 Alex Lancaster 2006-08-02 20:12:45 UTC
Works for me (with the exception that some files like the lugradio podcast files don't remove the "?podcast" because that's still in the resolved filename).
Comment 8 Alex Lancaster 2006-08-02 20:19:23 UTC
Patch #70054 really fixes bug #340463 rather than the actual problem reported in this bug (the extra "?podcast" in the lugradio filenames).
Comment 9 Jonathan Matthew 2006-08-05 02:22:38 UTC
Created attachment 70239 [details] [review]
combined patch

This includes the patch from bug 321991 (it touches the same code and I'm too lazy to keep them apart), and also checks for the query string at the end of the local file name, removing it if it matches the query string from the original url in the feed, so it'll remove '?podcast' from the lugradio episodes.
Comment 10 Alex Lancaster 2006-08-05 09:43:48 UTC
(In reply to comment #9)
> Created an attachment (id=70239) [edit]
> combined patch

Works for me for 302 redirects like:

http://leoville.tv/podcasts/sn.xml

and the original URL reported here, it removes the trailing stuff after the file extension:

http://lugradio.org/episodes.ogglow.rss

and it avoids duplicates for feeds like:

http://feeds.wnyc.org/onthemedia
Comment 11 Alex Lancaster 2006-08-07 18:28:05 UTC
Any reason that this can't be committed now?
Comment 12 Jonathan Matthew 2006-08-08 12:33:27 UTC
committed.
Comment 13 Jonathan Matthew 2006-09-18 23:06:56 UTC
*** Bug 356604 has been marked as a duplicate of this bug. ***