diff options
author | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2007-11-01 17:58:13 (GMT) |
---|---|---|
committer | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2007-11-01 17:58:13 (GMT) |
commit | 713999337f755484a3231f6830bb24e85d4e1ab0 (patch) | |
tree | 9634074eac781fa541172ec81922301748f7b41f /recorded.py | |
parent | 5f87cc2508bd953837423dc2f43fdbb58140b280 (diff) |
handling multiple instances of myself and tmp media too
git-svn-id: http://mediamods.com/public-svn/camera-activity/Record.activity@831 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'recorded.py')
-rw-r--r-- | recorded.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/recorded.py b/recorded.py index 6e22bfe..eaeeef5 100644 --- a/recorded.py +++ b/recorded.py @@ -99,23 +99,26 @@ class Recorded: #relaunch, their old media -- datastoreObject->file (hold onto the datastore object, delete if deleted) | ([request->]) Journal/session/buddy def getThumbPixbuf( self ): + record.Record.log.debug("getThumbPixbuf: self.datastoreId="+str(self.datastoreId)) if (self.datastoreId == None): #just taken, so it is in the tempSessionDir #so load file, convert to pixbuf, and return it here... thumbPixbuf = None + record.Record.log.debug("getThumbPixbuf: thumbfilename:" + str(self.thumbFilename)) thumbFilepath = os.path.join(Instance.tmpPath, self.thumbFilename) if ( os.path.isfile(thumbFilepath) ): thumbPixbuf = gtk.gdk.pixbuf_new_from_file(thumbFilepath) + record.Record.log.debug("getThumbPixbuf: returning thumbPixbuf->"+str(thumbPixbuf)) return thumbPixbuf else: #todo: handle possible corruption of the preview into some other format - if (self.datastoreOb == None): self.datastoreOb = serialize.getMediaFromDatastore( self ) if (self.datastoreOb == None): - print("RecordActivity error -- unable to get datastore object in getThumbPixbuf") + record.Record.log.debug("getThumbPixbuf: datastoreOb==None") return None + record.Record.log.debug("getThumbPixbuf: got datastore Ob!") return utils.getPixbufFromString( self.datastoreOb.metadata['preview'] ) @@ -124,6 +127,7 @@ class Recorded: #just taken, so it is in the tempSessionDir #so load file, convert to pixbuf, and return it here... thumbPixbuf = None + record.Record.log.debug("getThumbFilepath: thumbfilename:" + str(self.thumbFilename)) thumbFilepath = os.path.join(Instance.tmpPath, self.thumbFilename) if ( os.path.isfile(thumbFilepath) ): return thumbFilepath |