diff options
-rw-r--r-- | gplay.py | 7 | ||||
-rw-r--r-- | instance.py | 5 | ||||
-rwxr-xr-x | p5.py | 5 | ||||
-rw-r--r-- | serialize.py | 2 |
4 files changed, 9 insertions, 10 deletions
@@ -32,6 +32,8 @@ import gobject import time gobject.threads_init() +import record + class Gplay: def __init__(self, pca): @@ -78,8 +80,9 @@ class Gplay: self.getPlayer().set_state(gst.STATE_READY) self.getPlayer().set_property('uri', location) - ext = location[len(location):] - if (ext == "jpg") or (ext == "png"): + ext = location[len(location)-3:] + record.Record.log.debug("setLocation:"+str(ext)) + if (ext == "jpg"): self.pause() diff --git a/instance.py b/instance.py index 4f0115b..620f47e 100644 --- a/instance.py +++ b/instance.py @@ -31,8 +31,9 @@ class Instance: def recreateTmp(): #todo: figure out how to have multiple spaces for my media + #problem is, if new instance is created, with this code, it clears the whole tmp directory! #if (os.path.exists(Instance.tmpPath)): # shutil.rmtree(Instance.tmpPath) - - os.makedirs(Instance.tmpPath) + if (not os.path.exists(Instance.tmpPath)): + os.makedirs(Instance.tmpPath) record.Record.log.debug("Instance.tmpPath:" + str(Instance.tmpPath))
\ No newline at end of file @@ -153,11 +153,6 @@ class P5(gtk.DrawingArea): ctx.fill() - def loadImage(self, name): - image = cairo.ImageSurface.create_from_png( name ) - return image - - def background( self, ctx, col, w, h ): self.setColor( ctx, col ) diff --git a/serialize.py b/serialize.py index e3fbde5..25d183f 100644 --- a/serialize.py +++ b/serialize.py @@ -294,7 +294,7 @@ def _saveMediaToDatastore( el, recd ): mediaObject.metadata['title'] = recd.title pixbuf = recd.getThumbPixbuf() - record.Record.debug("serialize: pizbuf->" + str(pixbuf)) + record.Record.log.debug("serialize: pixbuf->" + str(pixbuf)) thumbData = utils.getStringFromPixbuf(pixbuf) mediaObject.metadata['preview'] = thumbData |