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 Songshere'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
(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 Albumsdepending 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
(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 Genrethis 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
(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 Ratingthis displays tracks displayed as rating \ artist \ title
CODE
(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 Codecthis separates the files by codec.if the tracks are lossy, then by codec \ bitrates \artist - album \ title
CODE
(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 Agethis 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
(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: albumhere 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
(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 artistthis shows all the albums and singles by this artist
CODE
(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 artistthis one shows the favorite tracks based on the rating, and the number of days between plays
CODE
(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