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-14 04:03:14 (GMT)
committer erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-12-14 04:03:14 (GMT)
commitf706c43145128d40f8c639059800fe7282abe063 (patch)
tree9be98c6f44599722a4469fd08349a9c03d23197d /model.py
parent24abbc6129ac8b3b24eb30aa474fe5792239c817 (diff)
46 has correct rainbow tmp directories
git-svn-id: http://mediamods.com/public-svn/camera-activity/tags/46@973 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 ba721b7..45526ec 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.instancePath, recd.thumbFilename)
+ thumbPath = os.path.join(Instance.tmpPath, 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.instancePath, "audioPicture.png")
+ imagePath = os.path.join(Instance.tmpPath, "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.instancePath,recd.mediaFilename))
+ os.rename( tmpPath, os.path.join(Instance.tmpPath,recd.mediaFilename))
- thumbPath = os.path.join(Instance.instancePath, recd.thumbFilename)
+ thumbPath = os.path.join(Instance.tmpPath, 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.instancePath, recd.mediaFilename)
+ imgpath = os.path.join(Instance.tmpPath, recd.mediaFilename)
pixbuf.save( imgpath, "jpeg" )
- thumbpath = os.path.join(Instance.instancePath, recd.thumbFilename)
+ thumbpath = os.path.join(Instance.tmpPath, 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.instancePath, mediaFilename )
+ mediaFilepath = os.path.join( Instance.tmpPath, mediaFilename )
mediaFilepath = utils.getUniqueFilepath( mediaFilepath, 0 )
recd.mediaFilename = os.path.basename( mediaFilepath )
thumbFilename = mediaThumbFilename + "_thumb.jpg"
- thumbFilepath = os.path.join( Instance.instancePath, thumbFilename )
+ thumbFilepath = os.path.join( Instance.tmpPath, 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.instancePath, recd.thumbFilename)
+ thumbFile = os.path.join(Instance.tmpPath, 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.instancePath, recd.mediaFilename)
+ mediaFile = os.path.join(Instance.tmpPath, recd.mediaFilename)
mediaMd5 = utils.md5File( mediaFile )
recd.mediaMd5 = mediaMd5
mBytes = os.stat(mediaFile)[6]