diff options
author | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2007-10-27 17:11:56 (GMT) |
---|---|---|
committer | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2007-10-27 17:11:56 (GMT) |
commit | 5ad9db679c6f1b29ae44088071e511a5a1161958 (patch) | |
tree | 6266adf17542176ec2327618f81303a463e9bcc8 /recorded.py | |
parent | 0b89b9dd5ba75a18daa7682933eb99f46d0ec9e9 (diff) |
getMediaFilepath fixes for meshReq'd
git-svn-id: http://mediamods.com/public-svn/camera-activity/Record.activity@752 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'recorded.py')
-rw-r--r-- | recorded.py | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/recorded.py b/recorded.py index e546e95..15a0e9b 100644 --- a/recorded.py +++ b/recorded.py @@ -170,24 +170,22 @@ class Recorded: mediaFilepath = os.path.join(self.ca.tempPath, self.mediaFilename) return os.path.abspath(mediaFilepath) else: - if (self.meshDownloading): - print("we are in midst of downloading this file...") + if (meshRequired): + if (self.ca.recTube != None): + self.ca.meshInitRoundRobin(self) + else: + pass + #todo: might want to tell kid to get on the mesh? return None else: - if (meshRequired): - if (self.ca.recTube != None): - self.ca.meshInitRoundRobin(self) - else: - pass - #todo: might want to tell kid to get on the mesh? - return None + if self.mediaFilename == None: + ext = self.ca.m.mediaTypes[self.type][self.ca.keyExt] + recdPath = os.path.join(self.ca.tempPath, "recdFile_"+self.mediaMd5+"."+ext) + recdPath = self.getUniqueFilepath( recdPath, 0 ) + self.mediaFilename = os.path.basename(recdPath) + return self.mediaFilename else: - if self.mediaFilename == None: - ext = self.ca.m.mediaTypes[self.type][self.ca.keyExt] - recdPath = os.path.join(self.ca.tempPath, "recdFile_"+self.mediaMd5+"."+ext) - recdPath = self.getUniqueFilepath( recdPath, 0 ) - self.mediaFilename = os.path.basename(recdPath) - return self.mediaFilename + return self.mediaFilename else: #pulling from the datastore, regardless of who took it, cause we got it #first, get the datastoreObject and hold the reference in this Recorded instance |