Rockbox

Tasklist

FS#9346 - New Feature: Organize your song files into rating folders on the fly!

Attached to Project: Rockbox
Opened by John Zhou (timevision) - Sunday, 31 August 2008, 20:33 GMT
Task Type Patches
Category Playlists
Status Unconfirmed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

This patch adds the ability to organize your music files into different folders, as you listen to them on Rockbox.

Now, not only can you delete songs as you listen to them, you can immediately move the song file to a "3-Star" folder, "4-Star" folder, and "5-Star" folder under the root directory of your Rockbox player.

See attached Screenshots to see it in action.

- This patch has been tested working, in simulation, on Sandisk Sansa e200 targets, as well as all iPod targets.

- This patch has been tested working, physically, on Sandisk Sansa e200 targets, as well as iPod Video 30GB.


======== Main Features ========

1. Automatically create folders called "/favorite_3_star_songs", "/favorite_4_star_songs", and "/favorite_5_star_songs" under the root of your Rockbox player file system, upon first use of the function.

2. When playing a song, press the button to go to the WPS context menu. Below the usual "Delete" button, you will find three new buttons called "Move to 5-Star Folder", "Move to 4-Star Folder", and "Move to 3-Star Folder".

3. Upon pressing these buttons, you will be notified that the current playing song has been moved to the appropriate folders. The music will continue to play, but your file is now physically moved to the rating folders you desire.


Only One File Modified: apps/onplay.c

* Note: The language "Move to 5-Star Folder", etc, and the folder names are hardcoded in the ONPLAY.C at the moment. It can be localized if there is enough interests on this patch. Also, there are no Voice available for these commands, yet.



I would like to see this patch integrated with Rockbox. I believe it provides a very useful feature, and will make Rockbox one step closer to the ultimate music playing/managing machine.


----------------------------------------------------------

Motivation:

I use Rockbox a lot! And I have tons of songs. I actively "steal" music from all my friends' computers, and I need an efficient way to filter the large amount of music files I acquire regularly. Just deleting and categorizing them into playlists are NOT enough.

Now that I forced myself to write this patch, I'm much happier. I hope you will too : )


John.
This task depends upon

Comment by Frank Gevaerts (fg) - Sunday, 31 August 2008, 21:00 GMT
This doesn't handle duplicate filenames at all. This will cause data loss for users
Comment by Paul Louden (Llorean) - Monday, 01 September 2008, 00:38 GMT
Shouldn't sorting songs by rating be handled in the Database? Specifically, if a user wants to see "all 4 star songs" they can just have a database filter for all songs with a rating of four.
Comment by John Zhou (timevision) - Monday, 01 September 2008, 01:38 GMT
Hi all,

Thanks to Frank for pointing out the duplicate filename issue.

I have fixed it now by appending a unique date_time code after the filename before moving it to the rating folders.

Essentially, now say if you are listening to a song located at "/musics/artist1/song1.mp3", after selecting the command to move it to 5-Star folder, it will be located in "/favorite_5_star_songs/song1__080831-212051.mp3". The name will be guaranteed to be unique, thus no data loss can occur.

I know this may not be the most desirable fix, I'm too lazy to create the routine to create the original directory structure recursively. However, I think having a timestamp in the moved file is somewhat useful, it tells you when did you review this song and rated it.

Please use the updated patch provided below, do not use the original patch.

Thanks.


Comment by Paul Louden (Llorean) - Monday, 01 September 2008, 01:42 GMT
You still haven't addressed why this (moving files) is favourable to the already existing database functionality that doesn't require reorganizing of your files on disk at all?

If you think this feature belongs in Rockbox, you need to at least explain why it's the best solution to whatever problem you're trying to address (and possibly what problem you're trying to address that isn't addressed by existing functions).
Comment by John Zhou (timevision) - Monday, 01 September 2008, 01:52 GMT
To answer Llorean's question,

I know it's possible to organize/filter songs through database or saving into playlists, etc.

The only problems are that:

1. If you use database, your song has to be pre-rated on the computer, since I don't see a rate my song option on my Sansa and iPod.

2. Playlists are acceptable, but it's always a bit hassle to insert the current song into a particular playlist. This is now a one-click process.

3. It will be very hard if you want to truly separate the good songs from the bad songs. For example, if you want to burn a CD with the best songs you've listened so far. It will now be possible.


Unlike most people who usually sort their music on computer and listen to a fixed set of songs on the DAP. I throw all my songs in the DAP and filter them as I go.

What I really wanted (for a few years now), is the ability to manipulate my music files directly and easily on the DAP, without the need for a computer.

It is already truly amazing that I can delete, copy, paste, create folders on my DAP, but I believe this will further enhance it.

Thanks again for making the best DAP firmware.

Comment by Paul Louden (Llorean) - Monday, 01 September 2008, 02:03 GMT
Pre-rated on the computer? What did you think the "Set Rating" option in the context menu is for?
Comment by John Zhou (timevision) - Monday, 01 September 2008, 02:14 GMT
Hi Paul,

I've been wondering that too, as you can see from my screenshot on both Sansa and iPod, I don't see a "Set Rating" option when I open the context menu in WPS.

Can you tell me why? Thanks.


Plus, I know this feature may not be useful for everyone, but to me, I really can't rest in peace unless I know the files are physically separated. I don't care if the files are grouped by Artists or Genre, all I want is that when the time comes, I can firmly say, whatever in these folders, are my best songs, and the second best ones, etc.

What really pushed me to write this patch is that, a few weeks ago, I accidentally deleted my 3-star, 4-star, 5-star playlists on the DAP, thus losing several months of filtering effort. It will now take me another few months to listen through all the tens of GBs of music I have on the DAP.
Comment by Paul Louden (Llorean) - Monday, 01 September 2008, 02:18 GMT
Why do they need to be physically separated, beyond the whole "if I want to copy them back off my player" thing? Rockbox is designed toward music playback, not library management.

As to why it shows up, I imagine you haven't enabled "Gather Runtime Data." This should be covered in the manual.

If you'd used the Rockbox feature, you couldn't have deleted the databases. If you'd used your feature and accidentally deleted the folders instead, you'd have lost the music entirely.

You still haven't explained why you think your feature actually belongs in Rockbox (what problem Rockbox has that it addresses, or what specifically it improves upon).

It seems a rather kludgy way to do what the database already does already, and it means your music is no longer sorted in the filetree, so if you're looking for a specific song you have to check both where it should be, and the rating folders, to find it.
Comment by John Zhou (timevision) - Monday, 01 September 2008, 02:46 GMT
Hi Paul,

Guess I never found out that in order to enable the Rating function I have to turn on "Gather Runtime Data" option. I tried it and it works.

As I stated earlier, it's purely my personal preference to have the files physically separated for a more direct categorization. Database is very powerful, but it's not transferable beyond the Rockbox environment.

What if, say, my friends say to me, "I want a copy of all your best music, right now!"? With this patch, you can have music categorized in the easiest accessible format, the folders, and instantly transfer them to another media.

To answer your question, this patch does not fix anything that's broken, it merely presents the users another way to organize their musics easily. I know Rockbox is meant to play music only, but I find this feature very useful. Whether users choose to use Database or this is their choice.

Thanks.

Comment by Paul Louden (Llorean) - Monday, 01 September 2008, 02:48 GMT
Well remember, every new feature adds complexity and size to Rockbox, two things we try to keep minimal.

So you should try to explain, succinctly, how you think this thing makes Rockbox better at doing what it's intended to do if you feel it should be included.
Comment by Tomer Shalev (tomers) - Monday, 01 September 2008, 03:22 GMT
In case MTP was implemented by Rockbox (AFAIK it isn't), you could have implemented your desired folders (4-stars; 5-stars, etc), without physically moving the files, rather by exposing a virtual folder, the list of files contained in each would be populated from the Rockbox database according to rating info.

More info can be found here: http://en.wikipedia.org/wiki/Media_Transfer_Protocol

Note that the MTP protocol is a very controversial protocol (I personally dislike it).
Comment by Paul Louden (Llorean) - Monday, 01 September 2008, 03:24 GMT
Yes, but *this* patch, which is what is under discussion, physically moves your files upon rating. This can, among other things, break the ability of the OF to playback the files on some players, remove them from being usable in the database without rebuilding it, break playlists that already contain these songs, etc.

Which is why I've asked for reasons why the author feels it should be included.
Comment by John Zhou (timevision) - Monday, 01 September 2008, 06:09 GMT
Thanks for all the comments, guys.

Paul, everything you said makes sense. This physical relocation of files will break some functionalities for sure, albeit not any critical ones I think.

I don't think I have the time to make everybody happy if this feature is included. Right now I've done the best I can to meet my own requirement and I'm more than happy already because I can actually add my own features to my DAP.

I just want the people to know that this is possible and has been done, whether to include it or not is entirely up to the approved developers.

Maybe someone can take it and improve it to a more mature status so that it can actually be included.

Thanks.

Comment by Dominik Riebeling (bluebrother) - Monday, 01 September 2008, 20:27 GMT
I don't see a point in this patch. Everything it does can be done easily using the database (including exporting a list of all your starred files), and it adds only complexity. A context menu entry on database searches like "save to playlist ..." would make much more sense. IMO this approach should get rejected.

Quite a lot is possible if you have enough time and can code it up ;-)
Comment by harry tu (bookshare) - Saturday, 06 September 2008, 13:18 GMT
I have a few reasons why this should be included:
1. File Browser: Sometimes the database can be slow with init or update. It would be easier to work with this new feature.

Loading...