diff --git a/import_media.py b/import_media.py index 0c60443..b02c8ba 100644 --- a/import_media.py +++ b/import_media.py @@ -10,7 +10,7 @@ TODO: 8. Optinally allow specification of a backup location on another disk or NAS to ship a 3rd copy to 10. Every config option has an arg override -11. Optionally rename file if event name was passed in +11. Optionally rename file if EVENT name was passed in -- STRETCH -- 12. Make a graphical interface ''' @@ -55,7 +55,9 @@ parser.add_argument("-g", "--generate-config", help = "Generate config file args = parser.parse_args() if args.event: - event = args.event + EVENT = args.event +else: + EVENT = False if args.source: config['folders']['source']['base'] = args.source if args.destination: @@ -191,8 +193,7 @@ def process_file(path, f_type, f_name, ext): files[i]['date']['m'] = files[i]['date']['capture_date'][1] files[i]['date']['d'] = files[i]['date']['capture_date'][2] - - if event: + if EVENT is not False: files[i]['folders']['destination'] = config['folders']['destination']['base'] + \ '/' + files[i]['date']['y'] + '/' + \ files[i]['date']['y'] + '-' + \ @@ -200,7 +201,7 @@ def process_file(path, f_type, f_name, ext): files[i]['date']['y'] + '-' + \ files[i]['date']['m'] + '-' + \ files[i]['date']['d'] + '-' + \ - event + EVENT else: files[i]['folders']['destination'] = config['folders']['destination']['base'] + \ '/' + files[i]['date']['y'] + '/' + \