Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSAMdroid <sam.parkinson3@gmail.com>2013-11-29 10:45:52 (GMT)
committer SAMdroid <sam.parkinson3@gmail.com>2013-11-29 10:45:52 (GMT)
commit1f4a04ec58686c1bb6ad922d4c831f34ed039e13 (patch)
tree546091ce18dcf6eaa7cd815630c27408036ebfa7
parent71c469e59635893524bceb686518705e1c78925a (diff)
Fixed issue with audio and video not saving
-rwxr-xr-xmodel.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/model.py b/model.py
index 78a3366..8182cbf 100755
--- a/model.py
+++ b/model.py
@@ -26,6 +26,7 @@ import uuid
import os
import time
import json
+import shutil
import gobject
import gst
@@ -292,7 +293,7 @@ class Model:
# called from gstreamer thread
def save_video(self, path, still):
recd = self.createNewRecorded(constants.TYPE_VIDEO)
- os.rename(path, os.path.join(self.activity.Instance.get_path(), recd.mediaFilename))
+ shutil.move(path, os.path.join(self.activity.Instance.get_path(), recd.mediaFilename))
still = utils.generate_thumbnail(still)
still.save(recd.make_thumb_path(), "png")
@@ -304,7 +305,7 @@ class Model:
def save_audio(self, path, still):
recd = self.createNewRecorded(constants.TYPE_AUDIO)
- os.rename(path, os.path.join(self.activity.Instance.get_path(), recd.mediaFilename))
+ shutil.move(path, os.path.join(self.activity.Instance.get_path(), recd.mediaFilename))
if still:
image_path = os.path.join(self.activity.Instance.get_path(), "audioPicture.png")