PDA

View Full Version : xbmc.PlayList[i].getfilename hangs?


lmm004
2008-10-01, 21:05
I recently updated my xbox xbmc from T3CH-2008-06-01 to T3CH-2008-09-19 and one of my scripts no longer works.

It bombs on the following line:
filename = xbmc.PlayList[count].getfilename

Trying to debug the script using the PC build (Aug 23)

From the log file:
13:56:23 T:1396 M:1198149632 ERROR: CThread::staticThread : Access violation at 0x004a9f7b: Writing location 0x00220026
13:56:23 T:1396 M:1198149632 INFO: Python script stopped
13:56:23 T:1396 M:1198149632 DEBUG: CThread::staticThread, deleting thread graphic context
13:56:23 T:1396 M:1198149632 DEBUG: Thread 1396 terminating
13:56:23 T:3288 M:1198182400 DEBUG: python thread 1 destructed
13:56:23 T:3288 M:1198182400 INFO: Python, unloading python24.dll cause no scripts are running anymore

Nuka1195
2008-10-01, 21:08
your the developer of the script?

if so post the script, that partial log message doesn't help.

if not this belongs in the support thread.

lmm004
2008-10-01, 22:00
I'm not sure "developer" is the right word :) But yes, it's a script I've tossed together.

I've pared it down to a more suitable test case, maybe it's just my crappy coding and I'm doing it wrong, but it's always worked before.

import xbmc, xbmcgui
import os, time, threading

list = "Q:\\UserData\\Video Clips.m3u"

player = xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER)
playlist = xbmc.PlayList(1)
print "Loading " + list
playlist.load(list)
time.sleep(1)
psize = playlist.size()
print 'Playlist size = ' + str(psize)

for count in range (0,psize):
print str(count) + " of " + str(psize)
filename = playlist[count].getfilename
print filename
else:
print "Done searching"

print "Exiting..."

Nuka1195
2008-10-02, 06:01
there is a bug, it is being looked at.

for future reference getfilename is a function, so if you want the result and not a reference to the function include the parenthesis ().

filename = playlist[count].getfilename()