INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Is there a function to identify which queue started playback?  (Read 233 times)

rbmjr

  • World Citizen
  • ***
  • Posts: 107
Is there a function to identify which queue started playback?
« on: February 10, 2024, 07:42:08 pm »

I've found an unexpected situation. When I create an expression in a playback list and then send a playlist of music to the playback queue the expression executes, executes correctly as in it executes only once. When I Link the files in the current playing now queue to another server the expression executes once in the current playback list and again when the Linked device actually begins playback. Is there a way to add a function: If( [IsPlayingFrom], MyQueueName ), do this, do that )
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2379
Re: Is there a function to identify which queue started playback?
« Reply #1 on: February 11, 2024, 04:32:52 am »

Try to add a "save(MyQueueName, CurrentQueue)" to your expressions; Then you should be able to check it with "if(isequal(CurrentQueue, MyQueueName), do this, do that)".

If you need the value on a Client but the save() expression is on the Server, you'll need to use a field instead of a global variable: create a field called "LastQueue" and add a "setfield(LastQueue, MyQueueName)" to your expression. Then use "if(isequal(LastQueue, MyQueueName), do this, do that)". I'm not really confident this will work well, but try it.
Logged

rbmjr

  • World Citizen
  • ***
  • Posts: 107
Re: Is there a function to identify which queue started playback?
« Reply #2 on: February 12, 2024, 12:28:48 pm »

I will certainly use that code, however, first let me say thanks for the Zelda recommendation. It is AWESOME
Logged
Pages: [1]   Go Up