diff --git a/install_minimal/upgrades/airtime-1.9.0/media-monitor-upgrade.py b/install_minimal/upgrades/airtime-1.9.0/media-monitor-upgrade.py index f42d942ae..7ccc68bf1 100644 --- a/install_minimal/upgrades/airtime-1.9.0/media-monitor-upgrade.py +++ b/install_minimal/upgrades/airtime-1.9.0/media-monitor-upgrade.py @@ -9,6 +9,7 @@ import json import ConfigParser import pwd import grp +import subprocess import os.path @@ -48,9 +49,14 @@ mmc.set_needed_file_permissions(organize_dir, True) pairs = [] for root, dirs, files in os.walk(mmconfig.storage_directory): for f in files: - #print os.path.join(root, f) - #print mmc.organize_new_file(os.path.join(root, f)) - pair = os.path.join(root, f), mmc.organize_new_file(os.path.join(root, f)) + old_filepath = os.path.join(root, f) + new_filepath = mmc.organize_new_file(os.path.join(root, f)) + pair = old_filepath, new_filepath pairs.append(pair) + mmc.set_needed_file_permissions(new_filepath, False) + +#need to set all the dirs in imported to be owned by www-data. +command = "chown -R www-data " + stor_dir +subprocess.call(command.split(" ")) print json.dumps(pairs) diff --git a/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py b/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py index aca32f6e4..fa1fcbd8f 100644 --- a/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py +++ b/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py @@ -179,10 +179,8 @@ class MediaMonitorCommon: else: md[m] = orig_md[m] - self.logger.debug(md['MDATA_KEY_TRACKNUMBER']) if 'MDATA_KEY_TRACKNUMBER' in orig_md: #make sure all track numbers are at least 2 digits long in the filepath. - self.logger.debug("formatting track number") md['MDATA_KEY_TRACKNUMBER'] = "%02d" % (int(md['MDATA_KEY_TRACKNUMBER'])) #format bitrate as 128kbps