Repository: pymedusa/Medusa

Issue:
Scene Exceptions And Exclimation Points
I've been testing out Medusa for anime search over SickRage and so far I'm pretty happy but I've hit a snag with the series 'Love Live! Sunshine!!'.  I use NZB.su as my main search provider and it doesn't appear to like exclamation points.  Even if I just search their site 'Love Live' gets results and 'Love Live!' gets no results.  Right now for 'Love Live! Sunshine!!' Medusa is only searching with the exclamation points and it gets no results.

I've attempted adding my own scene exceptions but it doesn't appear to actually search with them.  I've added 'Love Live Sunshine' just like that but in the debug log it doesn't seem to make an attempt with that search index.  Any ideas as to why?
``` 
2017-11-05 08:25:41 INFO     SEARCHQUEUE-FORCED-306407 :: [b16e0e5] Unable to find forced results for: Love Live! Sunshine!! - 014 - Next Step
2017-11-05 08:25:41 DEBUG    SEARCHQUEUE-FORCED-306407 :: [b16e0e5] 306407: Formatting pattern: %SN - %AB - %EN -> Love Live! Sunshine!! - 014 - Next Step
2017-11-05 08:25:41 INFO     SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] Performing season pack search for Love Live! Sunshine!!
2017-11-05 08:25:41 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] Fallback season pack search initiate
2017-11-05 08:25:41 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] No results returned from provider. Check chosen Newznab search categories in provider settings and/or usenet retention
2017-11-05 08:25:41 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] User-Agent: Medusa/0.0.1 (Windows; 10; 40e6a88f-c22b-11e7-9b54-1c6f65d77f10)
2017-11-05 08:25:41 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] GET URL: **********api?apikey=**********&maxage=1000&cat=5000%2C5070&q=Love+Live%21+Sunshine%21%21+S2+001&limit=100&t=search&offset=0 [Status: 200]
2017-11-05 08:25:39 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] Search show using search string: Love Live! Sunshine!! S2 001
2017-11-05 08:25:39 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] No results returned from provider. Check chosen Newznab search categories in provider settings and/or usenet retention
2017-11-05 08:25:39 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] User-Agent: Medusa/0.0.1 (Windows; 10; 40e6a88f-c22b-11e7-9b54-1c6f65d77f10)
2017-11-05 08:25:39 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] GET URL: **********api?apikey=**********&maxage=1000&cat=5000%2C5070&q=Love+Live%21+Sunshine%21%21+S2+01&limit=100&t=search&offset=0 [Status: 200]
2017-11-05 08:25:37 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] Search show using search string: Love Live! Sunshine!! S2 01
2017-11-05 08:25:37 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] No results returned from provider. Check chosen Newznab search categories in provider settings and/or usenet retention
2017-11-05 08:25:37 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] User-Agent: Medusa/0.0.1 (Windows; 10; 40e6a88f-c22b-11e7-9b54-1c6f65d77f10)
2017-11-05 08:25:37 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] GET URL: **********api?apikey=**********&maxage=1000&cat=5000%2C5070&q=Love+Live%21+Sunshine%21%21+014&limit=100&t=search&offset=0 [Status: 200]
2017-11-05 08:25:35 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] Search show using search string: Love Live! Sunshine!! 014
2017-11-05 08:25:35 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] No results returned from provider. Check chosen Newznab search categories in provider settings and/or usenet retention
2017-11-05 08:25:35 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] User-Agent: Medusa/0.0.1 (Windows; 10; 40e6a88f-c22b-11e7-9b54-1c6f65d77f10)
2017-11-05 08:25:35 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] GET URL: **********api?apikey=**********&maxage=1000&cat=5000%2C5070&q=Love+Live%21+Sunshine%21%21+14&limit=100&t=search&offset=0 [Status: 200]
2017-11-05 08:25:33 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] Search show using search string: Love Live! Sunshine!! 14
2017-11-05 08:25:33 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] Search mode: Episode
2017-11-05 08:25:33 DEBUG    SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] Creating UNIQUE URL index for nzb_su
2017-11-05 08:25:33 INFO     SEARCHQUEUE-FORCED-306407 :: [NZB.SU] :: [b16e0e5] Performing episode search for Love Live! Sunshine!!
2017-11-05 08:25:33 INFO     SEARCHQUEUE-FORCED-306407 :: [b16e0e5] Using backlog search providers
2017-11-05 08:25:33 DEBUG    SEARCHQUEUE-FORCED-306407 :: [b16e0e5] Internal name cache for Love Live! Sunshine!! set to: love live sunshine s2, love live sunshine
2017-11-05 08:25:33 INFO     SEARCHQUEUE-FORCED-306407 :: [b16e0e5] Building internal name cache for Love Live! Sunshine!!
2017-11-05 08:25:33 INFO     SEARCHQUEUE-FORCED-306407 :: [b16e0e5] Finished processing 2569 scene exceptions.
2017-11-05 08:25:33 INFO     SEARCHQUEUE-FORCED-306407 :: [b16e0e5] Updating exception_cache and exception_season_cache
2017-11-05 08:25:33 INFO     SEARCHQUEUE-FORCED-306407 :: [b16e0e5] Beginning forced search for: Love Live! Sunshine!! - 014 - Next Step
2017-11-05 08:25:33 DEBUG    SEARCHQUEUE-FORCED-306407 :: [b16e0e5] 306407: Formatting pattern: %SN - %AB - %EN -> Love Live! Sunshine!! - 014 - Next Step```


Discussion:
I was able to reproduce your issue.
Will release a fix shortly.

It's a bug with shows that have a season scene exception. Those are used over the shows scene exception. I'll make sure it will add one search string for each show's exception + the absolute number.

Resolving patch:
diff --git a/medusa/providers/generic_provider.py b/medusa/providers/generic_provider.py
--- a/medusa/providers/generic_provider.py
+++ b/medusa/providers/generic_provider.py
@@ -581,7 +581,11 @@ def _get_episode_search_strings(self, episode, add_string=''):
             'Episode': []
         }
 
-        for show_name in episode.series.get_all_possible_names(season=episode.scene_season):
+        all_possible_show_names = episode.series.get_all_possible_names()
+        if episode.scene_season:
+            all_possible_show_names = all_possible_show_names.union(episode.series.get_all_possible_names(season=episode.scene_season))
+
+        for show_name in all_possible_show_names:
             episode_string = show_name + self.search_separator
             episode_string_fallback = None
 


Test patch: