From 2e3bddf12b4f706aee03b2935805122bd65cdb8e Mon Sep 17 00:00:00 2001 From: Fabrice Quenneville Date: Wed, 18 Nov 2020 21:16:35 -0500 Subject: [PATCH] Done moving from script --- mediacurator/curator.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mediacurator/curator.py b/mediacurator/curator.py index 6a787a9..4db52fb 100755 --- a/mediacurator/curator.py +++ b/mediacurator/curator.py @@ -78,7 +78,11 @@ def main(): elif sys.argv[1] == "convert": counter = 0 + + # Pulling list of marked videos / original keys for the medialibrary.videos dictionary keylist = [filepath for filepath in medialibrary.videos if medialibrary.videos[filepath].useful] + keylist.sort() + for filepath in keylist: counter += 1 # Setting required variables @@ -103,9 +107,10 @@ def main(): medialibrary.videos[newfpath] = Video(newfpath) # Vervose - print(f"{BColors.OKGREEN}Successfully converted '{medialibrary.videos[filepath].filename_origin}'{BColors.OKCYAN}({medialibrary.videos[filepath].filesize}mb){BColors.OKGREEN} to '{medialibrary.videos[newfpath].filename_origin}'{BColors.OKCYAN}({medialibrary.videos[newfpath].filesize}mb){BColors.OKGREEN} , {BColors.OKCYAN}new file:{BColors.ENDC}") + print(f"{BColors.OKGREEN}Successfully converted '{medialibrary.videos[filepath].filename_origin}'{BColors.OKCYAN}({medialibrary.videos[filepath].filesize}mb){BColors.OKGREEN} to '{medialibrary.videos[newfpath].filename_origin}'{BColors.OKCYAN}({medialibrary.videos[newfpath].filesize}mb){BColors.OKGREEN}, {BColors.OKCYAN}new file:{BColors.ENDC}") print(medialibrary.videos[newfpath]) + # if marked for deletion delete and unwatch the video if "-del" in sys.argv: medialibrary.unwatch(filepath, delete = True)