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 608397 - Rhythmbox does not create working playlists for Sansa Clip+
Rhythmbox does not create working playlists for Sansa Clip+
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: Removable Media
0.12.x
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-29 00:00 UTC by Ryan May
Modified: 2010-02-01 12:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use DOS-mode M3U format for playlists for generic-player (703 bytes, patch)
2010-01-29 00:01 UTC, Ryan May
committed Details | Review
Pass raw URI to totem-pl-parser instead of using rhythmbox to convert URI to relative path (585 bytes, patch)
2010-01-29 00:02 UTC, Ryan May
needs-work Details | Review

Description Ryan May 2010-01-29 00:00:30 UTC
Stock Rhythmbox does not create playlists that work for my Sansa Clip+.  This is due to 3 issues:

1) Device is not initially recognized as an audio player.  This is fixed by adding the proper product ID to the 10-usb-music-players.fdi.  The vendor and product ID are: 0781:74d0. Once I add it, the player is properly recognized, which allows for, among other things, a playlist format of audio/x-mpegurl.

2) The Sansa Clip+ needs DOS-style paths. In generic-player/rb-generic-player-source.c, the totem-pl-parser object is created with a type of: TOTEM_PL_PARSER_M3U. Changing this to TOTEM_PL_PARSER_M3U_DOS makes it start to work.

3) The playlist is not properly constructed in DOS mode with this change. Without my patch, the following playlist would be created in DOS mode:

#EXTM3U
#EXTINF:,Careless Whisper
file:///MUSIC/Seether/Finding%20Beauty%20In%20Negative%20Spaces/13%20-%20Careless%20Whisper.mp3

I've found this is because Rhythmbox basically tries to adjust the URI to be a path relative to the playlist on its own.  However, totem-pl-parser also supports this, and does it properly for DOS mode.  If I change rhythmbox to just pass the raw URI to totem-pl-parser, I get the following *correct* playlist:

#EXTM3U
#EXTINF:,Careless Whisper
MUSIC\Seether\Finding Beauty In Negative Spaces\13 - Careless Whisper.mp3
Comment 1 Ryan May 2010-01-29 00:01:19 UTC
Created attachment 152531 [details] [review]
Use DOS-mode M3U format for playlists for generic-player

Patch to use DOS-mode support for M3U playlists within totem-pl-parser.
Comment 2 Ryan May 2010-01-29 00:02:53 UTC
Created attachment 152532 [details] [review]
Pass raw URI to totem-pl-parser instead of using rhythmbox to convert URI to relative path

This patch causes rhythmbox to use totem-pl-parser's support for converting URI's to paths relative to the playlist, instead of using rhythmbox's function, which breaks with DOS-mode M3U's.
Comment 3 Jonathan Matthew 2010-01-29 11:54:35 UTC
Review of attachment 152532 [details] [review]:

Some playlist formats and devices require absolute paths for the device filesystem, while some require relative paths.  Your patch would not work for the former.  I'm not really sure how to handle this, but I'm not going to break one type to fix the other.
Comment 4 Ryan May 2010-01-29 14:18:52 UTC
A basic gconf key maybe? So at least power users can get their devices to work? Add a configuration window for the generic-player plugin so that users can select between Unix/DOS styles paths and absolute vs. relative?
Comment 5 Jonathan Matthew 2010-01-30 03:49:41 UTC
In general I want to avoid adding things like this because "use relative paths in playlists" isn't a preference, it's either a bug in the playlist writing code or a hole in the device information database.

I think it's safe to assume that M3U playlists on generic player devices need to be in DOS format, and I think relative paths are more likely to work than absolute.  If we find some device that wants unix style or absolute paths, we can add flags to media-player-info to record that.
Comment 6 Jonathan Matthew 2010-01-30 03:58:31 UTC
Comment on attachment 152531 [details] [review]
Use DOS-mode M3U format for playlists for generic-player

pushed as commit f5fdd9b
Comment 7 Jonathan Matthew 2010-01-30 10:24:16 UTC
commit a3ea4460f3ee8e5e749347bec518f046691fd1bf fixes this (by disabling the URI transformation in uri_to_playlist_uri for all formats except iriver .pla) until we find a device that requires absolute or unix-style paths.
Comment 8 Jesse Zhang 2010-02-01 12:43:10 UTC
Hi, after commit a3ea4460f3ee8e5e749347bec518f046691fd1bf there is a compile error,

make[3]: Entering directory `/tmp/rmake/builds/rhythmbox/rhythmbox-master/plugins/generic-player'
  CC     libgeneric_player_la-rb-generic-player-plugin.lo
  CC     libgeneric_player_la-rb-generic-player-source.lo
  CC     libgeneric_player_la-rb-generic-player-playlist-source.lo
rb-generic-player-playlist-source.c: In function 'save_playlist_foreach':
rb-generic-player-playlist-source.c:116: error: 'SavePlaylistData' has no member named 'format'
rb-generic-player-playlist-source.c: In function 'save_playlist':
rb-generic-player-playlist-source.c:255: error: 'playlist' undeclared (first use in this function)
rb-generic-player-playlist-source.c:255: error: (Each undeclared identifier is reported only once
rb-generic-player-playlist-source.c:255: error: for each function it appears in.)
make[3]: *** [libgeneric_player_la-rb-generic-player-playlist-source.lo] Error 1
make[3]: Leaving directory `/tmp/rmake/builds/rhythmbox/rhythmbox-master/plugins/generic-player'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/rmake/builds/rhythmbox/rhythmbox-master/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/rmake/builds/rhythmbox/rhythmbox-master'
make: *** [all] Error 2
Comment 9 Jonathan Matthew 2010-02-01 12:50:40 UTC
thanks, should be fixed now