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-12-20 19:02:59 (GMT)
committer erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-12-20 19:02:59 (GMT)
commitd8b2eeabdbcdf71688dec07ece72723c43d5efde (patch)
tree774b7dd61ab12cd8a18194f4e5a9d3065a81601a /model.py
parent86975b24bf574da0091db7a4fd3d950980a90bef (diff)
git-svn-id: http://mediamods.com/public-svn/camera-activity/tags/48@984 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'model.py')
-rw-r--r--model.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/model.py b/model.py
index 45526ec..ba721b7 100644
--- a/model.py
+++ b/model.py
@@ -196,12 +196,12 @@ class Model:
recd = self.createNewRecorded( Constants.TYPE_AUDIO )
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)
@@ -257,9 +257,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)
@@ -318,10 +318,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)
@@ -358,12 +358,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 )
@@ -379,14 +379,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]