Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/model.py
diff options
context:
space:
mode:
authorerikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-11-15 03:51:16 (GMT)
committer erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-11-15 03:51:16 (GMT)
commite6dc6339ce3568fe5fc6cf25bb803c0cb5feda8b (patch)
tree6ee1911b4f0239d3f112e93d0f8d7e3b8df2d729 /model.py
parent25395014e74856ac77750b85ce220606e7f7b3af (diff)
v40 changes
git-svn-id: http://mediamods.com/public-svn/camera-activity/Record.activity@900 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'model.py')
-rw-r--r--model.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/model.py b/model.py
index 014f7f9..bec3662 100644
--- a/model.py
+++ b/model.py
@@ -181,14 +181,14 @@ class Model:
self.setUpdating( True )
recd = self.createNewRecorded( Constants.TYPE_AUDIO )
- os.rename( tmpPath, os.path.join(Instance.tmpPath,recd.mediaFilename))
+ os.rename( tmpPath, os.path.join(Instance.instancePath,recd.mediaFilename))
- thumbPath = os.path.join(Instance.tmpPath, recd.thumbFilename)
+ thumbPath = os.path.join(Instance.instancePath, recd.thumbFilename)
scale = float((UI.dim_THUMB_WIDTH+0.0)/(pixbuf.get_width()+0.0))
thumbImg = utils.generateThumbnail(pixbuf, scale, UI.dim_THUMB_WIDTH, UI.dim_THUMB_HEIGHT)
thumbImg.write_to_png(thumbPath)
- imagePath = os.path.join(Instance.tmpPath, "audioPicture.png")
+ imagePath = os.path.join(Instance.instancePath, "audioPicture.png")
imagePath = utils.getUniqueFilepath( imagePath, 0 )
pixbuf.save( imagePath, "png", {} )
recd.audioImageFilename = os.path.basename(imagePath)
@@ -244,9 +244,9 @@ class Model:
def saveVideo( self, pixbuf, tmpPath, wid, hit ):
recd = self.createNewRecorded( Constants.TYPE_VIDEO )
- os.rename( tmpPath, os.path.join(Instance.tmpPath,recd.mediaFilename))
+ os.rename( tmpPath, os.path.join(Instance.instancePath,recd.mediaFilename))
- thumbPath = os.path.join(Instance.tmpPath, recd.thumbFilename)
+ thumbPath = os.path.join(Instance.instancePath, recd.thumbFilename)
scale = float((UI.dim_THUMB_WIDTH+0.0)/(wid+0.0))
thumbImg = utils.generateThumbnail(pixbuf, scale, UI.dim_THUMB_WIDTH, UI.dim_THUMB_HEIGHT)
thumbImg.write_to_png(thumbPath)
@@ -305,10 +305,10 @@ class Model:
def savePhoto( self, pixbuf ):
recd = self.createNewRecorded( Constants.TYPE_PHOTO )
- imgpath = os.path.join(Instance.tmpPath, recd.mediaFilename)
+ imgpath = os.path.join(Instance.instancePath, recd.mediaFilename)
pixbuf.save( imgpath, "jpeg" )
- thumbpath = os.path.join(Instance.tmpPath, recd.thumbFilename)
+ thumbpath = os.path.join(Instance.instancePath, recd.thumbFilename)
scale = float((UI.dim_THUMB_WIDTH+0.0)/(pixbuf.get_width()+0.0))
thumbImg = utils.generateThumbnail(pixbuf, scale, UI.dim_THUMB_WIDTH, UI.dim_THUMB_HEIGHT)
thumbImg.write_to_png(thumbpath)
@@ -345,12 +345,12 @@ class Model:
mediaThumbFilename = str(recd.recorderHash) + "_" + str(recd.time)
mediaFilename = mediaThumbFilename
mediaFilename = mediaFilename + "." + Constants.mediaTypes[type][Constants.keyExt]
- mediaFilepath = os.path.join( Instance.tmpPath, mediaFilename )
+ mediaFilepath = os.path.join( Instance.instancePath, mediaFilename )
mediaFilepath = utils.getUniqueFilepath( mediaFilepath, 0 )
recd.mediaFilename = os.path.basename( mediaFilepath )
thumbFilename = mediaThumbFilename + "_thumb.jpg"
- thumbFilepath = os.path.join( Instance.tmpPath, thumbFilename )
+ thumbFilepath = os.path.join( Instance.instancePath, thumbFilename )
thumbFilepath = utils.getUniqueFilepath( thumbFilepath, 0 )
recd.thumbFilename = os.path.basename( thumbFilepath )
@@ -365,14 +365,14 @@ class Model:
def createNewRecordedMd5Sums( self, recd ):
#load the thumbfile
- thumbFile = os.path.join(Instance.tmpPath, recd.thumbFilename)
+ thumbFile = os.path.join(Instance.instancePath, recd.thumbFilename)
thumbMd5 = utils.md5File( thumbFile )
recd.thumbMd5 = thumbMd5
tBytes = os.stat(thumbFile)[6]
recd.thumbBytes = tBytes
#load the mediafile
- mediaFile = os.path.join(Instance.tmpPath, recd.mediaFilename)
+ mediaFile = os.path.join(Instance.instancePath, recd.mediaFilename)
mediaMd5 = utils.md5File( mediaFile )
recd.mediaMd5 = mediaMd5
mBytes = os.stat(mediaFile)[6]