diff options
author | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2007-11-01 13:58:53 (GMT) |
---|---|---|
committer | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2007-11-01 13:58:53 (GMT) |
commit | 9d887bce1e97b612017c56e92391d53fd8efe056 (patch) | |
tree | 116273d6c94d405834bf30f7fd51ea39e3559d98 /serialize.py | |
parent | cde3f1d93a81c753fcaadb6f546a259ec25f5d1e (diff) |
load back in audio image data from the xml
git-svn-id: http://mediamods.com/public-svn/camera-activity/Record.activity@821 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'serialize.py')
-rw-r--r-- | serialize.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/serialize.py b/serialize.py index 2ebe9fe..4d71865 100644 --- a/serialize.py +++ b/serialize.py @@ -155,7 +155,18 @@ def fillRecdFromNode( recd, el ): thumbImg.save(thumbPath, "jpeg", {"quality":"85"} ) recd.thumbFilename = os.path.basename(thumbPath) except: - pass + record.Record.log.error("unable to load recd colorFill") + + ai = el.getAttributeNode(Constants.recdAudioImage) + if (not ai == None): + try: + audioImagePath = os.path.join(Instance.tmpPath, "audioImage.png") + audioImagePath = utils.getUniqueFilepath( audioImagePath, 0 ) + audioImage = utils.getPixbufFromString( ai.nodeValue ) + audioImage.save(audioImagePath, "png", {} ) + recd.audioImageFilename = os.path.basename(audioImagePath) + except: + record.Record.log.error("unable to load audio image") datastoreNode = el.getAttributeNode(Constants.recdDatastoreId) if (datastoreNode != None): |