Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Syntax for playlist Group scheme, Album + Date ?. (Read 11409 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Syntax for playlist Group scheme, Album + Date ?.

Reply #25
This is a playlist grouping issue.

in the file tree I use view by folder, and my self compiled music is in folders as such in the file tree,

Various - Rock (Disc 1) < "album" metadata tag is "Rock (Disc 1)" > [year tag varies for each track]
Various - Rock (Disc 2)
Various - Rock (Disc 3)
Various - Rock (Disc 4)
Various - Reggae I      < "album" metadata tag is "Reggae I" > [year tag varies for each track]
Various - Reggae II
Various - Reggae III
etc.....

I also have tons of intact albums in folders as such,

Billy Joel - Glass Houses < "album" metadata tag is "Glass Houses" > [year tag is date of release, so no problems here]
etc....

I want to group by "album" in the playlists as follows

Rock (Disc 1)------------------------------------------------------------------------------------------------------------------
TR 1
TR 2
TR 3
TR 4
TR 5
TR 6
etc......
Rock (Disc 2)-----------------------------------------------------------------------------------------------------------------------------------
TR 1
TR 2
TR 3
TR 4
TR 5
TR 6
etc......
Glass Houses (1991)-------------------------------------------------------------------------------------------------------------------------
TR 1
TR 2
TR 3
TR 4
TR 5
TR 6


I hope that this helps explain what I'm trying to achieve.
More stars in the universe than grains of beach sand

 

Syntax for playlist Group scheme, Album + Date ?.

Reply #26
Is there a definable structure to all of this or not ?

So far we have this:

         For all these types of albums, the following conditions exist:

         This expression always outputs YES:   $if($strstr($lower(%path%),'\various'),'YES','NO')

          $directory_path(%path%)            is constant (all the tracks live in the same parent folder)
                           $meta(album)            is constant, and always contains the string "Various" .
                              $meta(date)           is variable .
                   $meta(album artist)            is  ...I'm not sure !?
                             $meta(artist)           is variable  (obviously the track artist names will be different)
                               $meta(title)           is variable  (obviously the track title names will be different)

Is there anything else to know?
Is it possible for the OP to define the problem again in a lucid way ?
What exactly needs to be done with all these facts ??

* EDIT *
I wasn't aware of the previous post by ~tagtypedisplay while posting this.

The first line: "This is a playlist grouping issue." means "This is a Playlist View grouping display issue AND NOT a Playlist Sort issue" ..OK.

The second line: "in the file tree I use view by folder, and my self compiled music is in folders as such in the file tree," means "In Windows Explorer details view, for these types of albums, my filesystem is like this:" ..OK.

So what happens if you try using this:
Code: [Select]
$if($strstr($lower(%path%),'\various'),
$ifequal($len(%album%),0,'%album%',$if2($trim(%album%),'%album%')),
$ifequal($len(%album%),0,'%album%',$if2($trim(%album%),'%album%'))'  '$ifequal($len(%date%),0,'(%date%)',$if2('('$trim(%date%)')','(%date%)'))
)

Syntax for playlist Group scheme, Album + Date ?.

Reply #27
I assume the structure is then:

Library / Artist 1 / Album 1
                         Album 2
                         Album 3
                         ...
            Artist 2 / Album 1
                         Album 2
                         ...
            Various / Rock
                         Metal
                         Classical
                         ...
            Artist 3 / Album 1
                         Album 2
                         ...
            ...

Therefore all various albums are located at a \Various\ subfolder which can be used as a switch:
$if($stricmp($directory(%path%,2),Various),%album%,%album% '('%date%')')
(note: if you have deeper structure, you might want to play with the number, until $directory(%path%,X) equals 'Various')

If you'd fix your tags, you wouldn't have to organize your library manually by the way (as you could use a syntax to do), so I still don't see the point of using this. Also note that this only handles the grouping part, therefore if your sorting pattern is not properly configured, the various albums will be grouped together, but most likely be sorted by years first instead of tracknumbers.

Syntax for playlist Group scheme, Album + Date ?.

Reply #28
So what happens if you try using this:
Code: [Select]
$if($strstr($lower(%path%),'\various'),
$ifequal($len(%album%),0,'%album%',$if2($trim(%album%),'%album%')),
$ifequal($len(%album%),0,'%album%',$if2($trim(%album%),'%album%'))'  '$ifequal($len(%date%),0,'(%date%)',$if2('('$trim(%date%)')','(%date%)'))
)

Nope, lists all the tracks sequentially without album titles separating the tracks.
More stars in the universe than grains of beach sand

Syntax for playlist Group scheme, Album + Date ?.

Reply #29
"Nope, lists all the tracks sequentially without album titles separating the tracks."

What exactly does that mean?
The tracks are grouping but the Grouping lines are blank, OR the tracks are just in a long flat list and the Grouping lines are not showing?
That is a VERY basic Grouping display scheme; there is no reason for it not to work.
I don't even know if you are using "Default UI" or "Columns UI".
Does the field you are pasting that code into accept multiple lines, or do all the lines need to be joined to one line ...like this:
Code: [Select]
$if($strstr($lower(%path%),'\various'),$ifequal($len(%album%),0,'%album%',$if2($trim(%album%),'%album%')),$ifequal($len(%album%),0,'%album%',$if2($trim(%album%),'%album%'))'  '$ifequal($len(%date%),0,'(%date%)',$if2('('$trim(%date%)')','(%date%)')))

Syntax for playlist Group scheme, Album + Date ?.

Reply #30
I assume the structure is then:

Library / Artist 1 / Album 1
                         Album 2
                         Album 3
                         ...
            Artist 2 / Album 1
   

Not at all

I only use folder view in file tree because my entire collection is in folders in "Artist - Album" format, my self compiled is in "Various - Album" format.

+Artist - Album  < f2k click on the plus sign and the folder opens to display contents, e.g.

Aritst - Album
  Tr1
  Tr2
  Tr3
  etc
More stars in the universe than grains of beach sand

Syntax for playlist Group scheme, Album + Date ?.

Reply #31
OR the tracks are just in a long flat list and the Grouping lines are not showing?

That one

playlist display

tr1
tr2
tr3
tr1 < no group by album title >
tr2
tr3
tr1< no group by album title >
tr2
tr3


More stars in the universe than grains of beach sand

Syntax for playlist Group scheme, Album + Date ?.

Reply #32
I have literally no idea at this point about your folder structure, but guess I'll just go with derty2's method which should work regardless.

$if($strstr($lower(%path%),various),%album%,%album% '('%date%')')

I assume the %date% and %album% field are filled properly, so I don't see the point of using the rest (the patterns if equals true/false).

Syntax for playlist Group scheme, Album + Date ?.

Reply #33
What user interface is the OP using? All my experience is with "Columns UI".

Daeron, I think it is a wiser idea to also add the slash (in red):   $if($strstr($lower(%path%),'\various'),%album%,%album% '('%date%')')

Syntax for playlist Group scheme, Album + Date ?.

Reply #34
Does the field you are pasting that code into accept multiple lines, or do all the lines need to be joined to one line ...like this:
Code: [Select]
$if($strstr($lower(%path%),'\various'),$ifequal($len(%album%),0,'%album%',$if2($trim(%album%),'%album%')),$ifequal($len(%album%),0,'%album%',$if2($trim(%album%),'%album%'))'

One line field.

I pasted the one line version, it now groups by album and year, but a new group is started  for every different year within the same album

I use Columns UI
More stars in the universe than grains of beach sand

Syntax for playlist Group scheme, Album + Date ?.

Reply #35
I have literally no idea at this point about your folder structure, but guess I'll just go with derty2's method which should work regardless.

$if($strstr($lower(%path%),various),%album%,%album% '('%date%')')

I assume the %date% and %album% field are filled properly, so I don't see the point of using the rest (the patterns if equals true/false).

That groups by album and year, but a new group is started for every different year within the same album

All my music is tagged with, artist, album, year
More stars in the universe than grains of beach sand

Syntax for playlist Group scheme, Album + Date ?.

Reply #36
I think it is a wiser idea to also add the slash (in red):   $if($strstr($lower(%path%),'\various'),%album%,%album% '('%date%')')

Indeed it is, I forgot to put there.

@tagtypedisplay: I think a picture would be good from both of your library (in explorer) and the current state of the playlist.

Syntax for playlist Group scheme, Album + Date ?.

Reply #37
What is your sort scheme for the Playlist Viewer (NG Playlist I presume) ?

For every column in: File->Preferences->Display->Columns UI->Playlist view->Columns->Column: Scripts (tab): Sort (tab)

Check "Use custom sort script"

and add this as first (and only) operator: %path_sort%

see what happens (refresh your Playlist Viewer by clicking on a column header).

then maybe you can try this group of operators: %path_sort% %album%

Syntax for playlist Group scheme, Album + Date ?.

Reply #38
I think it is a wiser idea to also add the slash (in red):   $if($strstr($lower(%path%),'\various'),%album%,%album% '('%date%')')

Indeed it is, I forgot to put there.

@tagtypedisplay: I think a picture would be good from both of your library (in explorer) and the current state of the playlist.

Hip Hip Horay, that works exactly as I want for my intact and for my Various albums.

Outstanding.

Now for albums which are soundtracks e.g. "Footloose (OST)" it displays a new group if the soundtrack album has tracks with different years it displays

Footloose (OST) (1996)--------------------------------------------------------
tr1
tr2
tr3
Footloose (OST) (1997)--------------------------------------------------------
tr4
tr5
tr6
Footloose (OST) (1995)------------------------------------------------------
tr7
tr8

Actually I can live with that as the track order is sequential, it's not to bad.

Many thanks for all your help much appreciated.
More stars in the universe than grains of beach sand

Syntax for playlist Group scheme, Album + Date ?.

Reply #39
So your problem is solved, but you also want to extend the grouping scheme to cover more parts of your music library?
I think Daeron deserves special thanks from you for sticking by you all the way to the end ++++

Syntax for playlist Group scheme, Album + Date ?.

Reply #40
Now for albums which are soundtracks e.g. "Footloose (OST)" it displays a new group if the soundtrack album has tracks with different years

Are all of those albums tagged the same way/has similar pathnames? Meaning are the last X characters always '(OST)' or something which we can be used as a second switch?

Syntax for playlist Group scheme, Album + Date ?.

Reply #41
Now for albums which are soundtracks e.g. "Footloose (OST)" it displays a new group if the soundtrack album has tracks with different years

Are all of those albums tagged the same way/has similar pathnames? Meaning are the last X characters always '(OST)' or something which we can be used as a second switch?

Yes all the soundtrack albums are "Movie Name (OST)"

I am truly grateful that you have stuck around to assist.
More stars in the universe than grains of beach sand

Syntax for playlist Group scheme, Album + Date ?.

Reply #42
Something like this should do it: $if($or($strstr($lower(%path%),'\various'),$strstr($lower(%path%),' (ost)')),%album%,%album% '('%date%')')

Alternatively, if you feel like your tags are more consistent than your folder names, you can swap the purple part to use %album% as source.

Syntax for playlist Group scheme, Album + Date ?.

Reply #43
Something like this should do it: $if($or($strstr($lower(%path%),'\various'),$strstr($lower(%path%),' (ost)')),%album%,%album% '('%date%')')

Alternatively, if you feel like your tags are more consistent than your folder names, you can swap the purple part to use %album% as source.

Outstanding.

Thank you for your time, knowledge, and especially your patience.

More stars in the universe than grains of beach sand


Syntax for playlist Group scheme, Album + Date ?.

Reply #45
It seems to me that the fundamental issue if that Foobar doesn't have a native way for displaying Albums whose tracks are tagged with different years.

The most common way of tagging a Album's year field is by release date, the assumption is that all the tracks were released or created in the same year, but what does one do about albums whose tracks were not released in the same year, like Soundtracks, and official compilations where the year that the track was created in is retained irrespective of the albums release date ?.

I guess the answer is to have two year fields, one for the release of the album and another for the creation of the track. I however have no desire to retag my entire collection of music.
It is apparent that most if not all music has as a minimum the following fields, "artist", "year", "album", and "title" tags. this brings me back to my original proposition,

IF "year" is not the same in a album, display the "album" only, else, display "album" and "date".

I think that this should be a native sort string deep within foobars character.
More stars in the universe than grains of beach sand

Syntax for playlist Group scheme, Album + Date ?.

Reply #46
My original playlist group by Album view
[img=http://img338.imageshack.us/img338/6963/f2kbefore.th.png]


( I re-tagged many albums with "Hits" and changed the Album group syntax accordingly to retain the integrity of the track year, now my, "Own Compilations" "Various". and (OST) are grouped correctly within playlist view.

My new playlist group by Album view
[img=http://img571.imageshack.us/img571/2390/f2kafter.th.png]

More stars in the universe than grains of beach sand

Syntax for playlist Group scheme, Album + Date ?.

Reply #47
It's not particularly hard to write a workaround with plain titleformatting, so I don't really feel that this is an urgent thing. You will always have a specific trait (without even introducing a new tag) for VA albums which you can use as a toggle. Also custom tags might be a pain in the ass at the beginning, but they can be extremely useful in the long run. I use a few just to make organizing things easier.

You just have to take your time once to fix all of your tags (and maybe introduce a few custom ones as well) then your library will be much more transparent and easier to handle.

Syntax for playlist Group scheme, Album + Date ?.

Reply #48
   >  'I however have no desire to retag my entire collection of music'

Here are more quotes:

   > 'I have no desire to refer to the foobar2000 title-formatting syntax help file on a regular basis until it all becomes second nature to me'

   > 'I have no desire to refer to the foobar2000 query syntax help file on a regular basis until it all becomes second nature to me'

   > 'I have no desire to free myself from myself'

   > 'I have no desire to discover if the idealised potential of my consumption is a perfect substitution for actual reality'

Syntax for playlist Group scheme, Album + Date ?.

Reply #49
It's not particularly hard to write a workaround with plain titleformatting, so I don't really feel that this is an urgent thing. You will always have a specific trait (without even introducing a new tag) for VA albums which you can use as a toggle. Also custom tags might be a pain in the ass at the beginning, but they can be extremely useful in the long run. I use a few just to make organizing things easier.

You just have to take your time once to fix all of your tags (and maybe introduce a few custom ones as well) then your library will be much more transparent and easier to handle.

I have already rolled up my sleeves, and got stuck into my collection, customising the tags for foobar.

As far as music players are concerned I have previously only dealt with Rockbox's folder view and it became my preferred method for music storage and display, and all that was required to make a great "WPS" was album. artist, title, track, and year. I never used the database view introduced into Rockbox, and then came foobar, lots of real estate, and the playlist view....

Your professionalism in dealing with issues is outstanding.

Thank you for all your help.
More stars in the universe than grains of beach sand