Posts: 16
Joined: May 2007
Reputation:
0
koprom
Junior Member
Posts: 16
2007-05-20, 10:17
I've found out that the problem is the address of the file. If i put a file test.ogg to drive E on the xbox i can play this file without any problems. Is this function limited to files from local drives? or is smb mapped to specific drive letter?
Greetings
koprom
Posts: 16
Joined: May 2007
Reputation:
0
koprom
Junior Member
Posts: 16
2007-05-21, 09:48
I can't get the xbox to play the file. Tried every combinatino of slashes or backslashes in the location of the file. It doesn't work. I thought it would be enough to concatenate the 'strPath' Value from the database-table path and the 'strFileName' Value from the table song. But this doesn't work? Are Python scripts limited to local files?
Greetings
koprom
Posts: 382
Joined: Aug 2006
Reputation:
0
try using this instead
XBMC.PlayMedia(medialocation) for example
XBMC.PlayMedia(F/stuff/test.avi)
Posts: 16
Joined: May 2007
Reputation:
0
koprom
Junior Member
Posts: 16
Now python gives the error message: module 'xbmc' has no attribute 'PlayMedia'
Greetings koprom
Posts: 53
Joined: Dec 2005
Reputation:
0
Is this in Python?
You can give this a try:
file = "F:\music\test.mp3"
print xbmc.executebuiltin('xbmc.playmedia(' + file + ')')
print xbmc.executehttpapi("AddToPlaylist("+file+");0")
command=PlayFile¶meter=F:\music\test.mp3
Posts: 16
Joined: May 2007
Reputation:
0
koprom
Junior Member
Posts: 16
2007-05-24, 09:36
Okay i've found the solution. With the python function 'type' i found out that sqlite does not return objects of the type 'str' (as play needs them) but unicode objects (which play regrets)!
The solution is every unicode object has a function encode('charset') where charset could be 'utf-8' which i use at the moment. This function return a 'str' object with the (hopefully) the same contents as the unicode object.
Greetings
koprom