FS#11678 - Make the playlist catalog use the normal file browser instead of a custom browser with crappy limits

Attached to Project: Rockbox
Opened by Jonathan Gordon (jdgordon) - Thursday, 14 October 2010, 13:29 GMT
Last edited by Teruaki Kawashima (teru) - Wednesday, 15 December 2010, 13:13 GMT
Task Type Bugs
Category Playlists
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.6
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


inspisred by the fact that the playlist cataloge has a file limit

This patch makes the playlist catalog use the normal file browser code to select and display a m3u[8].
The changes to tree.c are a bit hacky.. Ideally the context should be changed, but i think this is a good start. Also dirbrowse() really could use better return value handling.
This task depends upon

Closed by  Teruaki Kawashima (teru)
Wednesday, 15 December 2010, 13:13 GMT
Reason for closing:  Out of Date
Additional comments about closing:  Superseded by  FS#11777 .
Comment by Teruaki Kawashima (teru) - Thursday, 14 October 2010, 15:20 GMT
i tried this, and it doesn't work at all in Main menu -> Playlists -> View Catalog.
in Main menu -> Playlists -> View Catalog:
- it also displayes bookmarks.
- if you simply press left, it just go to above directory instead of returning to Playlist menu.
- it doesn't say "No Playlists" when the playlist directory is empty.
- select playlist -> contexet menu -> add to playlist doesn't work.
- most_recent_playlist is no longer used.
- undefined reference to printf :).
i fixed these except most_recent_playlist thing.
Comment by Jonathan Gordon (jdgordon) - Thursday, 14 October 2010, 23:23 GMT
Thanks. Thinking about it more this morning, this patch is really nothing more than proof-of-concept. It really needs a bit of a dirbrowse()/tree.c rework to do properly.

the most_recent_playlist thing is an interesting one. The quick fix is getting a it from the browsers sort function and only use it when in this catalog browser. Or the proper way makes dirbrowse() *far* more complicated by passing in a sort callback, an action handler callback, and some way to get a better return value than the GO_TO_* values (we really want to know if the user canceled the screen, or exited because they loaded a file)

Or alternativly, we could ignore the sorting problem and just add another playlist catalog menu item, so along side "add to new playlist" and "add to playlist" we can have "add to: <last playlist name>" which would solve that issue and be the same amount of key presses
Comment by Teruaki Kawashima (teru) - Friday, 15 October 2010, 11:19 GMT
as for the most_recent_playlist thing, another option is selecting the last playlist by default when enter the playlist catalog similer to Fonts,WPS, etc. setting menus.
Comment by Jonathan Gordon (jdgordon) - Saturday, 16 October 2010, 09:51 GMT
thats a much better idea than a new menu option :p
I'd almost say commit it but I tihnk it needs to wait till the release happens :/
Comment by Teruaki Kawashima (teru) - Saturday, 27 November 2010, 12:30 GMT
i made some improvements to rockbox_browse()  FS#11777 . how do you think?