-
Notifications
You must be signed in to change notification settings - Fork 276
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
Check if the episode is a key of the searchResults before sending it #214
Conversation
for searched_episode in searched_episode_list: | ||
if searched_episode in [x for x, _ in searchResults.items()]: | ||
results = curProvider.cache.update_cache_manual_search(searchResults[searched_episode]) | ||
if results is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just "if results:"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i'll change that
f081801
to
d061607
Compare
@@ -583,12 +583,12 @@ def searchProviders(show, episodes, manualSearch=False, downCurQuality=False, ma | |||
searched_episode_list = [episode_obj.episode for episode_obj in episodes] | |||
# Add the -1 to also match season pack results | |||
searched_episode_list.append(-1) | |||
episodes_search_result = [x for x, _ in searchResults.items()] | |||
episodes_search_result = list(searchResults) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unnecessary, inefficient and increases memory usage
…to cache. * Add the season pack's as a valid search result.
d061607
to
08ee422
Compare
Check if the episode is a key if the searchResults before sending it to cache.