Rockbox General > Rockbox General Discussion
Option to display albums in Database by year?
markun:
KindOfBlues71: I also would like my albums to be sorted chronologically. I'll put it on my todo and hope to ever get time to seriously look at it.
For now I just use the file browser and put my albums in folders like this:
Amon Tobin:
* [1996] Adventures In Foam
* [1997] Bricolage
* [1998] Permutation
* [2000] Supermodified
* [2002] Out From Out Where
KindOfBlues71:
--- Quote from: safetydan ---This sounds like it comes back to support for sort tags in tagcache. There's a (not working) patch here http://www.rockbox.org/tracker/task/7287 and a really long thread about it here http://forums.rockbox.org/index.php?topic=10689.105
If someone picks up that patch and makes it work it would be awesome since it would let people sort tracks/albums by whatever they want, including year. Assuming they use the TSOA/TSOP tags.
--- End quote ---
I've read thru that post a few times before starting this one, and I agree that this should be implemented. Ultimately it would be great to be able to sort and filter in whatever way you want to! But that will never happen.
--- Quote from: pixelma ---KindOfBlues71, you said you found a bit of information but since you didn't state what exactly, I thought I could post a link to what helped me to understand it back when I played around with a custom tagnavi file (and wanting to achieve the same).
http://forums.rockbox.org/index.php?topic=9570.msg73668#msg73668
--- End quote ---
Sorry about that, I was really tired yesterday and needed to crash. Plus, I only found/read the thread yesterday. It was started by roolku back on 07/2006, but it still applies today: http://forums.rockbox.org/index.php?topic=5420.0
He found that the tagcache.c file states the following:
--- Code: ---/* Uniqued tags (we can use these tags with filters and conditional clauses). */
static const int unique_tags[] = { tag_artist, tag_album, tag_genre, tag_composer };
/* Numeric tags (we can use these tags with conditional clauses). */
static const int numeric_tags[] = { tag_year, tag_tracknumber, tag_length, tag_bitrate,
tag_playcount, tag_playtime, tag_lastplayed, tag_virt_autoscore };
--- End code ---
So that is the WHY I was looking for. I guess my next question would be, can the tagcache.c file be edited to add "tag_year" to the list of Uniqued tags, or is a patch required?
Thanks for the link, I'll read thru it...
-KindOfBlues71
KindOfBlues71:
--- Quote from: roolku ---A FILTER (i.e. a level in the database tree that is not the title level and not a custom menu - see http://www.rockbox.org/twiki/bin/view/Main/RobertKukla?topic=DataBase) currently needs to be a single tag. It is used for splitting and sorting.
--- End quote ---
You created the Database wiki, right roolku? Would you please clarify your reference to the filter definition above? That definition isn't in the database wiki, and I'm not sure if you're saying the Year tag is used as a filter, or should be. The Supported Tags section of the wiki shows that the Year tag can be used as a filter, condition and formatting, and I referenced a thread where you showed that the tagcache.c file clearly states that the Year tag can only be used as a condition.
The wiki has the following:
--- Quote ---[*] is a tag (see below for supported tags)
[*] it will introduce another level in the database tree with entries for all possible values for of the (e.g. all artists)
[*] if there is more than one the selection will be limited by the filter above (e.g. if you pick genre "Rock", you will only find "Rock" artists in the next level)
[*] if necessary there will also be an entry "" for files without an entry for that tag (e.g. no artists entered)
[*] another entry "" will give a shortcut for all the titles selected so far
--- End quote ---
Your definition states "...currently needs to be a single tag" but the third bullet point above states "if there is more than one filter..." If a filter is a tag, how can there be only a single tag when the wiki says there can be more than one filter? Doesn't that mean there can be more than one tag to filter results by?
--- Quote ---So in order to achieve your goal you either:
1) create a single tag that contains the year followed by the album (e.g. abuse the comment field)
pro:
- works now without code modification
con:
- needs to be populated manually
- "uses up" a tag
--- End quote ---
I might try this with my Beatles albums and see how it does. The downside is it's time-consuming if doing this for all my files, plus I'm fairly anal about my jazz collection and sometimes put song/album info in the Comments field. Btw, the manual shows that the Comment tag is unsupported, while the Database wiki shows that it *is* a supported tag.
--- Quote ---2) implement sort fields where you put the year before the album name
pro:
- quite flexible solution
con:
- need to be populated manually
- complex to implement, as there are no provisions for sorting filters; I also see two implementation options: a) hide and use for sorting only b) treat as normal fields, where the latter is significantly easier to implement
- nearly double the size requirements for the database
--- End quote ---
By "sort fields" are you referring to the TSOA/TSOP tags? Why would it almost double the database size requirements?
--- Quote ---3) create a virtual tag that is composed of year and album; a) dynamically and not stored in database b) on update and stored in the database.
pro:
- relatively easy to implement
con:
- 3a) has a performance penalty - need to be tested how severe
--- End quote ---
I'm not exactly sure what you mean by this third option.
--- Quote ---4) allow format strings to be used for filters.
pro:
- most flexible
con:
- massive performance overhead
--- End quote ---
This sounds like what I'm after! I'm not a programmer by any stretch of my imagination so I have no idea what would or wouldn't affect performance, but it figures that the most flexible solution would cause performance issues...
--- Quote ---I favour 3) . While it is only the solution to one particular scenario, it is the one the comes up most often (if not the only one) If I find the time I even might have a go.
--- End quote ---
Please let us know if you do, that would be very cool!
--- Quote ---And no, I don't think we should pick the (year-) tag from a random file to do the sorting - some reasons already given in the thread.
--- End quote ---
Same reason as Llorean or are you referring to sorting tags? I don't get peoples' issues w/ using the Year tag because that tag is already being used to browse by specific Year already. If the Database could look for Artist > Album > Year, in that order, problem solved I'd think.
-KindOfBlues71[/list]
roolku:
--- Quote from: KindOfBlues71 on October 18, 2007, 05:01:35 PM ---
--- Quote from: roolku ---A FILTER (i.e. a level in the database tree that is not the title level and not a custom menu - see http://www.rockbox.org/twiki/bin/view/Main/RobertKukla?topic=DataBase) currently needs to be a single tag. It is used for splitting and sorting.
--- End quote ---
You created the Database wiki, right roolku?
--- End quote ---
No, but I wrote the (initial version of the) syntax section.
--- Quote from: KindOfBlues71 on October 18, 2007, 05:01:35 PM ---Would you please clarify your reference to the filter definition above? That definition isn't in the database wiki, and I'm not sure if you're saying the Year tag is used as a filter, or should be.
--- End quote ---
The year tag can be used as a filter. If done so it will create a menu level listing the years from all titles that passed the previous filter in the chain.
--- Quote from: KindOfBlues71 on October 18, 2007, 05:01:35 PM ---The Supported Tags section of the wiki shows that the Year tag can be used as a filter, condition and formatting, and I referenced a thread where you showed that the tagcache.c file clearly states that the Year tag can only be used as a condition.
--- End quote ---
At the time of writing there was no support for numerical tags to be used as filters at all, only strings. This has meanwhile been implemented.
--- Quote from: KindOfBlues71 on October 18, 2007, 05:01:35 PM ---The wiki has the following:
--- Quote ---[*] is a tag (see below for supported tags)
[*] it will introduce another level in the database tree with entries for all possible values for of the (e.g. all artists)
[*] if there is more than one the selection will be limited by the filter above (e.g. if you pick genre "Rock", you will only find "Rock" artists in the next level)
[*] if necessary there will also be an entry "" for files without an entry for that tag (e.g. no artists entered)
[*] another entry "" will give a shortcut for all the titles selected so far
--- End quote ---
Your definition states "...currently needs to be a single tag" but the third bullet point above states "if there is more than one filter..."
If a filter is a tag, how can there be only a single tag when the wiki says there can be more than one filter? Doesn't that mean there can be more than one tag to filter results by?
--- End quote ---
Yes, every filter is a single tag, but you can have many filters (each being a single tag and introducing a new menu level).
--- Quote from: KindOfBlues71 on October 18, 2007, 05:01:35 PM ---
--- Quote ---So in order to achieve your goal you either:
1) create a single tag that contains the year followed by the album (e.g. abuse the comment field)
pro:
- works now without code modification
con:
- needs to be populated manually
- "uses up" a tag
--- End quote ---
I might try this with my Beatles albums and see how it does. The downside is it's time-consuming if doing this for all my files, plus I'm fairly anal about my jazz collection and sometimes put song/album info in the Comments field.
--- End quote ---
Yes, I agree, it is only a workaround.
--- Quote from: KindOfBlues71 on October 18, 2007, 05:01:35 PM ---Btw, the manual shows that the Comment tag is unsupported, while the Database wiki shows that it *is* a supported tag.
--- End quote ---
The comment tag is supported, I implemented it. It seems, the manual could do with some updating.
--- Quote from: KindOfBlues71 on October 18, 2007, 05:01:35 PM ---
--- Quote ---2) implement sort fields where you put the year before the album name
pro:
- quite flexible solution
con:
- need to be populated manually
- complex to implement, as there are no provisions for sorting filters; I also see two implementation options: a) hide and use for sorting only b) treat as normal fields, where the latter is significantly easier to implement
- nearly double the size requirements for the database
--- End quote ---
By "sort fields" are you referring to the TSOA/TSOP tags? Why would it almost double the database size requirements?
--- End quote ---
Yes, I believe these are the tags used in id3v2 tags - they will be different for different file formats.
Double, because in addition to the display version you would need to store the sort version for every tag. E.g.
"The Artist" and "Artist, The"
--- Quote from: KindOfBlues71 on October 18, 2007, 05:01:35 PM ---
--- Quote ---3) create a virtual tag that is composed of year and album; a) dynamically and not stored in database b) on update and stored in the database.
pro:
- relatively easy to implement
con:
- 3a) has a performance penalty - need to be tested how severe
--- End quote ---
I'm not exactly sure what you mean by this third option.
--- End quote ---
Virtual database tags don't have and equivalent that is part of the audio file, but instead they are "calculated" from such tags. E.g. the minutes and seconds tags are such virtual tags.
--- Quote from: KindOfBlues71 on October 18, 2007, 05:01:35 PM ---
--- Quote ---I favour 3) . While it is only the solution to one particular scenario, it is the one the comes up most often (if not the only one) If I find the time I even might have a go.
--- End quote ---
Please let us know if you do, that would be very cool!
--- End quote ---
It will be on the patch tracker and possibly be committed if there are no objections. But no promises.
--- Quote from: KindOfBlues71 on October 18, 2007, 05:01:35 PM ---
--- Quote ---And no, I don't think we should pick the (year-) tag from a random file to do the sorting - some reasons already given in the thread.
--- End quote ---
Same reason as Llorean or are you referring to sorting tags? I don't get peoples' issues w/ using the Year tag because that tag is already being used to browse by specific Year already.
--- End quote ---
I am referring to the fact that is not guaranteed that tracks with the same album name have the same year.
If you have SQL background, you want something like
SELECT year+album FROM database GROUP BY album;
which doesn't work. You would need
SELECT year+album FROM database GROUP BY year+album;
i.e. a mechanism that combines the year and the album.
--- Quote from: KindOfBlues71 on October 18, 2007, 05:01:35 PM ---
If the Database could look for Artist > Album > Year, in that order, problem solved I'd think.
--- End quote ---
If you mean as a chain of different filters, it can already do that, although it doesn't strike me as very useful as typically all tracks on an album are from the same year.
KindOfBlues71:
--- Quote from: markun ---KindOfBlues71: I also would like my albums to be sorted chronologically. I'll put it on my todo and hope to ever get time to seriously look at it.
--- End quote ---
I'll hope you do as well! Maybe team up with roolku if your idea for implementing this is similar? Two heads, and all that!
--- Quote ---For now I just use the file browser and put my albums in folders like this:
Amon Tobin:
* [1996] Adventures In Foam
* [1997] Bricolage
* [1998] Permutation
* [2000] Supermodified
* [2002] Out From Out Where
--- End quote ---
I know it's faster to turn the database options off and use the file browser, but I rather like using the database features. I still use iTunes to load stuff on my iPod and use the Apple firmware for video podcasts, TV shows and movies.
-KindOfBlues71
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version