Fixes a bug with indexing
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user