diff --git a/comic_download/comic_strip.py b/comic_download/comic_strip.py index ec89003..9db0cd7 100644 --- a/comic_download/comic_strip.py +++ b/comic_download/comic_strip.py @@ -329,7 +329,9 @@ class Comic(ImageRepo, ABC): :param strip: The comic strip to index """ with self._index_lock: - self.strip_index[strip.identifier] = strip.get_filename() + if not self.identifier in self.strip_index: + self.strip_index[self.identifier] = {} + self.strip_index[self.identifier][strip.identifier] = strip.get_filename() def is_strip_present(self, base_path: Path, suffix: str, identifier) -> bool: """ @@ -340,9 +342,11 @@ class Comic(ImageRepo, ABC): :param identifier: The identifier to check. :returns: True if the strip file has been saved. """ - if not identifier in self.strip_index: + if not self.identifier in self.strip_index: return False - path = Path(base_path, self.strip_index[identifier] + suffix) + if not identifier in self.strip_index[self.identifier]: + return False + path = Path(base_path, self.strip_index[self.identifier][identifier] + suffix) return path.exists() diff --git a/download.sh b/download.sh index fe536f7..466619a 100755 --- a/download.sh +++ b/download.sh @@ -1,9 +1,22 @@ #!/bin/bash -# Copyright (c) 2025 Markil 3 +# This CLI tool allows for the download and packaging of various internet comics into .cbz files. +# Copyright (C) 2025 Markil 3 +# http://www.singlepilot.net +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . path=$(dirname $(realpath $0)) source "$path/venv/bin/activate" -"$path/xkcd.py" --output /mnt/MEDIA/Comics/xkcd -l -"$path/existential_comics.py" --output /mnt/MEDIA/Comics/existential_comics -l -"$path/bluesky.py" --handle fieldexplores.bsky.social --output /mnt/MEDIA/Comics/field_explores +python3 . --output /mnt/MEDIA/Comics/ -l xkcd.com existentialcomics.com bsky.app/profile/fieldexplores.bsky.social