"Last played" value for new "unplayed" tracks

Hi, I’m trying to create a block that only plays tracks played more than 5 hours ago.

My doubt is how are new tracks taken into consideration by filters using the “last played” value. New tracks don’t show a value in that column.

Are new tracks without a “last played” value considered as valid for such a block? I believe they are since tracks do get loaded at some point and get a “last played” value.

However when I do some tests the new tracks don´t show as “matched” in the preview. And they don´t show in the results no matter what modifier I set for the Last Played.

I enclose some screenshots. Here I have 3 tracks matching a condition. 1 of them has just been uploaded and never played. When I add a “last played” time condition the new track doesnt show up! for either “before” or “after” modifier.

cheers!

Hi,

I had the same issue when I first set up Libretime. I made a change to the field in the database so that the default datetime is in the past. Like this:

psql -h localhost -U airtime -W
ALTER TABLE cc_files ALTER COLUMN lptime SET DEFAULT ‘1999-01-01 00:00:00’;

So newly uploaded tracks have a last-played time of ‘1999-01-01 00:00:00’.

The smartblocks then work properly.

Hope this helps

:sweat_smile: thanks for the hint! clever :smiley:
And shouldn´t this solution be added as default for new installs?

I still not get how do the new tracks start being played if the condition in the blocks doesn´t accept tracks whithout a time stamp…

maybe you could open a pull request? :slight_smile: