Cleanup before windows fork

This commit is contained in:
Fabrice Quenneville 2020-12-13 21:02:08 -05:00
parent e2315c3e7d
commit a1cfc3a472
5 changed files with 9 additions and 5 deletions

View File

@ -20,7 +20,7 @@
project = 'MediaCurator' project = 'MediaCurator'
copyright = '2020, Fabrice Quenneville' copyright = '2020, Fabrice Quenneville'
author = 'Fabrice Quenneville' author = 'Fabrice Quenneville'
version = '0.0.1'
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
@ -51,4 +51,4 @@ html_theme = 'alabaster'
# so a file named "default.css" will overwrite the builtin "default.css". # so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static'] html_static_path = ['_static']
html_logo = '_static/mclogo4x.png' html_logo = '_static/mclogo4x.png'
html_favicon = '_static/favicon.ico' html_favicon = '_static/favicon.ico'

View File

@ -1,7 +1,9 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
'''Its a video!''' '''Fancy colors!'''
class BColors: class BColors:
''' from https://stackoverflow.com/questions/287871/how-to-print-colored-text-in-python '''
HEADER = '\033[95m' HEADER = '\033[95m'
OKBLUE = '\033[94m' OKBLUE = '\033[94m'
OKCYAN = '\033[96m' OKCYAN = '\033[96m'

View File

@ -42,6 +42,7 @@ class MediaLibrary():
def __str__(self): def __str__(self):
''' print ''' ''' print '''
if self.directories: if self.directories:
text = f"MediaCurator is watching the following directories: " text = f"MediaCurator is watching the following directories: "
text += '\n '.join(map(str, self.directories)) + '\n' text += '\n '.join(map(str, self.directories)) + '\n'
@ -93,6 +94,7 @@ class MediaLibrary():
def filter_videos(self, verbose = False): def filter_videos(self, verbose = False):
''' Mark useless videos in the videos dictionary (default is useful) ''' ''' 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}") print(f"{BColors.OKGREEN}Filtering {len(self.videos)} videos for the requested parameters{BColors.ENDC}")
for filepath in self.videos: for filepath in self.videos:
@ -148,7 +150,7 @@ class MediaLibrary():
def unwatch(self, filepath, delete = False): def unwatch(self, filepath, delete = False):
''' remove a video from the index and delete it if requested''' ''' remove a video from the index and delete it if requested'''
# If the user wanted to delete the film and
if delete: if delete:
deletefile(filepath) deletefile(filepath)
try: try:

View File

@ -12,7 +12,7 @@ class Video():
path = str() path = str()
filename_origin = str() filename_origin = str()
filesize = int(0) filesize = int()
filename_new = str() filename_new = str()
filename_tmp = str() filename_tmp = str()
useful = bool() useful = bool()