XBMC Community Forum  

Go Back   XBMC Community Forum > Development > Plugin/Script (Python) Development

Plugin/Script (Python) Development Developers forum for XBMC Python Plugins/Scripts. Scripters/coders only!
Not for posting feature requests, bugs, or end-user support requests!

Reply
 
Thread Tools Search this Thread Display Modes
Old 2004-01-04, 13:47   #1
NEI
Member
 
Join Date: Nov 2003
Posts: 108
NEI is on a distinguished road
Default

just wanted to autostart a shoutcaststream, but this won't work at the moment. don't know if it's a bug or not supported.
NEI is offline   Reply With Quote
Old 2004-01-04, 15:09   #2
darkie
Team-XBMC Developer
 
Join Date: Sep 2003
Posts: 530
darkie is on a distinguished road
Default

how do you autostart it?
xbmc.mediaplay("file.pls")
or
xbmc.mediaplay("http://shoutcast") ?

the last should work, the first shouldn't.
__________________
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


darkie is offline   Reply With Quote
Old 2004-01-04, 22:36   #3
NEI
Member
 
Join Date: Nov 2003
Posts: 108
NEI is on a distinguished road
Default

nice, will try it later.

*****edited:
forget everything. it's almost working. the problem is something with the xfs i have to check later...
*****
btw, as you are the python guru... :-)
could you give me an example how to make directories and remove them. can i access the f: drive through python?
i wrote a shoutcast-pls-updater this afternoon, but can't get it to work on the xbox. works nice on winxp, but thats not what i want! :-)
i'm new to python, here the relevant functions:

...
shoutcast_dir = 'f:/music/radio/'
...
#got this one from somewhere here in the forum, but doesn't work on the box:
def clean_dir(dirname):
for root, dirs, files in os.walk(dirname):
for name in files:
os.remove(join(root, name))

#creates missing directories for the given path
def make_path(path):
dpath = normpath(dirname(path))
if not exists(dpath): makedirs(dpath)
return normpath(abspath(path))


# saves the content under the given path. (i.e. dir=f:/music/shoutcast/ filename=blabla.pls)
def save_file(dir, filename, content):
make_path(dir)
file = open(dir + filename, 'w')
file.writelines(content)
file.close

thanx a lot
n8
NEI is offline   Reply With Quote
Old 2004-01-05, 00:01   #4
darkie
Team-XBMC Developer
 
Join Date: Sep 2003
Posts: 530
darkie is on a distinguished road
Default

just a quick look
'/' is not supported in python for xbmc
use '\\' instead

shoutcast_dir = 'f:\\music\\radio'
__________________
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


darkie is offline   Reply With Quote
Old 2004-01-05, 01:00   #5
Hullebulle
Fan
 
Join Date: Sep 2003
Posts: 1,972
Hullebulle is on a distinguished road
Default

since this turns into python scripting i move it to the "development" forum.
__________________
read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
Hullebulle is offline   Reply With Quote
Old 2004-01-07, 22:13   #6
NEI
Member
 
Join Date: Nov 2003
Posts: 108
NEI is on a distinguished road
Default

k, i tried:

file = 'http://www.shoutcast.com/sbin/shoutc...ename.pls'
xbmc.mediaplay(file)

but its not working! :-(
NEI is offline   Reply With Quote
Old 2004-01-08, 00:13   #7
darkie
Team-XBMC Developer
 
Join Date: Sep 2003
Posts: 530
darkie is on a distinguished road
Default

xbmc.mediaplay('http://addicted.puredj.com:8000') should work. i'll test it soon to see if it really does :-)

edit:

it does work, only http should be replaced by shout
xbmc.mediaplay('shout://addicted.puredj.com:8000')



__________________
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


darkie is offline   Reply With Quote
Old 2004-01-08, 10:36   #8
NEI
Member
 
Join Date: Nov 2003
Posts: 108
NEI is on a distinguished road
Default

oh cool! finally i can autostart my preffered shoutcast station without having to turn on my projector! :-)

thnx

btw, the python stuff is great! i'm even thinking about doing a script wich would let you browse online the shoutcast stations and playing them. something like a "my radio" button in the root menu. but unfortunatly i don't have much time and not a lot of python experience.
NEI is offline   Reply With Quote
Old 2004-01-08, 11:23   #9
febs
Senior Member
 
Join Date: Oct 2003
Posts: 205
febs is on a distinguished road
Default

Quote:
Originally Posted by (nei @ jan. 08 2004,08:36)
oh cool! finally i can autostart my preffered shoutcast station without having to turn on my projector! :-)
so you can use xbmc as a dashboard?
febs is offline   Reply With Quote
Old 2004-01-08, 12:17   #10
floink
Senior Member
 
floink's Avatar
 
Join Date: Oct 2003
Location: Sweden
Posts: 380
floink is on a distinguished road
Default

Quote:
Originally Posted by (febs @ jan. 08 2004,09:23)
so you can use xbmc as a dashboard?
i think yes, if you copy all files to c-drive like other dashboards. remeber seeing that in some thread here earlier. and ofcourse edit default.xbe or your bios to the name you use to boot.
floink is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
is my python working? dtgorm Plugin/Script (Python) Help and Support 4 2005-12-16 19:07
Imdb not working, cddb and weather is working Kwan112 XBMC for Xbox Specific Support 9 2005-01-31 14:10
Imdb not working, cddb and weather is working Kwan112 XBMC for Xbox Specific Support 1 2005-01-25 18:54
python not working but it use to wesleychef XBMC for Xbox Specific Support 1 2004-07-12 03:24
Python mediaplay() not working NEI XBMC for Xbox Specific Support 4 2004-01-05 01:00


All times are GMT +2. The time now is 14:49.


Protected by Akismet, We recommend WordPress blogs
Copyright © 2008, XBMC Project