Working on broken filter
This commit is contained in:
parent
5f33525f24
commit
1b3390d349
@ -91,10 +91,30 @@ def main():
|
|||||||
|
|
||||||
# if marked for deletion delete and unwatch the video
|
# if marked for deletion delete and unwatch the video
|
||||||
if "-del" in sys.argv:
|
if "-del" in sys.argv:
|
||||||
medialibrary.unwatch(filepath, delete = True)
|
#medialibrary.unwatch(filepath, delete = True)
|
||||||
|
pass
|
||||||
elif sys.argv[1] == "test":
|
elif sys.argv[1] == "test":
|
||||||
print(medialibrary)
|
|
||||||
exit()
|
# 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:
|
||||||
|
if medialibrary.videos[filepath].useful:
|
||||||
|
if "formated" in printop or "verbose" in printop:
|
||||||
|
if medialibrary.videos[filepath].error:
|
||||||
|
print(f"{BColors.FAIL}{medialibrary.videos[filepath].fprint()}{BColors.ENDC}")
|
||||||
|
else:
|
||||||
|
print(medialibrary.videos[filepath].fprint())
|
||||||
|
else:
|
||||||
|
if medialibrary.videos[filepath].error:
|
||||||
|
print(f"{BColors.FAIL}{medialibrary.videos[filepath]}{BColors.ENDC}")
|
||||||
|
else:
|
||||||
|
print(medialibrary.videos[filepath])
|
||||||
|
|
||||||
|
# if marked for deletion delete and unwatch the video
|
||||||
|
if "-del" in sys.argv:
|
||||||
|
medialibrary.unwatch(filepath, delete = True)
|
||||||
|
|
||||||
elif sys.argv[1] == "convert":
|
elif sys.argv[1] == "convert":
|
||||||
counter = 0
|
counter = 0
|
||||||
@ -148,7 +168,8 @@ def main():
|
|||||||
|
|
||||||
# if marked for deletion delete and unwatch the video
|
# if marked for deletion delete and unwatch the video
|
||||||
if "-del" in sys.argv:
|
if "-del" in sys.argv:
|
||||||
medialibrary.unwatch(filepath, delete = True)
|
#medialibrary.unwatch(filepath, delete = True)
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -117,7 +117,7 @@ class MediaLibrary():
|
|||||||
self.videos[filepath].useful = useful
|
self.videos[filepath].useful = useful
|
||||||
|
|
||||||
# keep video if useful and user wants to also filter by selected resolutions
|
# keep video if useful and user wants to also filter by selected resolutions
|
||||||
if self.videos[filepath].useful and len([filtr for filtr in self.filters if filtr in ["lowres", "subsd", "hd", "sd", "720p", "1080p", "uhd"]]) > 0:
|
if self.videos[filepath].useful and len([filtr for filtr in self.filters if filtr in ["lowres", "hd", "subsd", "sd", "720p", "1080p", "uhd"]]) > 0:
|
||||||
useful = False
|
useful = False
|
||||||
|
|
||||||
if "subsd" in self.filters and self.videos[filepath].definition in ["subsd"]:
|
if "subsd" in self.filters and self.videos[filepath].definition in ["subsd"]:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user