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: foo_playlist_tree (Read 713974 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_playlist_tree

Reply #1475
Not sure what I'm doing wrong here

Code: [Select]
$ifgreater($meta_num(%artist%),6,@format<'%<$meta(%artist%,1),$meta(%artist%,2),$meta(%artist%,3),$meta(%artist%,4),$meta(%artist%,5)>%'>,
$select($meta_num(%artist%),%<$meta(%artist%,0)>%'>,
@format<'%<$meta(%artist%,1)>%'>,
@format<'%<$meta(%artist%,1)>%,%<$meta(%artist%,2)>%'>,
@format<'%<$meta(%artist%,1)>%,%<$meta(%artist%,2)>%,%<$meta(%artist%,3)>%'>,
@format<'%<$meta(%artist%,1)>%,%<$meta(%artist%,2)>%,%<$meta(%artist%,3)>%,%<$meta(%artist%,4)>%'>,
@format<'%<$meta(%artist%,1)>%,%<$meta(%artist%,2)>%,%<$meta(%artist%,3)>%,%<$meta(%artist%,4)>%,%<$meta(%artist%,5)>%'>))
|%album%


What I am attempting to do:
* if # artists > 5 then add 1-5 to the list
* if # artists = 1 then add 0 to the list
* if # artists = 2 then add 1 to the list
* if # artists = 3 then add 1-2 to the list
* if # artists = 4 then add 1-3 to the list
* if # artists = 5 then add 1-4 to the list

Query comes out blank. Any I am probably getting the @format wrong. I have NO idea how @format and @quote works. Appreciate any clues.

Thx!

foo_playlist_tree

Reply #1476
it could be something in your queries causing a crazy character to appear. post your pts file, i'll check it out.
Here is what is in my PTS file:
Code: [Select]
(FOLDER "Playlist Tree" 1 :CONTENTS (
(QUERY "Playlists" 0 "@playlists" nil "%artist%|%album%|[$num(%tracknumber%,2) - ]%title%" nil 1 :CONTENTS (
(QUERY "*Browser*" 0 "@playlist<*Browser*>" nil "%artist%|%album%|[$num(%tracknumber%,2) - ]%title%" nil 0)
(QUERY "Default" 0 "@playlist<Default>" nil "%artist%|%album%|[$num(%tracknumber%,2) - ]%title%" nil 0)
))
(FOLDER "Music DB Stats" 1 :CONTENTS (
(QUERY "Total Artists: @format<$ifgreater(%_foldercount%,0,%_foldercount%,%_itemcount%)>" 0 "@database" "%__codec% IS FLAC" "%album artist%|%album%|[$num(%tracknumber%,2) - ]%title%" nil 0)
(QUERY "Total Albums: @format<$ifgreater(%_foldercount%,0,%_foldercount%,%_itemcount%)>" 0 "@database" "%__codec% IS FLAC AND tracknumber IS 1 OR tracknumber IS 01" "%album artist% - %album%|[$num(%tracknumber%,2) - ]%title%" nil 0)
(QUERY "Total Tracks: @format<$ifgreater(%_foldercount%,0,%_foldercount%,%_itemcount%)>" 0 "@database" "%__codec% IS FLAC" "%title%" nil 0)
(QUERY "Total Genres: @format<$ifgreater(%_foldercount%,0,%_foldercount%,%_itemcount%)>" 0 "@database" "%__codec% IS FLAC" "%genre%|%album artist%|%album%|[$num(%tracknumber%,2) - ]%title%" nil 0)
)) (FOLDER "Database Views" 1 :CONTENTS (
(QUERY "True Directory View" 0 "@database" nil "$directory(%_path%,3)|$directory(%_path%,2)|$directory(%_path%,1)|$num(%tracknumber%,2). %title%" nil 0)
(QUERY "Artist by Alphabet" 0 "@database" "%__codec% IS FLAC" "$cut($if($strcmp($left(%album artist%,4),The ),$right(%album artist%,$sub($len(%album artist%),4))', 'The,%album artist%),1)|%artist%|%album%|$num(%tracknumber%,2). %title%" "$cut($if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4))', 'The,%artist%),1)|$if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4))', 'The,%artist%)|'('%date%')' %album%|$num(%tracknumber%,2). %title%" 0)
(QUERY "Artist by Genre" 0 "@database" "%__codec% IS FLAC" "%genre%|%album artist%|'('%date%')' %album%|$num(%tracknumber%,2). %title%" "%genre%|$if($strcmp($left(%album artist%,4),The ),$right(%album artist%,$sub($len(%album artist%),4))', 'The,%album artist%)|'('%date%')' %album%|$num(%tracknumber%,2). %title%" 0)
(QUERY "Artist - Album by Date" 0 "@database" "%__codec% IS FLAC" "%album artist%|'('%date%')' %album%|$num(%tracknumber%,2). %title%" "$if($strcmp($left(%album artist%,4),The ),$right(%album artist%,$sub($len(%album artist%),4))', 'The,%album artist%)|'('%date%')' %album%|$num(%tracknumber%,2). %title%" 0)
(QUERY "Album by Title" 0 "@database" "%__codec% IS FLAC" "$cut(%album%,1)|%album%|$num(%tracknumber%,2). %title%" nil 0)
(QUERY "Album by Year" 0 "@database" "%__codec% IS FLAC" "%date%|%album%|$num(%tracknumber%,2). %title%" nil 0)
(QUERY "Individual Tracks by Codec" 0 "@database" nil "$directory(%_path%,3) 'Singles' '(''@format<%_itemcount%>'')'|$cut(%title%,1)|%title%" nil 0)
)) (FOLDER "Dynamic Playlists" 1 :CONTENTS (
(QUERY "Random Album" 0 "@database" "%__codec% IS FLAC" "%album artist% - %album%|[$num(%tracknumber%,2) - ]%title%" "$rand()" 0 :MAX-FOLDERS 1)
(QUERY "Random Artist" 0 "@database" "%__codec% IS FLAC" "%album artist%|%album%|[$num(%tracknumber%,2) - ]%title%" "$rand()" 0 :MAX-FOLDERS 1)
(QUERY "Random Album by Genre" 0 "@database" "%__codec% IS FLAC" "@limit<1>%genre%|%album artist% - %album%|$num(%tracknumber%,2). %title%" "%genre%|$rand()" 0)
(QUERY "100 Random Singles" 0 "@database" "%__codec% IS FLAC" "%title%" "$rand()" 0 :MAX-TRACKS 100)
(QUERY "10 Random Singles by Genre" 0 "@database" "%__codec" "%album artist%|%album%|[$num(%tracknumber%,2) - ]%title%" nil 0)
(QUERY "Ska-Punk Singles -- @format<%_size_abb%>" 0 "@database" "genre IS punk rock AND %__codec% IS MP3 OR genre IS ska AND %__codec% IS MP3" "%artist% - %title%" "$rand()" 0 :MAX-SIZE 960)
(QUERY "MOD 588 Failed" 0 "@database" "NOT $mod(%_length_samples%,588) IS 0" "%__codec%|%album artist%|'('%date%')' %album%|$num(%tracknumber%,2). %title%" "$if($strcmp($left($if2(%album artist%,%artist%),4),The ),$right($if2(%album artist%,%artist%),$sub($len($if2(%album artist%,%artist%)),4))', 'The,$if2(%album artist%,%artist%))|'('%date%')' %album%|$num(%tracknumber%,2). %title%" 0)
(QUERY "MOD 588 Passed" 0 "@database" "$mod(%_length_samples%,588) IS 0" "%__codec%|%album artist%|'('%date%')' %album%|$num(%tracknumber%,2). %title%" "$if($strcmp($left($if2(%album artist%,%artist%),4),The ),$right($if2(%album artist%,%artist%),$sub($len($if2(%album artist%,%artist%)),4))', 'The,$if2(%album artist%,%artist%))|'('%date%')' %album%|$num(%tracknumber%,2). %title%" 0)
(QUERY "Never Played" 0 "@database" "%__codec% IS FLAC AND play_counter MISSING" "%artist% - %title%" "%artist%|%title%" 0)
(FOLDER "Top 50" 1 :CONTENTS (
(QUERY "Most Played" 0 "@database" "[%play_counter%]" "'('$num(%play_counter%,3)')' %artist% - %title%" "$num(%play_counter%,3)|%artist%|%title%" 0 :REVERSE t :MAX-TRACKS 50)
(QUERY "Last Played" 0 "@database" "[%last_played%]" "%artist% - %title%" "%last_played%|%artist%|%title%" 0 :REVERSE t :MAX-TRACKS 50)
(QUERY "Least Played" 0 "@database" "[%play_counter%]" "%artist% - %title%" "%play_counter%|%artist%|%title%" 0 :MAX-TRACKS 50)
))))))

The above display fine, but if I remove a panel, then put it back, the PTS file is changed to something like this:
Code: [Select]
(FOLDER "Playlist Tree" 1 :CONTENTS (
(QUERY "Playlists" 0 "@playlists" nil "%artist%|%album%|[$num(%tracknumber%,2) - ]%title%" nil 1 :CONTENTS (
(QUERY "*Browser*" 0 "@playlist<*Browser*>" nil "%artist%|%album%|[$num(%tracknumber%,2) - ]%title%" nil 0)
(QUERY "Default" 0 "@playlist<Default>" nil "%artist%|%album%|[$num(%tracknumber%,2) - ]%title%" nil 0)
))
(FOLDER "Music DB Stats" 1 :CONTENTS (
(QUERY "Total Artists: @format<$ifgreater(%_foldercount%,0,%_foldercount%,%_itemcount%)>" 0 "@database" "%__codec% IS FLAC" "%album artist%|%album%|[$num(%tracknumber%,2) - ]%title%" nil 0)
(QUERY "Total Albums: @format<$ifgreater(%_foldercount%,0,%_foldercount%,%_itemcount%)>" 0 "@database" "%__codec% IS FLAC AND tracknumber IS 1 OR tracknumber IS 01" "%album artist% - %album%|[$num(%tracknumber%,2) - ]%title%" nil 0)
(QUERY "Total Tracks: @format<$ifgreater(%_foldercount%,0,%_foldercount%,%_itemcount%)>" 0 "@database" "%__codec% IS FLAC" "%title%" nil 0)
(QUERY "Total Genres: @format<$ifgreater(%_foldercount%,0,%_foldercount%,%_itemcount%)>" 0 "@database" "%__codec% IS FLAC" "%genre%|%album artist%|%album%|[$num(%tracknumber%,2) - ]%title%" nil 0)
)) (FOLDER "Database Views" 1 :CONTENTS (
(QUERY "True Directory View" 0 "@database" nil "$directory(%_path%,3)|$directory(%_path%,2)|$directory(%_path%,1)|$num(%tracknumber%,2). %title%" nil 0)
(QUERY "Artist by Alphabet" 0 "@database" "%__codec% IS FLAC" "$cut($if($strcmp($left(%album artist%,4),The ),$right(%album artist%,$sub($len(%album artist%),4))', 'The,%album artist%),1)|%artist%|%album%|$num(%tracknumber%,2). %title%" "$cut($if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4))', 'The,%artist%),1)|$if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4))', 'The,%artist%)|'('%date%')' %album%|$num(%tracknumber%,2). %title%" 0)
(QUERY "Artist by Genre" 0 "@database" "%__codec% IS FLAC" "%genre%|%album artist%|'('%date%')' %album%|$num(%tracknumber%,2). %title%" "%genre%|$if($strcmp($left(%album artist%,4),The ),$right(%album artist%,$sub($len(%album artist%),4))', 'The,%album artist%)|'('%date%')' %album%|$num(%tracknumber%,2). %title%" 0)
(QUERY "Artist - Album by Date" 0 "@database" "%__codec% IS FLAC" "%album artist%|'('%date%')' %album%|$num(%tracknumber%,2). %title%" "$if($strcmp($left(%album artist%,4),The ),$right(%album artist%,$sub($len(%album artist%),4))', 'The,%album artist%)|'('%date%')' %album%|$num(%tracknumber%,2). %title%" 0)
(QUERY "Album by Title" 0 "@database" "%__codec% IS FLAC" "$cut(%album%,1)|%album%|$num(%tracknumber%,2). %title%" nil 0)
(QUERY "Album by Year" 0 "@database" "%__codec% IS FLAC" "%date%|%album%|$num(%tracknumber%,2). %title%" nil 0)
(QUERY "Individual Tracks by Codec" 0 "@database" nil "$directory(%_path%,3) 'Singles' '(''@format<%_itemcount%>'')'|$cut(%title%,1)|%title%" nil 0)
)) (FOLDER "Dynamic Playlists" 1 :CONTENTS (
(QUERY "Random Album" 0 "@database" "%__codec% IS FLAC" "%album artist% - %album%|[$num(%tracknumber%,2) - ]%title%" "$rand()" 0 :MAX-FOLDERS 1)
(QUERY "Random Artist" 0 "@database" "%__codec% IS FLAC" "%album artist%|%album%|[$num(%tracknumber%,2) - ]%title%" "$rand()" 0 :MAX-FOLDERS 1)
(QUERY "Random Album by Genre" 0 "@database" "%__codec% IS FLAC" "@limit<1>%genre%|%album artist% - %album%|$num(%tracknumber%,2). %title%" "%genre%|$rand()" 0)
(QUERY "100 Random Singles" 0 "@database" "%__codec% IS FLAC" "%title%" "$rand()" 0 :MAX-TRACKS 100)
(QUERY "10 Random Singles by Genre" 0 "@database" "%__codec" "%album artist%|%album%|[$num(%tracknumber%,2) - ]%title%" nil 0)
(QUERY "Ska-Punk Singles -- @format<%_size_abb%>" 0 "@database" "genre IS punk rock AND %__codec% IS MP3 OR genre IS ska AND %__codec% IS MP3" "%artist% - %title%" "$rand()" 0 :MAX-SIZE 960)
(QUERY "MOD 588 Failed" 0 "@database" "NOT $mod(%_length_samples%,588) IS 0" "%__codec%|%album artist%|'('%date%')' %album%|$num(%tracknumber%,2). %title%" "$if($strcmp($left($if2(%album artist%,%artist%),4),The ),$right($if2(%album artist%,%" 0)
))))sub($len($if2(%album artist%,%artist%)),4))', 'The,$if2(%album artist%,%artist%))|'('%date%')' %album%|$num(%tracknumber%,2). %title%" 0)
(QUERY "MOD 588 Passed" 0 "@database" "$mod(%_length_samples%,588) IS 0" "%__codec%|%album artist%|'('%date%')' %album%|$num(%tracknumber%,2). %title%" "$if($strcmp($left($if2(%album artist%,%artist%),4),The ),$right($if2(%album artist%,%artist%),$sub($len($if2(%album artist%,%artist%)),4))', 'The,$if2(%album artist%,%artist%))|'('%date%')' %album%|$num(%tracknumber%,2). %title%" 0)
(QUERY "Never Played" 0 "@database" "%__codec% IS FLAC AND play_counter MISSING" "%artist% - %title%" "%artist%|%title%" 0)
(FOLDER "Top 50" 1 :CONTENTS (
(QUERY "Most Played" 0 "@database" "[%play_counter%]" "'('$num(%play_counter%,3)')' %artist% - %title%" "$num(%play_counter%,3)|%artist%|%title%" 0 :REVERSE t :MAX-TRACKS 50)
(QUERY "Last Played" 0 "@database" "[%last_played%]" "%artist% - %title%" "%last_played%|%artist%|%title%" 0 :REVERSE t :MAX-TRACKS 50)
(QUERY "Least Played" 0 "@database" "[%play_counter%]" "%artist% - %title%" "%play_counter%|%artist%|%title%" 0 :MAX-TRACKS 50)
))))))

I thought that perhaps it might be due to a folder within a folder.  Even if I bring that last folder ("Top 50") into the main "Dynamic Playlist" folder, it still happens.

Thanks for posting that code, helps a lot noobs like me. Im requesting if theres any more people who could post their configs, id really appreciate it.

Thanks again and also greets to the PT author, brilliant plugin.

foo_playlist_tree

Reply #1477
Is there a list of working examples/favorites somewhere? I looked at the bowron forum but the link there is broken. It would be great to have a thread with screenshots and code to look at instead of asking for things that have already been posted or recreating the wheel. Maybe they could be added to the bowron wiki examples (but with code for copy and paste)???

Specifically, I'm looking for a way to handle fields with multiple values (using the \ seperator) and the Special lists shown here.


foo_playlist_tree

Reply #1478
Is there a list of working examples/favorites somewhere? I looked at the bowron forum but the link there is broken. It would be great to have a thread with screenshots and code to look at instead of asking for things that have already been posted or recreating the wheel. Maybe they could be added to the bowron wiki examples (but with code for copy and paste)???

Specifically, I'm looking for a way to handle fields with multiple values (using the \ seperator) and the Special lists shown here.


Anyone?


foo_playlist_tree

Reply #1480
Is this examples of queries page what you're asking for?

Unfortunately not.  While that page does give some examples, there are not enough to clue me in on how to create the ones from the screenshot such as 100 Top Rated, 100 Most Played and 100 Last Played.

I'm also looking for what ideas others may have already come up. Thanks.

foo_playlist_tree

Reply #1481
is there a way to exclude directories, or even only include certain directories in queries?

also.. if i wanted to create a style query, files will fall under multiple styles. is it possible to include them under more than one branch of the tree?

foo_playlist_tree

Reply #1482
I wasn't sure which thread to put this question in, so I'll throw it in this one since it's been more recently discussed:

Is there a way to make foo_browser sort according to playlist tree's query sorting parameters?

foo_playlist_tree

Reply #1483
I'm not sure if this was mentioned before..

when starting foobar it seams that display text functions don't get evaluated or @hidden2 is disregarded.

my config:

Code: [Select]
@quote<@format<$ifgreater(5,%_itemcount%,@hidden2 ,)>>
$replace(%album artist%,'The ',)|
[#'<'%album type%'>'|]
$if(%track%,['['%date%']']$if2(%album%,'<unknown>'),'<incomplete>')|
[%discnumber%.][$num(%tracknumber%,2).]
[%track artist% - ]%title%
$if(%track%,, ['['%album%']'])


first line alows me to filter out artist with less then 5 song, but doesn't work at startup...

great plugin btw ;]

foo_playlist_tree

Reply #1484
I'm currently using playback weighted on rating. I'd like to put this function on playlist_tree, to have static playlists, with many tracks rated 5 stars, and less tracks rated 2 stars. Is this even possible? I could not get the following query to limit "some" tracks - instead it just takes any track in the database:

Edit, it should be in quotes:

Code: [Select]
rating GREATER "$add($mod($rand(),4),2)"

A have a few feature requests:
* Option to disable child objects (tracks) in querys
* Option to expand collapse folders when they are left-clicked? (...or maybe i'm just missing something here )
Can't wait for a HD-AAC encoder :P

 

foo_playlist_tree

Reply #1485
think it would be a good idea to share some of these .pts files in a separate thread? if so, feel free to split this and i can edit some rules. i'm sure there's a lot of creative queries out there.

Additional components some of these scripts need:
foo_cwb_hooks.dll
foo_playcount.dll (official)


Top 250 Songs
here's one i just put together to generate a favorite list of tracks sorted by the rating and the average time between playing. as long as it has played at least 10 times, the rating is greater than 3, and it hasn't played in the last 7 days.
Code: [Select]
(QUERY "@rgb<252,252,252>Weekly Top 250@refresh " 0 "@database" "rating GREATER 3 AND (""$cwb_datediff(%last_played%,%cwb_systemdate%)"" GREATER 7 AND %play_count% GREATER 5)" "%title% - %artist%" "$num(%rating%,2)$sub(10000000000,$num($div($mul($cwb_datediff(%first_played%,%cwb_systemdatetime%),1000000),%play_count%),10))" 0 :REVERSE t :MAX-TRACKS 250)


by Albums
depending on the tags, this lists all of the music in the database by:
"artist \ album \ title" or "artist \ title" or "various albums\ album \ title"
Code: [Select]
(QUERY "@rgb<252,252,252>All Music [@format<$cwb_splitnum(%_itemcount%,',') tracks>]" 0 "@database" nil "$if($and(%artist%,$meta(title)),$if(%various%,Various Artists,$if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4))', 'The,%artist%))|$if2(%album%[ '('%date%')'],'@rgb<128,128,128>'●  singles  ●)|$if(%discname%,%discname%|)$meta(title),'@rgb<128,128,128>''('tags missing')'|$replace(%path%,\,|))" "$if($and(%artist%,%title%),1$if(%various%,'(((',$replace(%artist%,The ,))|$if($not(%various%),%date%)%album%|%discnumber%%tracknumber%%title%,0|%path_sort%)" 0)


by Genre
this separates the tracks by genre. then lists them as a similar method as above except the various artists are no longer displayed as albums, but singles underneath each artist.
Code: [Select]
(QUERY "@rgb<252,252,252>by Genre" 1 "@database" "NOT genre MISSING AND NOT @format<'$meta(title)'> MISSING AND NOT artist MISSING" "%<genre>% '('@format<'$cwb_splitnum(%_itemcount%,',')'> tracks')'|$if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4))', 'The,%artist%)|$if($and(%album%,$not(%various%)),%album% '('%date%')','@rgb<128,128,128>'●  singles  ●)|$if(%discname%,%discname%|)%title%" "%genre%|$replace(%artist%,The ,)|$if($and(%album%,$not(%various%)),%date%%album%,%various%)|%discnumber%%tracknumber%%title%" 0)


by Rating
this displays tracks displayed as rating \ artist \ title
Code: [Select]
(QUERY "@rgb<252,252,252>by Rating" 1 "@database" "rating GREATER 0 AND NOT artist MISSING AND NOT title MISSING" "@rgb<2%rating%%rating%,1$add(2,%rating%)$add(4,%rating%),0>$repeat(♫ ,%rating%)|$if2(%genre%,'@rgb<128,128,128>'unknown genre)|$if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4))', 'The,%artist%)|%title%" "$sub(10,%rating%)| %genre% | $replace(%artist%,The ,) | %title%" 0)


by Codec
this separates the files by codec.if the tracks are lossy, then by codec \ bitrates \artist - album \ title
Code: [Select]
(QUERY "@rgb<252,252,252>Codec" 0 "@database" "NOT album MISSING" "$if(%__bitspersample%,,'@rgb<128,128,128>')%codec%|$if(%__bitspersample%,,$ifgreater(%__bitrate%,319,$puts(brgroup,320+ kbps),$ifgreater(%__bitrate%,255,$puts(brgroup,256-319 kbps),$ifgreater(%__bitrate%,191,$puts(brgroup,192-255 kbps),$ifgreater(%__bitrate%,127,$puts(brgroup,128-191 kbps),$puts(brgroup,  0-127 kbps)))))$get(brgroup)|)$if(%various%,%album%,%artist% - %album%)|%title%" "$if(%__bitspersample%,0,1)%codec%|$if(%__bitspersample%,,%__bitrate%|)$if(%various%,%album%,%artist% - %album%)|%discnumber%%tracknumber%" 0)


by Age
this query divides tracks by decade unless the album has this or last years date, if so this years and last years will be separated.
Code: [Select]
(QUERY "@rgb<252,252,252>Age" 0 "@database" "NOT album MISSING AND NOT artist MISSING AND NOT date MISSING AND NOT title MISSING AND NOT tracknumber MISSING AND various MISSING" "$if($stricmp($left(%cwb_systemdate%,4),%date%),This year''s,$if($stricmp($left(%cwb_systemdate%,4),$add(%date%,1)),Last year''s,$left(%date%,3)0''s))|%genre%|%artist%|%album%|%title%" "$if($stricmp($left(%cwb_systemdate%,4),%date%),0,$if($stricmp($left(%cwb_systemdate%,4),$add(%date%,1)),1,$sub(999,$left(%date%,3))))|%genre%|%artist%|%album%|%discnumber%%tracknumber%" 0)


Playing: album
here are a few more i made that are in reference to the currently playing track.
this one shows the tracks in the currently playing album
Code: [Select]
(QUERY "@rgb<252,64,50>Now playing: @format<$playing('[%artist%]')>@refresh " 1 "@database" "album IS @format<$playing('%album%')> AND artist IS @format<$playing('%artist%')> OR album IS @format<$playing('%album%')> AND various IS 1" "$if($stricmp(%album%,%artist%),'['self titled album']',%album%)|%title%" "%discnumber%%tracknumber%" 0)


Playing: more by this artist
this shows all the albums and singles by this artist
Code: [Select]
(QUERY "@rgb<255,255,255>@format<More $cwb_removethe($playing('%artist%'))>@refresh " 1 "@database" "artist IS @format<$playing('%artist%')> AND NOT album IS @format<$playing('%album%')>" "$if($and(%album%,$not(%various%)),%album%,'@rgb<128,128,128>'●  singles  ●)|%title%" "$if($or(%various%,$not(%album%)),0|$if2(%title%,%filename_ext%),[%date%]%album%|$if(%title,[%discnumber%][%tracknumber%]%title%,%filename_ext%))" 0)


Playing: favorite tracks by this artist
this one shows the favorite tracks based on the rating, and the number of days between plays
Code: [Select]
(QUERY "@rgb<255,255,255>@format<Favorite $cwb_removethe($playing('%artist%')) Songs>@refresh " 0 "@database" "artist IS @format<$playing('%artist%')> AND rating GREATER 3" "%title%" "$num(%rating%,2)$sub(10000000000,$num($div($mul($cwb_datediff(%first_played%,%cwb_systemdatetime%),1000000),%play_count%),10))" 0 :REVERSE t :MAX-TRACKS 15)


i hope someone finds these useful, if not, i just made an elaborate backup of my settings

foo_playlist_tree

Reply #1486
%_play_length% stops at 23 days. is there any way to show weeks as well?

foo_playlist_tree

Reply #1487
The problem is with my playlist and i believe it to be the tagging of a few albums.  Most of my albums display fine, but there is a small handful that comes up as <missing> under my browser.  that specific album won't get categorized under the appropriate band, and the only information available are the song titles....when i go to customize it, foobar pops up the message that that specific object is not found.  here's a pic of what i see...


Now i can temporarily fix this problem, by removing that playlist and readding it.  then that <missing> disappears and the albums are organized just how i want them. 


but when i add a mod to foobar or more importantly when i restart my computer, the same thing happens and the fixed albums go back to their misplaced sections under <missing>.  Now i'm not very computer savvy, so this may be a simple problem... but if anybody can help me out, i'd really appreciate it.  thank you!

foo_playlist_tree

Reply #1488
have you enabled "force preferred tag writing schemes on all files" and selected ID3v2+ID3v1 in the advanced options?
also try refreshing your database..

you may get more answers of you post this in the support forum

foo_playlist_tree

Reply #1489
Quote
= Release 2.2.4 =
* Added "Clear Query Results" menu items
* Added notification callback so other plugins can be notified of tree selections.
* added global title formatting for treenode info: $treenode(arg) function.  Possible arguments:
** name
** displayname
** size
** duration
** itemcount
** foldercount
** overallindex
** isleaf
** isfolder
** isquery
* auto refresh in a main thread callback
* put system icons at the end of the list so when they change it doesnt mess everything up
* set the background color in the icon selection box to the same color as your tree, so its easier to tell what will look good
There used to be a link to my website here.

foo_playlist_tree

Reply #1490
refresh doesn't quite work anymore. manually refreshing the trees, even after a file updates, it instantly looks like it was done (hoping you found a way to make big trees load faster since mine take 8 seconds to refresh ) but then i noticed the tree didn't update. i had to open some nodes and then the refresh worked as before. also what does $treenode(arg) do? where can i use it?

is it possible to change the color midway thru a tree item? i tried this:
@rgb<202,202,202>%<genre>% @rgb<128,128,128>'('@format<'$cwb_splitnum(%_itemcount%,',')'> tracks')'|

also that $cwb_splitnum() function didnt work in that statement, but it does work in the label

foo_playlist_tree

Reply #1491
also what does $treenode(arg) do? where can i use it?


It returns information about the currently selected treenode.  I use inside a trackinfo panel that shows only information about the tree node ($treenode(displayname), $treenode(duration), etc)

Quote
is it possible to change the color midway thru a tree item? i tried this:


No.  The @rgb refers to the entire line.
There used to be a link to my website here.

foo_playlist_tree

Reply #1492
think it would be a good idea to share some of these .pts files in a separate thread? if so, feel free to split this and i can edit some rules. i'm sure there's a lot of creative queries out there.

That would be great!
i hope someone finds these useful, if not, i just made an elaborate backup of my settings

I certainly did. Especially since the link to the examples in the forum is broken, the examples in the wiki are few and can't be copied and the tutorial is out of date. Thanks.

EDIT: I saved a couple of your queries to a pts and loaded them but they didn't work.

I'd still like to know how to get 100 Most Played and 100 Last Played.

How do I modify the following to handle multiple artist values?

Code: [Select]
(QUERY "Now Playing: @format<$playing('%artist%')>@refresh " 1 "@database" "artist IS @format<$playing('%artist%')>" "@quote<@format<$if($greater(%_foldercount%,8),@hidden ,)>>%album%[ $char(40)%subtitle%$char(41)][ $char(91)%edition%$char(93)]|[$char(91)$num(%tracknumber%,2)$char(93) ]%title%[ $char(40)%version%$char(41)]" nil 1)

I tried setting the label to:
Code: [Select]
Now Playing: @format<$playing('%<artist>%')>

but all i get is a question mark. In other queries I've used %<artist>% in the format field which works perfectly.

foo_playlist_tree

Reply #1493
I don't know if it is due to the newest release: I configured a new layout and deided that it is the best for my workflow to apply the command "Send to library playlist" by ENTER.  But it doesn't work! (It works with Space).

It was a nice improvement a few versions ago to turn off the automatical redraw of the at refresh to avoid the annoying flicker of the panel. However there are two situations where an automatic redraw would be useful:

1. Loading a child inside a panel seems to have no effect. It took me some time to recognize that i have to redraw tree manually.

2. Changing the name format for folders inside preferences also requires a manual refresh

foo_playlist_tree

Reply #1494
EDIT: I saved a couple of your queries to a pts and loaded them but they didn't work.

I'd still like to know how to get 100 Most Played and 100 Last Played.

How do I modify the following to handle multiple artist values?

Code: [Select]
(QUERY "Now Playing: @format<$playing('%artist%')>@refresh " 1 "@database" "artist IS @format<$playing('%artist%')>" "@quote<@format<$if($greater(%_foldercount%,8),@hidden ,)>>%album%[ $char(40)%subtitle%$char(41)][ $char(91)%edition%$char(93)]|[$char(91)$num(%tracknumber%,2)$char(93) ]%title%[ $char(40)%version%$char(41)]" nil 1)

I tried setting the label to:
Code: [Select]
Now Playing: @format<$playing('%<artist>%')>

but all i get is a question mark. In other queries I've used %<artist>% in the format field which works perfectly.


if there were any problems with the queries they are fixed now since i edited that post. your problem might be because you don't have foo_playcount.dll (official) or foo_cwbhooks.dll

edit:
sorry, i don't know about multiple artist fields. i don't think it would work with the now playing queries..

foo_playlist_tree

Reply #1495
if there were any problems with the queries they are fixed now since i edited that post. your problem might be because you don't have foo_playcount.dll (official) or foo_cwbhooks.dll

Thanks for the update; working now. It would be cool if the Weekly 250 displayed the playcount as well.
edit:
sorry, i don't know about multiple artist fields. i don't think it would work with the now playing queries..

Hopefully cwbowron can help with that one. I think it's his. Also, the Now Playing Query doesn't seem to work properly for albums by the artist. They are displayed but the tracks are not; works fine with tracks from VA releases.

foo_playlist_tree

Reply #1496
How do I modify the following to handle multiple artist values?

Code: [Select]
(QUERY "Now Playing: @format<$playing('%artist%')>@refresh " 1 "@database" "artist IS @format<$playing('%artist%')>" "@quote<@format<$if($greater(%_foldercount%,8),@hidden ,)>>%album%[ $char(40)%subtitle%$char(41)][ $char(91)%edition%$char(93)]|[$char(91)$num(%tracknumber%,2)$char(93) ]%title%[ $char(40)%version%$char(41)]" nil 1)


I dont think there is currently a way to do this.  The %<tag>% format has limitations and this is outside those limitations.
There used to be a link to my website here.

foo_playlist_tree

Reply #1497
still cant figure out how the nested queries work. i made a nested query that looks like this:
Code: [Select]
@query<@rgb<255,255,255>@format<Favorite $cwb_removethe($playing('%artist%')) Songs>@refresh;@database;artist IS @format<$playing('%artist%')> AND rating GREATER 3" "%title%" "$num(%rating%,2)$sub(10000000000,$num($div($mul($cwb_datediff(%first_played%,%cwb_systemdatetime%),1000000),%play_count%),10))" 0 :REVERSE t :MAX-TRACKS 15);%title%>


but i dont know what do do with it. id like to put it under the existing query that i have that makes a tree of the currently playing album

foo_playlist_tree

Reply #1498
Trying to port this query:

Code: [Select]
 #album artist#|[& $if($stricmp(#album artist#,$meta(album artist,2)),$meta(album artist,1),$meta(album artist,2))]|[& $if($stricmp(#album artist#,$meta(album artist,3)),$meta(album artist,1),$meta(album artist,3))]|#album#|$num(%tracknumber%,2). %title%[ - %date%]


This is the translation:

Code: [Select]
%<album artist>%|[& $if($stricmp(%<album artist>%,$meta(album artist,1)),$meta(album artist,0),$meta(album artist,1))]|
[& $if($stricmp(%<album artist>%,$meta(album artist,2)),$meta(album artist,0),$meta(album artist,2))]|
%<album>%|$num(%tracknumber%,2). %title%[ - %date%]


this it the two outputs I'm getting: left=old  right=new:




Does $meta(x,y) works zero based instead of 1 based as before?
Is there a way to get single values for tracks instead of doubles, at least?
Is there a way to get rid of that incorrect "& Ben Webster" branch?

Thanks.

foo_playlist_tree

Reply #1499
What should I write in the criteria box to make a comparison work?

This is what I have in my 0.8 foobar.

Code: [Select]
$len(%tag%) GREATER 4


In spite of my attempts I couldn't find a way to see it work in 0.9 (PLT 2.2.3).

Thanks.