Fixes some bugs with the indexer
This commit is contained in:
@@ -158,9 +158,9 @@ def index_strip(strip):
|
||||
global _index_loaded
|
||||
global _index_lock
|
||||
with _index_lock:
|
||||
if not strip.comic.identifier in strip_index:
|
||||
if not strip.comic.get_identifier_string() in strip_index:
|
||||
strip_index[strip.comic.get_identifier_string()] = {}
|
||||
strip_index[strip.comic.get_identifier_string()][strip.identifier] = strip.get_filename()
|
||||
strip_index[strip.comic.get_identifier_string()][strip.get_identifier_string()] = strip.get_filename()
|
||||
|
||||
def is_strip_present(comic, base_path: Path, suffix: str, identifier) -> bool:
|
||||
"""
|
||||
@@ -177,9 +177,9 @@ def is_strip_present(comic, base_path: Path, suffix: str, identifier) -> bool:
|
||||
global _index_lock
|
||||
if not comic.get_identifier_string() in strip_index:
|
||||
return False
|
||||
if not identifier in strip_index[comic.get_identifier_string()]:
|
||||
if not get_identifier_string(identifier) in strip_index[comic.get_identifier_string()]:
|
||||
return False
|
||||
path = Path(base_path, strip_index[comic.get_identifier_string()][identifier] + suffix)
|
||||
path = Path(base_path, strip_index[comic.get_identifier_string()][get_identifier_string(identifier)] + suffix)
|
||||
return path.exists()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user