diff --git a/indexer/src/repository.py b/indexer/src/repository.py index aa6def3..1fa4d67 100644 --- a/indexer/src/repository.py +++ b/indexer/src/repository.py @@ -144,7 +144,10 @@ def get_file_path(self: str, channel: str, file_name: str) -> str: Returns: The file path """ - return os.path.join(settings.files_dir, self.directory, channel, file_name) + file_path = os.path.join(settings.files_dir, self.directory, channel, file_name) + if not os.path.isfile(file_path): + raise FileNotFoundError("File not found, try a newer link!") + return file_path indexes = {