Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Ices 0.4 with Python: Playlist file name is empty

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Source Clients
View previous topic :: View next topic  
Author Message
TheOP
Guest





PostPosted: Sun Nov 20, 2005 3:40 pm    Post subject: Ices 0.4 with Python: Playlist file name is empty Reply with quote

I'm running an Ices 0.4 generating an mp3 stream into an external Shoutcast server. The playlist is generated with a special PHP script which selects songs from a library of over 60k mp3 files. I invoke the script through a Python module, which does an HTTP call to the PHP script and always returns a the hardcoded string "/tmp/radiosong.mp3" which is the normalized mp3 file created by the PHP script.

After a few days, Ices always claims it got an empty playlist file name and shuts down, despite the fact that the file name is hardcoded and is never empty.

Here's the function from my ices.py:

Code:
def ices_get_next ():
        global songname
        global bandname
        while len(songfile) < 1:
                print 'Executing get_next() function...'
                conn = httplib.HTTPConnection("www.myserver.net")
                conn.request("GET", "/radioscript.php")
                r1 = conn.getresponse()
                songname = r1.getheader("X-Songname","Unknown")
                bandname = r1.getheader("X-Artistname","Unknown")
        return "/tmp/radiosong.mp3";


I'm not a Python expert, so I don't know if there's something in the code that messes things up. Any ideas what could be causing the problems? Thanks in advance!

PS: Ogg streaming is currently not an option so I can't upgrade to 2.0.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Source Clients All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber