View Single Post
Old 6th November 2012, 21:48   #1
Junior Member
Join Date: Nov 2012
Posts: 3
Which Return Format for Next Songs via Dynamic Playlist Script?

hi together,
i am using sc_serv in combination with sc_trans on my linux server to broadcast mp3s that lie in a music folder on the same server. i wrote a python script that creates a dynamic playlist from my mp3s. i stuck to the documentation and my playlist only contains this call of my script:

#!/usr/bin/python /home/shoutcast/sc_trans_folder/playlists/

as the documentation states:
The script run in this case should return the entry in the playlist to run at this point. The script is also passed an integer parameter indicating how many tracks ahead must also be returned by the script.
By returning these extra tracks as well as the first one expected then this information will be used by YP2 to refine searching and also to establish a "coming soon" track which will be shown to clients or on the SHOUTcast site.
therefore, to achieve some kind of playlist behavior, every time the script is called by sc_trans i just print out the path to the next song followed by the paths to the songs coming up afterwards (each in a new line). i print out exactly the amount of songs that i get by the parameter by sc_trans mentioned above. the printouts look like this:
/home/shoutcast/music/songs/Bodies of Water - One Hand Loves the Other.mp3
/home/shoutcast/music/songs/1-06 This Charming Man.mp3
however, when i look in the information in sc_trans's logs i see this:
HTML Code:
<?xml version="1.0" encoding="UTF-8" ?>
<COMM language="eng" id="iTunNORM"> 000010EE 000010C9 0000DD30 00007477 00024E62 00024E62 00008000 00008000 000001E7 000008B5</COMM>
<COMM language="eng">compiled by nico</COMM>
<TALB>2011 - You can&apos;t hug every cat</TALB>
<TENC>TRANSCast DNAS/posix(linux x64) v2.0.0.54</TENC>
<TIT2>One Hand Loves the Other</TIT2>
<TPE1>Bodies of Water</TPE1>
<TPE2>Bodies of Water</TPE2>
<TSSE>LAME 32bits version 3.98.4 (</TSSE>
	<title seq="1">Bodies of Water - One Hand Loves the Other</title>
	<title seq="2">dynamicPlaylist</title>
	<title seq="3">dynamicPlaylist</title>
	<title seq="4">dynamicPlaylist</title>
somehow sc_trans only receives the current song and skips the next songs. maybe the format in which i print out the next songs are wrong? does anybody know how i can fix that? is there a certain format in which i need to return the next songs? any help is appreciated!
lagerkoller is offline