Done moving from script

This commit is contained in:
Fabrice Quenneville 2020-11-18 21:16:35 -05:00
parent 76ceedfd2b
commit 2e3bddf12b

View File

@ -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
@ -106,6 +110,7 @@ def main():
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)