Skip to content

Commit

Permalink
Merge pull request #135 from Drazzilb08/nohl-max_search-fix
Browse files Browse the repository at this point in the history
[bug] Notification bug fix
  • Loading branch information
Drazzilb08 authored Mar 21, 2024
2 parents eee6c9f + caeb822 commit f13b120
Showing 1 changed file with 2 additions and 3 deletions.
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

0 comments on commit f13b120

Please sign in to comment.