GNOME Bugzilla – Bug 560864
Fix PSP library concept
Last modified: 2016-05-13 21:21:47 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?
Created attachment 122699 [details] [review] rb-psp-library.patch Broken patch.
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?
(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.
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.