Toggle auto play on and of

You have a question or need an advice about how to do something? Ask it here!
Post Reply
friso
Posts: 173
Joined: 10 Apr 2012 10:05
Toggle auto play on and of

Post by friso »

Bernd

I use a EXEC_SEND_TCP command to start and stop a stream, now i als want to stop and start the autoplay .
I have tested wit PLS_AUTOPLAY_TOGGLE, but i have to some playlist file behind it. But the name is always different.

What is the best way to start and stop the autoplay thrue that command

Thanx
Friso
User avatar
radio42
Site Admin
Posts: 8926
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Toggle auto play on and of

Post by radio42 »

Use the PLS_CURRENT_* commands to work with the current playlist. e.g. PLS_CURRENT_AUTOPLAY_TOGGLE.

The PLS_* (without CURRENT_) are used to work with playlists referenced by their name.
friso
Posts: 173
Joined: 10 Apr 2012 10:05
Re: Toggle auto play on and of

Post by friso »

Bernd

Tested it with this line, but it didn't work. Switching on and of streamin works ok

192.168.1.129:8052|AUTHORIZATION 371222915${CRLF}${CRLF}STREAMING_SERVER_START Shoutcast V2 server Friso${CRLF}${CRLF}PLS_CURRENT_AUTOPLAY_ON${CRLF}${CRLF}
User avatar
radio42
Site Admin
Posts: 8926
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Toggle auto play on and of

Post by radio42 »

Please show the full command...Are you sending it from a different PF instance?
If yes, did you enable the TCP/IP Remoteing server on the receiving PF instance?
Make the call more simple and execute it from the command-line builder - then you will also see a possible result/error code.
E.g. use this command:

Code: Select all

EXEC_SEND_TCP 192.168.1.129:8052|AUTHORIZATION 371222915${CRLF}${CRLF}SHOW_ALERT_WINDOW ONLINE|You are now online!${CRLF}${CRLF}
If that works, change it to:

Code: Select all

EXEC_SEND_TCP 192.168.1.129:8052|AUTHORIZATION 371222915${CRLF}${CRLF}PLS_CURRENT_AUTOPLAY_ON ${CRLF}${CRLF}
(note the extra space after the parameter-less command!)
And if that works, just add more commands... etc.
friso
Posts: 173
Joined: 10 Apr 2012 10:05
Re: Toggle auto play on and of

Post by friso »

Bernd

Solved the problem. It is not possible to execute more than one command.
I created another one, and all worked fine

Thanx
Friso
User avatar
radio42
Site Admin
Posts: 8926
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Toggle auto play on and of

Post by radio42 »

It is possible!
Try using a single ${CRLF} to separate the commands and end with a double ${CRLF}${CRLF} to terminate the sequence.
friso
Posts: 173
Joined: 10 Apr 2012 10:05
Re: Toggle auto play on and of

Post by friso »

Bernd

Ok i will try that ;)

Post Reply