This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#6960 - Random (album) selection in Database
Attached to Project:
Rockbox
Opened by Mark Reiche (Porphyr) - Monday, 02 April 2007, 21:42 GMT+1
Last edited by Steve Bavin (pondlife) - Friday, 21 December 2007, 14:32 GMT+1
Opened by Mark Reiche (Porphyr) - Monday, 02 April 2007, 21:42 GMT+1
Last edited by Steve Bavin (pondlife) - Friday, 21 December 2007, 14:32 GMT+1
|
DetailsHi!
I implemented something because I desparately wanted random album selection. My code simply adds another menu item called "<Random>" to each level of the Database lookup tree, just beneath the "<All tracks>" entry. This entry just randomly selects one of the actual menu entries from below it. (This adds some flexibility to my original request - you now can select music from a random year, a random genre, .... basicly everything) Now I know that the code is not ready for integration into the main source - it should probably be configurable - it definitivly lacks i18n. I don't know who decides which code goes into the main source and which not; if there is interest to integrate this kind of functionality, I am ready to finish the missing stuff to make it ready for integration. However, for me it works for me. I read some similiar requests in the forum - maybe it would help others, too. |
This task depends upon
Closed by Steve Bavin (pondlife)
Friday, 21 December 2007, 14:32 GMT+1
Reason for closing: Accepted
Additional comments about closing: Thanks.
Friday, 21 December 2007, 14:32 GMT+1
Reason for closing: Accepted
Additional comments about closing: Thanks.
As I said the code does almost what I want from it - If someone else wants it: fine - if not: fine, too - I don't really care.
If somebody wants this code - fine! I am ready to continue the work to make it easier to integrate. If nobody wants it on the other hand - I am fine, too.
The next thing I'll probably focus is to make the <Random> option configurable in the tagnavi.config.
Minor update: I need to call srand - otherwise the random selection will be very deterministic...
I also tried to make the <Random> entry configurable in the tagnavi.config. However, after this, my rockbox did not boot :-(
So here is the patch for real random selection (with srand - without the broken config stuff)
Anyway, the next things I am targetting at are:
- Allow to skip the title display at the end of a filter chain (i.e. if I have selected an album, I normally want to start listening with the first track)
- Suppress the <All tracks> item on the first level (does not make much sense without any filters applied)
- Make the <Random> item switchable in the tagnavi.conf
Unfortunately, my experiments most of the time lead to locking up the Rockbox - I still don't have a clue what I did wrong :-(
I have tried building the database several times now, and this results in freezing or glitching when I try to access the Database OR the filetree after initialization.
"My code simply adds another menu item called "<Random>" to each level of the Database lookup tree, just beneath the "<All tracks>" entry."
This is not just random album selection, it allows you to select randomly whatever you like (random year, random genre, random ... anything, and also random album artist). Just try it out!
To porphyr: You mentioned that you tried including the option in tagnavi files; do you mind elaborate on what you did exactly? I'm interested in trying to do this, and it is always nice to know what had been done. I read through tagtree.c a bit and I think I have an idea how to do it.