diff --git a/src/Main.py b/src/Main.py index 57f97ee..cc5252a 100644 --- a/src/Main.py +++ b/src/Main.py @@ -158,7 +158,6 @@ class SeriesApp: index = int(selection) - 1 if 0 <= index < len(results): chosen_name = results[index] - self.List.add(Serie(chosen_name["link"], chosen_name["name"], "aniworld.to", chosen_name["link"], {})) return else: @@ -166,6 +165,7 @@ class SeriesApp: except ValueError: print("Invalid input. Try again.") + def run(self): """Main function to run the app.""" while True: diff --git a/src/SerieScanner.py b/src/SerieScanner.py index db79f5b..0c128ad 100644 --- a/src/SerieScanner.py +++ b/src/SerieScanner.py @@ -31,10 +31,12 @@ class SerieScanner: if (serie != None and not self.is_null_or_whitespace(serie.key)): missings, site = self.__GetMissingEpisodesAndSeason(serie.key, mp4_files) serie.episodeDict = missings + serie.folder = folder serie.save_to_file(os.path.join(os.path.join(self.directory, folder), 'data')) - if folder not in self.folderDict: - self.folderDict[folder] = [] - self.folderDict[folder] = serie + if (serie.key in self.folderDict): + logging.ERROR(f"dublication found: {serie.key}"); + pass + self.folderDict[serie.key] = serie noKeyFound_logger.info(f"Saved Serie: '{str(serie)}'") except NoKeyFoundException as nkfe: NoKeyFoundException.error(f"Error processing folder '{folder}': {nkfe}")