Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gplay.py7
-rw-r--r--instance.py5
-rwxr-xr-xp5.py5
-rw-r--r--serialize.py2
4 files changed, 9 insertions, 10 deletions
diff --git a/gplay.py b/gplay.py
index c772a1e..eb43d5e 100644
--- a/gplay.py
+++ b/gplay.py
@@ -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
diff --git a/p5.py b/p5.py
index bd128e5..a0f43b8 100755
--- a/p5.py
+++ b/p5.py
@@ -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