CC-1799 Put Airtime Storage into a Human Readable File Naming Convention
working on proper length saving. need to fix substring method to ensure all get same number of subseconds to be consistent.
This commit is contained in:
parent
11d18ad8e8
commit
16cfae10ed
|
@ -47,6 +47,7 @@ class StoredFile {
|
|||
{
|
||||
$this->_file = new CcFiles();
|
||||
$this->_file->setDbGunid(md5(uniqid("", true)));
|
||||
$this->_file->save();
|
||||
|
||||
$this->setMetadata($md);
|
||||
}
|
||||
|
|
|
@ -148,12 +148,13 @@ class MediaMonitor(ProcessEvent):
|
|||
def format_length(self, mutagen_length):
|
||||
t = float(mutagen_length)
|
||||
h = int(math.floor(t/3600))
|
||||
|
||||
t = t % 3600
|
||||
m = int(math.floor(t/60))
|
||||
|
||||
# will be ss.uuu
|
||||
s = t % 60
|
||||
# will be ss.uuu
|
||||
s = str(s)
|
||||
s = s[:6]
|
||||
|
||||
length = "%s:%s:%s" % (h, m, s)
|
||||
|
||||
|
|
Loading…
Reference in New Issue