Add guest cast and crew directories to cache structure; update file check logic

This commit is contained in:
2025-12-12 07:13:40 -05:00
parent e975b947fa
commit 7dfe22fe71
+5 -1
View File
@@ -86,7 +86,9 @@ def main() -> int:
directories["SERIESDIR"] = os.path.join(ROOTDIR, "cache", "series") + os.sep directories["SERIESDIR"] = os.path.join(ROOTDIR, "cache", "series") + os.sep
directories["EPISODEDIR"] = os.path.join(ROOTDIR, "cache", "episodes") + os.sep directories["EPISODEDIR"] = os.path.join(ROOTDIR, "cache", "episodes") + os.sep
directories["CASTDIR"] = os.path.join(ROOTDIR, "cache", "cast") + os.sep directories["CASTDIR"] = os.path.join(ROOTDIR, "cache", "cast") + os.sep
directories["GUESTCASTDIR"] = os.path.join(ROOTDIR, "cache", "guestcast") + os.sep
directories["CREWDIR"] = os.path.join(ROOTDIR, "cache", "crew") + os.sep directories["CREWDIR"] = os.path.join(ROOTDIR, "cache", "crew") + os.sep
directories["GUESTCREWDIR"] = os.path.join(ROOTDIR, "cache", "guestcrew") + os.sep
directories["CREDITSDIR"] = os.path.join(ROOTDIR, "cache", "credits") + os.sep directories["CREDITSDIR"] = os.path.join(ROOTDIR, "cache", "credits") + os.sep
directories["ALIASDIR"] = os.path.join(ROOTDIR, "cache", "aliases") + os.sep directories["ALIASDIR"] = os.path.join(ROOTDIR, "cache", "aliases") + os.sep
tempdir = os.path.join(ROOTDIR, 'temp') + os.sep tempdir = os.path.join(ROOTDIR, 'temp') + os.sep
@@ -97,7 +99,9 @@ def main() -> int:
os.makedirs(os.path.join(ROOTDIR, "cache", "series"), exist_ok=True) os.makedirs(os.path.join(ROOTDIR, "cache", "series"), exist_ok=True)
os.makedirs(os.path.join(ROOTDIR, "cache", "episodes"), exist_ok=True) os.makedirs(os.path.join(ROOTDIR, "cache", "episodes"), exist_ok=True)
os.makedirs(os.path.join(ROOTDIR, "cache", "cast"), exist_ok=True) os.makedirs(os.path.join(ROOTDIR, "cache", "cast"), exist_ok=True)
os.makedirs(os.path.join(ROOTDIR, "cache", "guestcast"), exist_ok=True)
os.makedirs(os.path.join(ROOTDIR, "cache", "crew"), exist_ok=True) os.makedirs(os.path.join(ROOTDIR, "cache", "crew"), exist_ok=True)
os.makedirs(os.path.join(ROOTDIR, "cache", "guestcrew"), exist_ok=True)
except Exception: except Exception:
# If directory creation fails, let the logging initialization surface the error # If directory creation fails, let the logging initialization surface the error
pass pass
@@ -291,7 +295,7 @@ def main() -> int:
if int(ts) == int(prev_ts): if int(ts) == int(prev_ts):
found_path = find_file_in_multiple_dirs(f"{seriesid}.json", directory_list) found_path = find_file_in_multiple_dirs(f"{seriesid}.json", directory_list)
#print(f"Found path for series ID {seriesid}: {found_path}") #print(f"Found path for series ID {seriesid}: {found_path}")
if len(found_path) == 6: if len(found_path) == 8:
continue continue
else: else:
for directory in directory_list: for directory in directory_list: