Skip to content

Commit

Permalink
Rd_rewrite (#198)
Browse files Browse the repository at this point in the history
* Update realdebrid.py
  • Loading branch information
Pukabyte authored Feb 3, 2024
1 parent 3b7e49e commit ff9b850
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/program/realdebrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ def chunks(lst, n):
wanted_files = container
if item.type == "episode" and any(item.number in parser.episodes_in_season(item.parent.number, episode["filename"]) for episode in container.values()):
wanted_files = container
if len(wanted_files) > 0 and all(item for item in wanted_files.values() if Path(item["filename"]).suffix in WANTED_FORMATS):
if len(wanted_files) > 0 and any(Path(item["filename"]).suffix in WANTED_FORMATS for item in wanted_files.values()):
item.set(
"active_stream",
{"hash": stream_hash, "files": wanted_files, "id": None},
)
# all_filenames = [file_info["filename"] for file_info in wanted_files.values()]
# for file in all_filenames:
# logger.debug(f"Found cached file {file} for {item.log_string}")
# logger.debug(f"Found cached file {file} for {item.log_string}")
return True
item.streams[stream_hash] = None
return False
Expand Down

0 comments on commit ff9b850

Please sign in to comment.