Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

“Last played” default value for new tracks #2798

Closed
matias-tecnosoul opened this issue Dec 18, 2023 · 1 comment · Fixed by #2840
Closed

“Last played” default value for new tracks #2798

matias-tecnosoul opened this issue Dec 18, 2023 · 1 comment · Fixed by #2840

Comments

@matias-tecnosoul
Copy link

Is your feature request related to a problem?

When using a smart block with a "last played" criteria I see that new tracks without a “last played” value don´t show as “matched” in the block's preview no matter what modifier I set for the "Last Played".
I've opened a thread in discourse.

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.
image
image

Describe the solution you'd like

Kevw shared a workaround for setting a default datetime for new tracks:

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.

Describe alternatives you've considered

No response

Additional context

No response

jooola added a commit that referenced this issue Dec 27, 2023
#2840)

### Description

Closes #2798

COALESCE last played null values with date -infinity, to ensure newly
added files are found by the last played smart block criteria.
@matias-tecnosoul
Copy link
Author

great! thanks a lot!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant