Cleanup before windows fork
This commit is contained in:
parent
e2315c3e7d
commit
a1cfc3a472
Binary file not shown.
@ -20,7 +20,7 @@
|
||||
project = 'MediaCurator'
|
||||
copyright = '2020, Fabrice Quenneville'
|
||||
author = 'Fabrice Quenneville'
|
||||
|
||||
version = '0.0.1'
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
#!/usr/bin/env python3
|
||||
'''Its a video!'''
|
||||
'''Fancy colors!'''
|
||||
|
||||
class BColors:
|
||||
''' from https://stackoverflow.com/questions/287871/how-to-print-colored-text-in-python '''
|
||||
|
||||
HEADER = '\033[95m'
|
||||
OKBLUE = '\033[94m'
|
||||
OKCYAN = '\033[96m'
|
||||
|
||||
@ -42,6 +42,7 @@ class MediaLibrary():
|
||||
|
||||
def __str__(self):
|
||||
''' print '''
|
||||
|
||||
if self.directories:
|
||||
text = f"MediaCurator is watching the following directories: "
|
||||
text += '\n '.join(map(str, self.directories)) + '\n'
|
||||
@ -93,6 +94,7 @@ class MediaLibrary():
|
||||
|
||||
def filter_videos(self, verbose = False):
|
||||
''' Mark useless videos in the videos dictionary (default is useful) '''
|
||||
|
||||
print(f"{BColors.OKGREEN}Filtering {len(self.videos)} videos for the requested parameters{BColors.ENDC}")
|
||||
|
||||
for filepath in self.videos:
|
||||
@ -148,7 +150,7 @@ class MediaLibrary():
|
||||
|
||||
def unwatch(self, filepath, delete = False):
|
||||
''' remove a video from the index and delete it if requested'''
|
||||
# If the user wanted to delete the film and
|
||||
|
||||
if delete:
|
||||
deletefile(filepath)
|
||||
try:
|
||||
|
||||
@ -12,7 +12,7 @@ class Video():
|
||||
|
||||
path = str()
|
||||
filename_origin = str()
|
||||
filesize = int(0)
|
||||
filesize = int()
|
||||
filename_new = str()
|
||||
filename_tmp = str()
|
||||
useful = bool()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user