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: Usage of %isplaying% in Autoplaylists (Read 1471 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Usage of %isplaying% in Autoplaylists

Hello all,

I haven't found anything related to my problem on google or on this forum, so I'm creating a new post.

I am trying to create an autoplaylist matching both of the following criteria:
  • Title contains (a certain string);
  • The track has never been played.

I have come up with this query, which, without being perfect, works fine:
Code: [Select]
%play_count% IS 0 AND title HAS Planète

The problem is that, when I play a track from this playlist, after a few seconds, the track is no longer considered to have never been played, and disappears from the list. It's still playing, but it's no longer showing.
My goal is to add a condition preventing that, something along the lines of:
Code: [Select]
(%play_count% IS 0 OR %isplaying% IS "1" OR %ispaused% IS "1") AND title HAS Planète

However, this does not seem to work. When I try this filter in Library > Search, the only tracks showing are the ones that have never been played.
I have tried using "isplayed" instead of "%isplayed%", and 1 instead of "1", to no avail.

Can anyone point me in the right direction?
Thanks in advance, and please let me know if any additional information is necessary.

Re: Usage of %isplaying% in Autoplaylists

Reply #1
From the Wiki :
%isplaying% is a "Playlist-only" field. These fields are only usable in playlist display formatting (i.e., the column title formatting patterns).

Re: Usage of %isplaying% in Autoplaylists

Reply #2
I don't think there is a way to make the song stay in the autoplaylist until it has finished playing for the first time. Not exactly anyway. At least you could make the song stay in the autoplaylist for five minutes (or any other fixed amount of time) after it has started playing.
Code: [Select]
(%play_count% is 0 OR %first_played% DURING LAST 5 MINUTES) AND ...
Note that you can only use constant values with DURING LAST. In particular "%first_played% DURING LAST %length_seconds% SECONDS" won't work.


Re: Usage of %isplaying% in Autoplaylists

Reply #4
Not exactly what you asked for but this code will keep the song in the autoplaylist for the first time played (%play_count% = 0 or 1) and remove it when it is played for the second time (%play_count% = 2 ) .

%played_per_day% stats exists only if played more than twice.

Code: [Select]
NOT %played_per_day% PRESENT AND ...


Re: Usage of %isplaying% in Autoplaylists

Reply #5
Sorry to unearth my old topic, I just thought I'd update just in case someone has the same problem some day.

Here is the workaround I ended up using:

Code: [Select]
(%play_count% IS 0 OR %last_played% DURING LAST 1 DAY) AND title HAS Planète

The effect is that a track is purged from the Autoplaylist only the day after it was played.