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: %isplaying% not behaving as expected (Read 3424 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

%isplaying% not behaving as expected

the %isplaying% variable isn't work as expected. The documentation says "Returns "1" if file is currently playing and empty string otherwise." but this doesn't happen, it only seems to return 1 if it is playing and was the entry in a playlist that was sued to play the file.

If a playlist is reloaded, then the file that is playing no longer displays as playing. %_isplaying% worked like this in 0.83 but no longer.

Was there a reason for the change in behaviour? Or would it be possible to have the behaviour selecteable, i.e. the user can choose whether all that matters is if it is the same file, rather than the same instance of the file  that is playing.

thanks,
ledge

%isplaying% not behaving as expected

Reply #1
I don't remember the exact reason, but it is intentional behaviour.

%isplaying% not behaving as expected

Reply #2
I don't remember the exact reason, but it is intentional behaviour.


Yeah, i'd love to know why. Also the documentation should at least be updated to reflect how it actually behaves.

And if you had the choice of how it is going to behave that would be the best of both worlds

%isplaying% not behaving as expected

Reply #3
If a playlist is reloaded, then the file that is playing no longer displays as playing. %_isplaying% worked like this in 0.83 but no longer.

Was there a reason for the change in behaviour? Or would it be possible to have the behaviour selecteable, i.e. the user can choose whether all that matters is if it is the same file, rather than the same instance of the file  that is playing.


When you have started playback of a song in a playlist and you (during playback) delete and then readd this entry from the playlist or delete/reload the complete playlist, then foobar will forget that the file currently playing became part of the playlist again. It's intentional, probably because the playlist code was changed, you can have the same file in several playlists but it will only be known as "isplaying" in the playlist you have started it from. Makes sense to me, just restart the playback from within the updated playlist and %isplaying% will be set accordingly.

%isplaying% not behaving as expected

Reply #4
When you have started playback of a song in a playlist and you (during playback) delete and then readd this entry from the playlist or delete/reload the complete playlist, then foobar will forget that the file currently playing became part of the playlist again. It's intentional, probably because the playlist code was changed, you can have the same file in several playlists but it will only be known as "isplaying" in the playlist you have started it from. Makes sense to me, just restart the playback from within the updated playlist and %isplaying% will be set accordingly.


I can see why someone would want it to function like that. I find it irritating though when I am using the music browser plugin and it updates its playlist, then if I go back to a selection that has a playlist with song in it again the track is no longer showing as playing, and I generally don't want to restart the current song just so it shows as playing.

I guess what I want then is a plugin that adds another variable that returns 1 if the current playing song has the same artist title and album. If I knew C I'd do it myself

%isplaying% not behaving as expected

Reply #5
[...]I am using the music browser plugin and it updates its playlist, then if I go back to a selection that has a playlist with song in it again the track is no longer showing as playing, and I generally don't want to restart the current song just so it shows as playing.

I guess what I want then is a plugin that adds another variable that returns 1 if the current playing song has the same artist title and album. If I knew C I'd do it myself


Hm, then maybe you should make a feature suggestion to the author of the music browser plugin. Maybe it's possible to trigger the "isplaying" for a specific playlist entry through the fb2k API during playback of that correspondig track... if that doesn't work then it would be definitely be possible for the plugin to set the next track of the playlist to be played next (default behaviour is that the playback just stops or it starts over with the first entry of the active playlist).