Go Back   Winamp & SHOUTcast Forums > SHOUTcast > SHOUTcast Technical Support

Closed Thread
Thread Tools Search this Thread Display Modes
Old 6th November 2012, 21:48   #1
lagerkoller
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:

code:
#!/usr/bin/python /home/shoutcast/sc_trans_folder/playlists/dynamicPlaylist.py


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/jingles/zomtec.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" ?>
<metadata>
<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>
<TCON>Indie</TCON>
<TDRC><year>2011</year></TDRC>
<TENC>TRANSCast DNAS/posix(linux x64) v2.0.0.54</TENC>
<TIT2>One Hand Loves the Other</TIT2>
<TLEN>225573</TLEN>
<TPE1>Bodies of Water</TPE1>
<TPE2>Bodies of Water</TPE2>
<TRCK>4</TRCK>
<TSSE>LAME 32bits version 3.98.4 (http://www.mp3dev.org/)</TSSE>
<TYER>2011</TYER>
<extension>
	<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>
	<soon>dynamicPlaylist</soon>
</extension>
</metadata>
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  
Old 6th November 2012, 22:02   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
the feature doesn't work correctly as it ignores the additional tracks you provide in the response which is why it's then just showing the name of the script entry for the next tracks instead of what was returned. there has been some work done on trying to rectify the issue but as i'm currently not working on sc_trans i don't have any eta for when a fixed version will be released. and the format of the response from the script is fine from what i remember of what the parser is designed to cope with.

-daz
DrO is offline  
Old 7th November 2012, 07:51   #3
lagerkoller
Junior Member
 
Join Date: Nov 2012
Posts: 3
ok, cool. thank's for the answer! then i will spend no further efforts into evolving this functionality. (would be cool if that piece of information could be included into the docs and the wiki. then the next one will not try endlessly as me to implement that feature.)
lagerkoller is offline  
Old 7th November 2012, 09:41   #4
lagerkoller
Junior Member
 
Join Date: Nov 2012
Posts: 3
Python Dynamic Playlist Script for SHOUTcast Transcoder

If anyone likes to use my script (or wants to comment to it), feel free to do so. the script must be called from a transcoder playlist (see first post in this thread). please find fully commented script in the attached zip file.
Attached Files
File Type: zip dynamicPlaylist.py.zip (2.7 KB, 332 views)

Last edited by lagerkoller; 7th November 2012 at 10:55.
lagerkoller is offline  
Old 3rd June 2016, 12:19   #5
michele-01
Junior Member
 
Join Date: Jun 2016
Posts: 16
thank's for the answer! then i will spend no further efforts into evolving this functionality. (would be cool if that piece of information could be included into the docs and the wiki. then the next one will not try endlessly as me to implement that feature.)
If anyone likes to use my script (or wants to comment to it), feel free to do so. the script must be called from a transcoder playlist (see first post in this thread). please find fully commented script in the attached zip file.
michele-01 is offline  
Old 3rd June 2016, 14:55   #6
neralex
Major Dude
 
Join Date: Mar 2011
Posts: 552
Since the last answer in this thread, in last 4 years, the support and the development of sc_trans was closed. So I guess there is no need to add it.
neralex is offline  
Old 4th June 2016, 06:28   #7
michele-01
Junior Member
 
Join Date: Jun 2016
Posts: 16
Quote:
Originally Posted by DrO View Post
the feature doesn't work correctly as it ignores the additional tracks you provide in the response which is why it's then just showing the name of the script entry for the next tracks instead of what was returned. there has been some work done on trying to rectify the issue but as i'm currently not working on sc_trans i don't have any eta for when a fixed version will be released. and the format of the response from the script is fine from what i remember of what the parser is designed to cope with.

-daz
hy i am mitchele the response which is why it's then just showing the name of the script entry for the next tracks instead of what was returned.
michele-01 is offline  
Old 22nd June 2016, 10:51   #8
michele-01
Junior Member
 
Join Date: Jun 2016
Posts: 16
i love to hear new music...There are many new music now a days but some are my favourite music New Songs 2016
michele-01 is offline  
Old 22nd June 2016, 11:15   #9
michele-01
Junior Member
 
Join Date: Jun 2016
Posts: 16
songs

guys???
i am a song lover .... wanna see the reason why? then come and see top songs of 2016
michele-01 is offline  
Old 26th June 2016, 10:43   #10
michele-01
Junior Member
 
Join Date: Jun 2016
Posts: 16
[QUOTE=michele-01;30605
michele-01 is offline  
Old 26th June 2016, 10:48   #11
michele-01
Junior Member
 
Join Date: Jun 2016
Posts: 16
Quote:
Originally Posted by michele-01 View Post
i love to hear new music...There are many new music now a days but some are my favourite music New Songs 2016

Python Dynamic Playlist Script for SHOUTcast Transcoder
If anyone likes to use my script (or wants to comment to it), feel free to do so. the script must be called from a transcoder playlist (see first post in this thread). please find fully commented script in the attached zip file
michele-01 is offline  
Old 8th August 2018, 06:45   #12
NJK
Frisian Spamfighting Mod
 
NJK's Avatar
 
Join Date: Sep 2003
Location: a real Frisian hometown
Posts: 14,729
Thread closed due to spam invasion

Each Thursday a new show on Celtica Radio with Darkwave music.
NJK is offline  
Closed Thread
Go Back   Winamp & SHOUTcast Forums > SHOUTcast > SHOUTcast Technical Support

Tags
dynamic, playlist, python, shoutcast, transcoder

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump