[Rhythmbox-devel] Problems with m3u playlists on device



Hi,

I just got a Sansa Clip+ and am trying to use it with Rhythmbox 0.12.5
on Gentoo.  I thought I'd document some troubles I had and ask for
some help on the ones I have left:

1) Device not recognized as portable audio player.  Fixed by adding
the product ID to 10-usb-music-players.fdi.

2) Rhythmbox not creating playlists on device.  This turned out to be
a problem with the setting of the portable_audio_player.playlist_path
property to "%File". This seemed to make Rhythmbox angry to no end.
Setting it to '/' didn't help either.  The only way I was able to fix
this was to remove the property entirely.  Is this really the correct
solution?

3) Once Rhythmbox creates a playlist, it refuses to read it when the
program is restarted or the device is reinserted.  This seems to be an
issue with the rb_generic_player_source_set_supported_formats
function, specifically line 1157 (for me anyways)::

1156			for (i = 0; i < G_N_ELEMENTS (check); i++) {
1157			if (strv_contains (playlist_formats, check[i])) {
1158				totem_pl_parser_add_ignored_mimetype (parser, check[i]);
1159			}
1160		}

It seems to me that there's a missing ! when checking the return from
strv_contains(). The current behavior seems to set the parser to
ignore any playlist_formats that match check.  Adding this ! here
allows Rhythmbox to read the playlist files.  I should note that my
mp3 player has the portable_audio_player.playlist_format property set
to 'audio/x-mpegurl'. I've attached a patch that makes this change.

4) Finally, the problem I can't really solve (short of using external
shell scripts).  The m3u playlists produced by Rhythmbox don't
actually work with my mp3 player.  First, Rhythmbox writes them out as
absolute paths, and my player seems to require relative paths, even
though the playlist files are located at the root of the device.
(Actually, I can't even use this playlist with Totem with the absolute
paths.  Relative paths make it work.)  Second, Rhythmbox writes out
the files with Unix path separators (/) and the mp3 player needs them
to be Windows-style (\).  Lastly, once those changes are made, unless
the playlist file ends with an extra blank line, the last song in the
playlist doesn't show up. So for example this file, as written out by
rhythmbox:

#EXTM3U
#EXTINF:,One
/MUSIC/Shinedown/00 - One.mp3
#EXTINF:,Carried Away
/MUSIC/Shinedown/00 - Carried Away.mp3

Needs to instead be:

#EXTM3U
#EXTINF:,One
MUSIC\Shinedown\00 - One.mp3
#EXTINF:,Carried Away
MUSIC\Shinedown\00 - Carried Away.mp3
<blank line>

I realize this may be a totem-pl-parser issue (or at least where I
need to look), but I wanted to see if anyone had any tips or settings
I'm missing that could help here.

Thanks in advance,

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

Attachment: fix-ignored-playlist-formats.diff
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]