diff --git a/TODO.md b/TODO.md index 3fb662e..cdfa229 100644 --- a/TODO.md +++ b/TODO.md @@ -17,8 +17,4 @@ Project Modules ------- -* Add notes to every method/function/class -* revisit all models for Instance, Class, and Staticness - * - * - * \ No newline at end of file +* revisit all models for Instance, Class, and Staticness \ No newline at end of file diff --git a/docsource/source/index.rst b/docsource/source/index.rst index 2db3c03..c069375 100644 --- a/docsource/source/index.rst +++ b/docsource/source/index.rst @@ -30,6 +30,7 @@ The source code can be found on `GitHub 0: useful = False - if not self.videos[filepath].hasattr("codec"): - print(filepath) - exit() - # ERT1 if "old" in self.filters and self.videos[filepath].codec not in ["hevc", "av1"]: useful = True if ("mpeg4" in self.filters or "mpeg" in self.filters) and self.videos[filepath].codec in ["mpeg4", "msmpeg4v3"]: @@ -163,7 +174,15 @@ class MediaLibrary(): print(f"{colorama.Fore.GREEN}Found {len([filepath for filepath in self.videos if self.videos[filepath].useful])} videos for the requested parameters{colorama.Fore.RESET}") 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 + + Args: + filepath : A string containing the full filepath + delete = False : Delete the file as well as removing it from the library + + Returns: + boolean : Operation success + ''' if delete: deletefile(filepath) diff --git a/mediacurator/library/video.py b/mediacurator/library/video.py index c94b8e1..42d9239 100644 --- a/mediacurator/library/video.py +++ b/mediacurator/library/video.py @@ -12,25 +12,29 @@ import colorama colorama.init() class Video(): - '''Contains the information and methods of a video file.''' - - ''' - path = str() - filename_origin = str() - filesize = int() - filename_new = str() - filename_tmp = str() - useful = bool() - codec= str() - error = str() - definition = str() - width = int() - height = int() - ''' - + '''Contains the information and methods of a video file.''' def __init__(self, filepath, useful = True, verbose = False): - ''' creates and analyse a video file ''' + '''Contains the information and methods of a video file. + + Args: + filepath : A string containing the full filepath + useful : + verbose : + Returns: + : + ''' + self.path = None + self.filename_origin = None + self.filesize = None + self.filename_new = None + self.filename_tmp = None + self.useful = None + self.codec = None + self.error = None + self.definition = None + self.width = None + self.height = None #Breaking down the full path in its components if os.name == 'nt':