Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/recorded.py
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2011-05-06 17:32:54 (GMT)
committer Daniel Drake <dsd@laptop.org>2011-05-06 19:04:03 (GMT)
commitecc8ede82ef594a7186e7e597ee9ded823616e59 (patch)
tree02d8fbb6881b6945e67a845778324faf991342fb /recorded.py
parentbb0772a2e8f1e4bccf80a44e8f4afc4f2045c576 (diff)
Fix audio recording when no camera present (SL#2691)
Introduce the relevant code catches to allow audio recording when no camera is present. Still has some rough edges but is now usable at least.
Diffstat (limited to 'recorded.py')
-rw-r--r--recorded.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/recorded.py b/recorded.py
index 27250d3..9296742 100644
--- a/recorded.py
+++ b/recorded.py
@@ -106,20 +106,28 @@ class Recorded:
def getThumbPixbuf( self ):
thumbFilepath = self.getThumbFilepath()
- if os.path.isfile(thumbFilepath):
+ if thumbFilepath and os.path.isfile(thumbFilepath):
return gtk.gdk.pixbuf_new_from_file(thumbFilepath)
else:
return None
def getThumbFilepath( self ):
+ if not self.thumbFilename:
+ return None
return os.path.join(Instance.instancePath, self.thumbFilename)
+ def make_thumb_path(self):
+ thumbFilename = self.mediaFilename + "_thumb.jpg"
+ thumbFilepath = os.path.join(Instance.instancePath, thumbFilename)
+ thumbFilepath = utils.getUniqueFilepath(thumbFilepath, 0)
+ self.thumbFilename = os.path.basename(thumbFilepath)
+ return self.getThumbFilepath()
def getAudioImagePixbuf( self ):
audioPixbuf = None
- if (self.audioImageFilename == None):
+ if self.audioImageFilename == None:
audioPixbuf = self.getThumbPixbuf()
else:
audioFilepath = self.getAudioImageFilepath()