Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Option to display albums in Database by year?
« previous next »
  • Print
Pages: 1 [2] 3

Author Topic: Option to display albums in Database by year?  (Read 19892 times)

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Option to display albums in Database by year?
« Reply #15 on: October 16, 2007, 08:38:09 PM »
I never stated "You can't sort by year, then by Album". You can, and have been able to for quite some time.

I stated that no information is stored about an album.

I even said [quoute]if you do "Year" then "Album" then you'll see all albums from that year, assuming all your songs have the same year marked on any given album.[/quote] which sounds like exactly what you want.

Given that you could always do this, since about the addition of the tagnavi file, I could only reasonably assume that you wanted it to actually care about the year the album was released, rather than simply hijacking the existing Year tag, since your first post said you'd done thorough research on what you wanted and gotten "No" as a result, and an actual Album Year tag is not currently doable, while apparently what you wanted is.

Most of the flexibility of tagnavi is that you can create nearly any hierarchy of tags and use it, and this is pretty well discussed, so when you said you had researched it, I could only really assume that you'd gotten this basic concept and were looking for a more advanced feature.

Anyway, sorry for making assumptions about what you were saying.
« Last Edit: October 16, 2007, 09:13:08 PM by Llorean »
Logged

Offline KindOfBlues71

  • Member
  • *
  • Posts: 44
Re: Option to display albums in Database by year?
« Reply #16 on: October 16, 2007, 09:25:03 PM »
Quote from: Llorean
I never stated "You can't sort by year, then by Album". You can, and have been able to for quite some time.

And I never stated that you did!  Please re-read my post...

Quote
I stated that no information is stored about an album.

Right, metadata is stored in the track - I got it.  I stated several times that I understood.  You said that an album name is a series of letters that several songs have in common, too.  Same goes for artist, right?  And every other tag, right?

Quote
I even said "if you do "Year" then "Album" then you'll see all albums from that year, assuming all your songs have the same year marked on any given album," which sounds like exactly what you want.

No, this is how Rockbox works right now when I select Year.  I've stated many times in this thread that is not what I want to do!  I even posted earlier today exactly what I was wanting to do, sort albums chronologically by year, and even gave an example.  I don't want to sort by one year, two years, ten years, or even a decade.  I want the sorting built-in so that when I click (from Main Menu) Database > Artist > The Beatles, I get the albums listed in chronological order by year.  Again, I don't want to click
Database > Year > 1969 > The Beatles > Abbey Road, nor do I want to click Year > 1969 > Abbey Road.  I want to click Database > Artist > The Beatles and see all the Beatles albums currently in my iPod displayed in chronological order by year.

Quote
Given that you could always do this, since about the addition of the tagnavi file, I could only reasonably assume that you wanted it to actually care about the year the album was released, rather than simply hijacking the existing Year tag, since your first post said you'd done thorough research on what you wanted and gotten "No" as a result, and an actual Album Year tag is not currently doable, while apparently what you wanted is.

In my first post I stated I did a lot of searching for info on sorting albums chronologically by year, for about a week straight.  Many times people simply said no, but without an explanation.  My goal is to find out why and then try and figure out how to make it happen, whether by feature request or by patch.  Since people have posted questions about it there is obviously some interest in this type of sorting.  And I DO want the database to care about the year tag.  I want it to care so damn much that it lists albums in chronological order by year when I select, for example, (from the Main Menu) Database > Artists > The Beatles!

Quote
Most of the flexibility of tagnavi is that you can create nearly any hierarchy of tags and use it, and this is pretty well discussed, so when you said you had researched it, I could only really assume that you'd gotten this basic concept and were looking for a more advanced feature.

So I can create nearly any hierarchy of tags and use it....except to do exactly what I'm wanting it to do: sort albums chronologically by year by clicking (from Main Menu) Database > Artists > The Beatles.

We are obviously not understanding one another and our posts are going in circles.  I've read lots of your posts in other topics and you're an admin for a reason, but you're just not understanding my point I guess.

Btw, I found something in the tagtree.c file that may explain things, guided there from another post about this very same issue.  I'll post about it tomorrow because I'm spent.  We'll continue tomorrow, Llorean.
« Last Edit: October 18, 2007, 09:44:04 AM by KindOfBlues71 »
Logged
“Don't play what's there, play what's not there.” - Miles Davis

Offline safetydan

  • Developer
  • Member
  • *
  • Posts: 248
Re: Option to display albums in Database by year?
« Reply #17 on: October 16, 2007, 09:30:51 PM »
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.
Logged

Offline pixelma

  • Rockbox Expert
  • Member
  • *
  • Posts: 645
Re: Option to display albums in Database by year?
« Reply #18 on: October 17, 2007, 04:26:46 AM »
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
Logged

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: Option to display albums in Database by year?
« Reply #19 on: October 17, 2007, 06:20:40 AM »
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.

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

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

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

4) allow format strings to be used for filters.
pro:
- most flexible
con:
- massive performance overhead

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.

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.

Anyway, just a few thoughts, based on my understanding on how the database works in rockbox - not necessarily a complete list.
Logged

Offline markun

  • Developer
  • Member
  • *
  • Posts: 462
Re: Option to display albums in Database by year?
« Reply #20 on: October 17, 2007, 06:43:28 AM »
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
« Last Edit: October 17, 2007, 06:47:27 AM by markun »
Logged

Offline KindOfBlues71

  • Member
  • *
  • Posts: 44
Re: Option to display albums in Database by year?
« Reply #21 on: October 17, 2007, 01:53:32 PM »
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.

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

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: [Select]
/* 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 };

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
« Last Edit: October 17, 2007, 01:56:35 PM by KindOfBlues71 »
Logged
“Don't play what's there, play what's not there.” - Miles Davis

Offline KindOfBlues71

  • Member
  • *
  • Posts: 44
Re: Option to display albums in Database by year?
« Reply #22 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.

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
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

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

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

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

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.

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.

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]
Logged
“Don't play what's there, play what's not there.” - Miles Davis

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: Option to display albums in Database by year?
« Reply #23 on: October 18, 2007, 08:12:54 PM »
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.

You created the Database wiki, right roolku?  

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.

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.

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
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?

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

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.  

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.

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

By "sort fields" are you referring to the TSOA/TSOP tags?  Why would it almost double the database size requirements?

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

I'm not exactly sure what you mean by this third option.

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.

Please let us know if you do, that would be very cool!

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.

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.

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.


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.
Logged

Offline KindOfBlues71

  • Member
  • *
  • Posts: 44
Re: Option to display albums in Database by year?
« Reply #24 on: October 20, 2007, 09:19:10 AM »
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.

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

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
Logged
“Don't play what's there, play what's not there.” - Miles Davis

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: Option to display albums in Database by year?
« Reply #25 on: October 30, 2007, 10:41:37 AM »
Check out http://www.rockbox.org/tracker/task/8051 to see if it is what you want.
Logged

Offline KindOfBlues71

  • Member
  • *
  • Posts: 44
Re: Option to display albums in Database by year?
« Reply #26 on: October 31, 2007, 09:08:16 AM »
Thanks for working on this roolku!  I put in a request with tdtooke to consider adding it to his custom build.  Unfortunately I don't know how to compile my own custom build yet, so I can't test this myself.

I apologize in advance if the answer is obvious, but does this patch pull the year from the Year tag or the Album Year tag?

Thanks again!
-KindOfBlues71
Logged
“Don't play what's there, play what's not there.” - Miles Davis

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: Option to display albums in Database by year?
« Reply #27 on: October 31, 2007, 09:37:08 AM »
Rockbox doesn't have a concept of album year, so it is the year tag.
Logged

Offline shoe

  • Member
  • *
  • Posts: 97
Re: Option to display albums in Database by year?
« Reply #28 on: November 02, 2007, 02:08:11 AM »
I am compiling this into a build now.  Assuming it works, thanks a million!
Logged

Offline KindOfBlues71

  • Member
  • *
  • Posts: 44
Re: Option to display albums in Database by year?
« Reply #29 on: November 06, 2007, 04:35:36 PM »
@ roolku- Thanks a million for this patch!  tdtooke added it to his Underground custom build and it works great!  

Please don't kill me for asking, but is it possible to hide the year when viewing albums?  I've tried messing with the tagnavi_custom file but can't seem to figure out if this is possible or not.

-KindOfBlues71
Logged
“Don't play what's there, play what's not there.” - Miles Davis

  • Print
Pages: 1 [2] 3
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Option to display albums in Database by year?
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.136 seconds with 21 queries.