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 560864 - Fix PSP library concept
Fix PSP library concept
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: Removable Media
unspecified
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-11-14 22:17 UTC by Bastien Nocera
Modified: 2016-05-13 21:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rb-psp-library.patch (3.04 KB, patch)
2008-11-14 22:21 UTC, Bastien Nocera
needs-work Details | Review

Description Bastien Nocera 2008-11-14 22:17:35 UTC
The PSP doesn't have a library concept, where all the songs would be, and songs from playlists would be picked from.

Instead it uses folders to create separate playlists, so a tree looking like:
<root>/PSP/MUSIC/
                |_> MY_PLAYLIST/
                |              |_> MY FILE.mp3
                |_> ANOTHER FILE.mp3

would show you a single file in the top-level source, and another one in the single library. Further sub-directories beyond the playlist folder are ignored.

Patch attached is what I have so far, add_playlist_entries needs fixing (right now, it doesn't work as expected, and when it doesn't crash, files are added to both the playlist and the top-level PSP source).

Any ideas?
Comment 1 Bastien Nocera 2008-11-14 22:21:26 UTC
Created attachment 122699 [details] [review]
rb-psp-library.patch

Broken patch.
Comment 2 Jonathan Matthew 2008-11-15 10:26:19 UTC
Looks like a reasonable approach.  I guess if the top-level source is only supposed to show the files in the MUSIC directory, it's going to have to be a static playlist too.

Is there any way to reorder the items in a playlist, or does the PSP just present them in the order they're read from the filesystem?
Comment 3 Bastien Nocera 2008-11-15 11:25:49 UTC
(In reply to comment #2)
> Looks like a reasonable approach.  I guess if the top-level source is only
> supposed to show the files in the MUSIC directory, it's going to have to be a
> static playlist too.

OK, will have to tweak that then. How should I add the files to the playlist though?

> Is there any way to reorder the items in a playlist, or does the PSP just
> present them in the order they're read from the filesystem?

For the top-level directory, there's no way reorder them, they're always ordered in alphabetical order. For the sub-directories, same thing, but you can override the order using a .m3u8 file (eg. "PSP/MUSIC/My directory/My directory.m3u8" will contain the file in the sub-directory, ordered as the user wishes).

Support for that should be added later on.
Comment 4 Jonathan Matthew 2008-11-18 04:47:16 UTC
I don't think there's currently a way to make the top-level source selective about which entries they display, since it's a subclass of RBBrowserSource.

I guess it'd be useful to have a way to provide a base query model to use for the browser, sort of like the current cached_all_query.  Then you'd be able to populate that by scanning the directory.