diff options
Diffstat (limited to 'recorded.py')
-rwxr-xr-x | recorded.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/recorded.py b/recorded.py index 03523fd..d4e6d64 100755 --- a/recorded.py +++ b/recorded.py @@ -26,6 +26,7 @@ from instance import Instance import utils import datetime import serialize +import copy class Recorded: def __init__( self, activity ): @@ -42,6 +43,10 @@ class Recorded: self.mediaBytes = None self.thumbBytes = None self.tags = None + + #set location of the files (if it may change upstream) + self.loc = self.activity.Instance.get_path() + self.saveInternal = True #flag to alert need to re-datastore the title self.metaChange = False @@ -54,6 +59,8 @@ class Recorded: self.mediaFilename = None self.thumbFilename = None self.audioImageFilename = None + self.oldFilename = None + self.oldFilepath = None #for flagging when you are being saved to the datastore for the first time... #and just because you have a datastore id, doesn't mean you're saved @@ -146,7 +153,6 @@ class Recorded: else: return self.getThumbFilepath() - def getMediaFilepath(self): if (self.datastoreId == None): if (not self.buddy): @@ -162,8 +168,7 @@ class Recorded: if self.mediaFilename == None: #creating a new filepath, probably just got here from the mesh ext = constants.MEDIA_INFO[self.type]['ext'] - readable = constants.MEDIA_INFO[type]['istr'] + '_' + str(datetime.datetime.now()).replace(' ', '_') - recdPath = os.path.join(self.activity.Instance.get_path(), readable+"_recdFile_"+self.mediaMd5+"."+ext) + recdPath = os.path.join(self.activity.Instance.get_path(), "recdFile_"+self.mediaMd5+"."+ext) recdPath = utils.getUniqueFilepath(recdPath, 0) self.mediaFilename = os.path.basename(recdPath) mediaFilepath = os.path.join(self.activity.Instance.get_path(), self.mediaFilename) |