HydrogenAudio

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: r0k on 2012-10-09 10:50:59

Title: Query/title format to get the last time an album was played
Post by: r0k on 2012-10-09 10:50:59
Hello. My library is still organized the old-way by albums (ripped CDs) and i often play albums rather than playlists. However, i also have random pools active to select tracks/albums when i don't want to worry about selecting something manually. This means i can have an album that i didn't play for the last 3 months, but have one track on that albums that was played 2 days ago.

foo_playcount does only store per-tracks data so i don't have an easy way to know when was the last time the entire album was played. I searched for some way to do this with query syntax, but can't find any way to get the oldest of all the last played entries for an album. I'm missing something similar to the aggregate functions of SQL. Maybe i overlooked something.

Is there a way to do this with querry syntax and/or title format scripts. I know i can do this with SQL tree but i'd like to be able to get this information anywhere and not just in one component.
Title: Query/title format to get the last time an album was played
Post by: derty2 on 2012-10-09 11:43:03
I don't know if this is the exact answer you want but it may be helpful (I use CUI interface)...

If we assume that entire album == directory containing a set of files

and we have a Filter panel in our layout for library viewing

then we can create some views like these:

History — Last Played (Directory Path), by Day
Quote
$cut(%last_played%,10)'      '$directory_path(%path%)

History — Last Played (Directory Path), by Day-Time
Quote
$cut(%last_played%,10)-$replace($time(%last_modified%),' ',,'-',,':',)'      '$directory_path(%path%)
Title: Query/title format to get the last time an album was played
Post by: aethelberht on 2012-10-09 12:22:43
No, there are no general aggregation operations.

What derty2 suggests above groups tracks by date, which runs into the problem mentioned in the OP where a track has different play dates from the rest of the album.
Title: Query/title format to get the last time an album was played
Post by: r0k on 2012-10-09 15:38:38
Mhh OK. Thanks for confirmation.
Might be a feature request then.
Title: Query/title format to get the last time an album was played
Post by: marc2003 on 2012-10-11 10:24:19
Quote
but can't find any way to get the oldest of all the last played entries for an album


it's probably possible to do this with WSH panel mod. it could loop through every track in a playlist and display the earliest play date for each album. i might be able to knock something up if you're interested.
Title: Re: Query/title format to get the last time an album was played
Post by: mjm716 on 2023-02-12 15:14:26
Reviving this topic with same question.

Facets has the last played statistic which groups by album, so essentially it shows the album last played = the last played track within the album grouping.

Is there way to achieve something similar for adding those albums to an autoplaylist?