Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Combined episodes causes get_cached_streams to fail #805

Open
filiptrplan opened this issue Oct 20, 2024 · 1 comment
Open

[Bug] Combined episodes causes get_cached_streams to fail #805

filiptrplan opened this issue Oct 20, 2024 · 1 comment

Comments

@filiptrplan
Copy link
Collaborator

In the get_cached_container of the FileFinder class we do a check that the container length should be at least as long as the media requested.

if not needed_media or len(container) >= len([episode for season in needed_media for episode in needed_media[season]]):
    matched_files = self.cache_matches(container, needed_media, break_pointer)
    if matched_files:
        return {"all_files": container, "matched_files": matched_files}

So for this magnet link magnet:?xt=urn:btih:b92fe904bd2b62822b80f1755c0e8c9b363044d9 which has only 23 files for 24 episodes the check fails. But the episodes 1 and 2 are in the same file.

@dreulavelle
Copy link
Member

just minus 1 from len() and make it greater than or equal to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants