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] Notification bug fix #135

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions modules/nohl.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,14 @@ def handle_searches(app, search_list, instance_type):
ready = app.wait_for_command(results['id'])
if ready:
app.search_season(item['media_id'], season['season_number'])
searched_for.append(item)
else:
# Delete episode files if individual episodes
app.delete_episode_files(file_ids)
results = app.refresh_items(item['media_id'])
ready = app.wait_for_command(results['id'])
if ready:
app.search_episodes(episode_ids)
searched_for.append(item)
searched_for.append(item)
print(f"Searches performed: {searches}")
return searched_for

Expand Down Expand Up @@ -328,7 +327,7 @@ def filter_media(app, media_list, nohl_data, instance_type, exclude_profiles, ex
})
# Limit the number of searches to the maximum allowed
if len(data_list['search_media']) >= max_search:
data_list['search_media'] = data_list['search_media'][:max_search - 1]
data_list['search_media'] = data_list['search_media'][:max_search]
# Return the dictionary containing filtered media and media to search for in Sonarr
return data_list

Expand Down