CC-2421 : Filename formatting tweaks
padding track numbers with 1 leading zero if 0-9 formatting bitrate 128000 as 128kbps
This commit is contained in:
parent
fbf5f85509
commit
3f739458cd
|
@ -166,6 +166,13 @@ class AirtimeProcessEvent(ProcessEvent):
|
|||
else:
|
||||
md[m] = orig_md[m]
|
||||
|
||||
#make sure all track numbers are at least 2 digits long in the filepath.
|
||||
if len(str(md['MDATA_KEY_TRACKNUMBER'])) == 1:
|
||||
md['MDATA_KEY_TRACKNUMBER'] = "0"+str(md['MDATA_KEY_TRACKNUMBER'])
|
||||
|
||||
#format bitrate as 128kbps
|
||||
md['MDATA_KEY_BITRATE'] = str(md['MDATA_KEY_BITRATE'])[0:3]+"kbps"
|
||||
|
||||
filepath = None
|
||||
#file is recorded by Airtime
|
||||
#/srv/airtime/stor/recorded/year/month/year-month-day-time-showname-bitrate.ext
|
||||
|
|
Loading…
Reference in New Issue