diff options
author | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2007-09-05 14:44:58 (GMT) |
---|---|---|
committer | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2007-09-05 14:44:58 (GMT) |
commit | 08df68716f868764e09c9d2155e54461f33ef11d (patch) | |
tree | af4d55a11463e6965aeec13ef099f120c655b9f2 /recorded.py | |
parent | fecdecc4fb6c1246d67a92db16636975de9259e6 (diff) |
back to saving audio image in the xml
git-svn-id: http://mediamods.com/public-svn/camera-activity/Record.activity@431 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'recorded.py')
-rw-r--r-- | recorded.py | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/recorded.py b/recorded.py index 8d7dc70..090278b 100644 --- a/recorded.py +++ b/recorded.py @@ -139,39 +139,16 @@ class Recorded: def getAudioImagePixbuf( self ): audioPixbuf = None - if ( (self.datastoreId==None) and (not self.saved) ): - audioFilepath = self.getAudioImageFilepath() - if (audioFilepath != None): - audioPixbuf = gtk.gdk.pixbuf_new_from_file(audioFilepath) - else: - if (self.datastoreOb == None): - self.ca.m.loadMediaFromDatastore( self ) - if (self.datastoreOb == None): - print("RecordActivity error -- unable to get datastore object in getAudioImage") - return None - - #todo: make a static function here: - pbl = gtk.gdk.PixbufLoader() - import base64 - data = base64.b64decode(self.datastoreOb.metadata['audioImage']) - pbl.write(data) - pbl.close() - audioPixbuf = pbl.get_pixbuf() + audioFilepath = self.getAudioImageFilepath() + if (audioFilepath != None): + audioPixbuf = gtk.gdk.pixbuf_new_from_file(audioFilepath) return audioPixbuf def getAudioImageFilepath( self ): - if (self.datastoreId == None): - audioFilepath = os.path.join(self.ca.journalPath, self.audioImageFilename) - return os.path.abspath(audioFilepath) - else: - pixbuf = self.getAudioImagePixbuf() - if (pixbuf == None): - return None - audioImageFilepath = os.path.join(self.ca.journalPath, "audioImage.png") - pixbuf.save(audioImageFilepath, "png", {} ) - return audioImageFilepath + audioFilepath = os.path.join(self.ca.journalPath, self.audioImageFilename) + return os.path.abspath(audioFilepath) def getMediaFilepath( self, meshReq ): |