View Full Version : Python shoutcast pls downloader
just uploaded my script to sourceforge, hope you can use it.
have a look at it and be sure to read the starting comment and edit the config part! ;-)
like your script very much!
could you add a min/max biterate? now i get alot of stations with only 96 bitrate and the quality sucks...
Hullebulle
2004-01-06, 01:14
nei your script sounds very promising. thanx for the addition. :)
Hullebulle
2004-01-06, 02:58
nei would it be posible to add a new variable (lets say sbitrate) to the setup section with a min stream samplerate to create an url preset that looks like this?
http://www.shoutcast.com/directory/?maxbitrate=sbitrate?sgenre=
well i think it is posible but i am not very used to python.
unfortunatly it's not that simple. :-( but i will enhance the parsing of the pages, to add a min-, maxbitrate functionality when i find more time. maybe tomorrow evening...
i'm at work at the moment. :-)
i uploaded a new version with bitrate control under a new patch in sf. i was to stupid to attach the new script in the old patch when doing a follow up... :-(
btw, sf is a pain in the ass at the moment!
Hullebulle
2004-01-07, 22:20
thanx a lot for this quick addition. :)
if only sf could get thier web up so i can test it! ;)
Hullebulle
2004-01-07, 22:25
if only sf could get thier web up so i can test it! *;)
its not in the cvs. its a python addon for xbmc and you can download it here.
--> https://sourceforge.net/tracker....=581840 (https://sourceforge.net/tracker/index.php?func=detail&aid=872538&group_id=87054&atid=581840)
yes i know but sf´s web page sucks right now. get page could not show all the time browsing. sf. but i will come there, eventually... *;)
thanks for the direct link!!!
hi ,
very good job , it work very well .
http://www.xboxmediaplayer.de/forums/non-cgi/emoticons/tounge.gif
MrMario64
2004-01-10, 13:11
great script!
this really shows why xbmc is so good.
extendability...
keep it up!
for me, ist doesnt work at all. i always get "systemerror: null result without error in pyobject_call". does anyone know what this means? i forgot: the error comers from line 29 (import urllib2, os, sys, traceback).
same problem here..also error with lib2url on many lines...
hope someone has/knows solution
Hullebulle
2004-01-10, 17:11
acid70, mrr: you have to extract the python rar to the python folder of xbmc if you wanna use python scripts.
i forgot: the webserver doesn´t work,too. i don´t know if the problem belongs to the other, i get a "pragma: no-cache cache-control: no-cache content-type: text/html " message while trying to browse the xbox.
@hullebulle
of course i did extract the python.rar in the right place. i have a "python" and a "script"-folder with its contents in the xbmc folder.
very nice script, i like it :-)
oh and another idea. user selects a music categorie, then selects a station which is shown in the list. then download the pls file, parse it and display all stations in that pls file.
after the user selected a station replace http:// in the url with shout:// and use xbmc.mediaplay("shout://selectedstation") to start playing.
systemerror: null result without error in pyobject_call
means there as been an error, but the function didn't tell python what the error was excatly. most likely that this script is sending wrong values to urllib2.
since i don't get this error, could you paste all all errors you get?
oh, and the webserver doesn't have anything to do with python (unless you are using python server pages, which aren't used anywhere yet)
i heard somebody else had the same webserver issue and fixed it by making sure the time/date was properly set on the xbox itself (timeserver maybe).
ts
the full message output:
--> python initalized <--
traceback (most recent call last):
file "q:\scripts\shoutcast_update.py, line 29 in ?
import urllib2, os, sys, traceback
systemerror: null result without error in pyobject_call
thanx...but still no go.
i have this dir setup:
xbmc root
mplayer
etc.
python ---- extracted rar files
scripts
your python folder should have lib, spyce, temp dirs with contents in just lib and spyce.. is that the case?
ts
yes, thats exactly teh case (for me). i´ve looked into the lib folder. there is an urllib2.py, an os.py and a traceback.py but no sys.py. i interprete the line "import urllib2, os, sys, traceback" in that way, that python should import these libraries. could the missing sys.py be the problem?
dunno.. i made no changes and it worked fine...
let's try to compare our installs here:
e:/apps/xbmc
the python dir is lowercase
e:/apps/xbmc/python
the lib directory is as follows:
e:/apps/xbmc/python/lib
scripts are in:
e:/apps/xbmc/scripts
not sure what else the problem can be.
ts
i have installed everything in exactly the same folders than you have. hope someone could help. getting the channels through the gui sounds like a dream :)
@tslayer
do you have that sys.py in your lib folder?
sys is hard coded into the python core, you won't find it in the lib dir.
try seperating the import stuff and see where it goes wrong
import urllib2
import os
import sys
import traceback
you´ve been right, its the urllib2.py. but why? whats the difference to other installs?
try copying that lib dir again, maybe something got broken?
and make sure you are using the lib for python 2.3, not some other version
and failing what darkie suggested, i suggest a reinstall.
i had the same error originally when i forgot to uncompress the python.rar. i mean, you have uncompressed it, but all this seem to show that it can't find the file obviously.
i really do suggest carefully going over your directory structure again and check case-sensitivity. otherwise, i have no idea why it would not work.
ts
yes, finally it works!
when i first tried to use python i did this:
"extract the directories from python.rar cvs\xbmc\python\python.rar)" and it didn´t work, as you know ;) then i read the nfo from the binary i downloaded and did this: "for python scripting support, get python.rar from the xbmc-2004-01-02 package" and it works fine now! there seems to be something wrong with the cvs python.rar, could someone please verify this?
i wanna thank you all for your help. python scripting on the xbox seems to be a fantastic possibility to easily develop some extra functions. i will now try to read and understand the python documentation and code some small things on my own to learn about it. again, thank you for this!
omg, forgot to look in here. nice to hear if you like the script.
and yes i have this idea with an online shoutcast browsing, but absolutly no time to implement it. described it somewhere in the forum.
but i think there needs to be more stuff for that:
-button support
-interface to get xbmc's resolution for layouting the ui
thats all i can think about for now...
hi,
i was using with a cupple of cvs version the shoutcast_updater.py. it's still works with 2004-02-01, but does not work anymore with 2004-02-12. i get an urllib2.urlerror. i am using the same python version content and the same script.
anybody else can confirm that?
bye crazyx
thebeast
2004-02-15, 22:10
no i used it with 2-12 today, and the files appear just fine.
strange...is there something special, i did missing up? did you some changes in the xml or somewhere else?
thanks crazyx
IndieRockSteve
2004-02-16, 19:57
i debated whether this should go in bugs or feature requests, but decided its more of a bug than a feature req. so...
file numbering...
i feel this should be an option(to have the files numbered)
but if that doesn't happen, it would be nice to have the number have leading zeros so they sort by number correctly.
thanks!
hi,
i was using with a cupple of cvs version the shoutcast_updater.py. it's still works with 2004-02-01, but does not work anymore with 2004-02-12. i get an urllib2.urlerror. i am using the same python version content and the same script.
anybody else can confirm that?
bye crazyx
i had the same problem and i fixed it by putting my ip address, netmask, gateway on the xml file (it used to load this settings from evox by default).
@r.e.m
yeep...really strange. i have two dns at evox. after changing to the first dns at xml it works now...but i had this problem not with the erlier cvs versions.
thanks for the tip!
bye crazyx