Repository: pymedusa/Medusa

Issue:
Series not found in show ids (Medusa does not download subtiltes)
Medusa gives this warning for a few of my shows, for example How I Met Your Father:
2022-02-13 23:36:54 WARNING  Thread_0 :: [918cfe7] Series How I Met Your Father not found in show ids

It doesn't download subtitles for this show. I couldn't find anything related to this issue. Hope you can help.


Discussion:
I keep getting the same kind of errors:
2022-02-15 21:57:58 WARNING  FINDSUBTITLES :: [918cfe7] Series How I Met Your Father not found in show ids
2022-02-15 20:50:32 WARNING  FINDSUBTITLES :: [918cfe7] Series Young Sheldon not found in show ids
2022-02-15 15:02:06 WARNING  POSTPROCESSOR :: [918cfe7] Series American Dad! not found in show ids
2022-02-15 14:05:47 WARNING  FINDSUBTITLES :: [918cfe7] Series South Park not found in show ids
What subtitle provider?
In latest release we fixed addic7ed. But you need to configure a user id + password
Opensubtitles and addic7ed, I just saw that I had to fill in a user ID number for addic7ed, so I changed my username into the user ID. I usually get these errors every 10 hours or so, so I will wait and see if this solved the issue.
I changed it, but unfortunately the same errors occur:
2022-02-16 21:56:51 WARNING  FINDSUBTITLES :: [918cfe7] Series How I Met Your Father not found in show ids
2022-02-16 18:34:06 WARNING  FINDSUBTITLES :: [918cfe7] Series Young Sheldon not found in show ids
2022-02-16 16:19:13 WARNING  FINDSUBTITLES :: [918cfe7] Series South Park not found in show ids
Are you getting subtitles found now?
> Are you getting subtitles found now?

No, still the same errors:
2022-02-18 12:40:24 WARNING  FINDSUBTITLES :: [918cfe7] Series Young Sheldon not found in show ids
2022-02-18 11:32:58 WARNING  FINDSUBTITLES :: [918cfe7] Series South Park not found in show ids
2022-02-18 10:25:26 WARNING  FINDSUBTITLES :: [918cfe7] Series American Dad! not found in show ids
2022-02-18 08:06:04 WARNING  FINDSUBTITLES :: [918cfe7] Series How I Met Your Father not found in show ids
Can you give me a specific show + language? So that I can try to reproduce.
Also limit providers to addic7ed. As I asume that's the issue here right?

To reproduce, I navigate to the show. And for the specific ep click on the CC icon.
Then click the manual button.
Just tested with the show young sheldon.
My guess is your user id/password is incorrect.

![image](https://user-images.githubusercontent.com/1331394/154690239-53036c3a-e159-438b-b1fa-e9f31046db03.png)

I double checked my password, and it is correct.
Is this info still up-to-date?
_Navigate and login on addic7ed.com
Click on My Profile
Click on your own username
Your user id should now be visible in the address bar
For example: https://www.addic7ed.com/user/12345_

I did that, and I filled in the number I found from the URL as "Addic7ed User ID".

I use multiple subtilte plugins:
Opensubtitles
Addic7ed
Podnapisi
Tvsubtiltes

For this test I disabled them all but Addic7ed, when I search for subtitles on that same ep, this is the result:
![image](https://user-images.githubusercontent.com/17907646/154691711-cb73b463-353d-404b-b33a-a10776204d42.png)

So for some reason it was still using the other subtitle providers. I restarted Medusa and searched again for subtitles, now this is the result:
![image](https://user-images.githubusercontent.com/17907646/154691862-27f9d0d7-659a-4e14-8c8c-b3c317b89a78.png)

Together with this error:
![image](https://user-images.githubusercontent.com/17907646/154691931-36957efe-8ddc-41ac-8925-d4f75a31f3b9.png)


Ow okay. Looks like it's having issues when trying to get the result from cache.

I'll try reproducing that
Doesn't any following manual search result in found subtitles. Cause addic7ed is know to often give timeouts
> Doesn't any following manual search result in found subtitles. Cause addic7ed is know to often give timeouts

Nope. I tried like 10-15 times after each other, not a single result with addic7ed. I went ahead and created a new account on addic7ed and tried with that account, same issue. I'm now considering just disabling addic7ed and stop using that as a subtitle provider.
@Miicker are you really running this commit https://github.com/pymedusa/Medusa/commit/918cfe7ce01808499585ffe6c1356fd5ed369f76 ?
> @Miicker are you really running this commit [918cfe7](https://github.com/pymedusa/Medusa/commit/918cfe7ce01808499585ffe6c1356fd5ed369f76) ?

I don't know, I am using medusa in Docker and autoupdate is turned on.
![image](https://user-images.githubusercontent.com/17907646/154724538-ef7f57c8-2790-469f-b1e9-e2ef095ba170.png)

That should be new enough.
What's the debug log when you do the search?
It logs a lot in debug mode, but this is what I could find:
2022-02-18 19:53:38 WARNING  Thread_1 :: [918cfe7] Series Young Sheldon not found in show ids
2022-02-18 19:53:38 DEBUG    Thread_1 :: [918cfe7] Getting show id
2022-02-18 19:53:38 DEBUG    Thread_1 :: [918cfe7] Getting show id with year
2022-02-18 19:53:38 DEBUG    Thread_1 :: [918cfe7] Found cached video information under key medusa.subtitles:video|/tv/Young Sheldon/Season 05/Young Sheldon - S05E01 - One Bad Night and Chaos of Selfish Desires MeGusta.mkv
2022-02-18 19:53:38 INFO     Thread_1 :: [918cfe7] Manual searching subtitles for: Young.Sheldon.S05E01.720p.HEVC.x265-MeGusta
2022-02-18 19:53:38 INFO     Thread_1 :: [918cfe7] Starting to manual searching subtitles
Try deleting the *.dbm files in cache folder and try again.
> Try deleting the *.dbm files in cache folder and try again.

Thanks! This fixed the issue!
I still get this error every day for Big Sky and this morning  for NCIS.

APIv2-Thread-2 :: [4908f30] Series Big Sky not found in show ids

I did delete the *.dbm files in the cache multiple times.
I also changed my Addic7ed password according to this manual:

Navigate and login on addic7ed.com
Click on My Profile
Click on your own username
Your user id should now be visible in the address bar
For example: https://www.addic7ed.com/user/12345

Anything else i can do?

Yeah so for username you use the user id. And password is your password.

Not much more you can do.
Edit: Tested here. Works fine for big sky.
Maybe your password is wrong. Double check that.
I also still have the same issue, but only for one of my shows. For the other shows the actions did solve the issue, but I still have this message:
2022-04-04 23:58:21 WARNING  SHOWQUEUE-SUBTITLE :: [918cfe7] Series American Dad! not found in show ids
I checked my password, it is fine. The problem seems not persistent, last week it did not happen again.
Yeah so I think it's caused by connection errors / timeouts.. so nothing we can do about it
I would suggest the WARNING in question instead be logged as INFO so it does not pollute the warnings badge on the tools popdown menu present on most pages.

The place to do this is in .../Medusa/medusa/subtitle_providers/addic7ed.py on line 222.

simply change logger.warning() to logger.info.

I configured addic7ed with a confirmed proper user id (the numeric one) and password.  Medusa is able to log in, but whenever it encounters a series that addic7ed [apparently] does not know about, Medusa posts the warning.

The only other resort is to entirely disable Medusa's use of the addic7ed subtitle provider, which would be a shame overall since they usually have stuff that is of high quality (and not filled with adverts like opensubtitles)

Can We Re-Open this issue?
An example series that consistently shows the present WARNING problem is "Richard Hammond's Crazy Contraptions".  If you click on an episode's "Search Subtitles" icon and respond "Auto", this erroneous warning always appears.

Again, I confirmed that my login credentials are correct.  Other shows work properly.

Also, I tried all of the cache *.db cleanup (restarting Medusa each time), which had zero effect.

Please Re-Open.

Resolving patch:
diff --git a/medusa/subtitle_providers/addic7ed.py b/medusa/subtitle_providers/addic7ed.py
--- a/medusa/subtitle_providers/addic7ed.py
+++ b/medusa/subtitle_providers/addic7ed.py
@@ -166,7 +166,7 @@ def _search_show_id(self, series, year=None):
         series_year = '%s %d' % (series, year) if year is not None else series
         params = {'search': series_year, 'Submit': 'Search'}
 
-        r = self.session.get('http://www.addic7ed.com/srch.php', params=params, timeout=10, cookies=self.cookies)
+        r = self.session.get('http://www.addic7ed.com/srch.php', params=params, timeout=30, cookies=self.cookies)
 
         # make the search
         logger.info('Searching show ids with %r', params)
@@ -219,7 +219,7 @@ def get_show_id(self, series, year=None, country_code=None):
 
         # search as last resort
         if not show_id:
-            logger.warning('Series %s not found in show ids', series)
+            logger.info('Series %s not found in show ids', series)
             show_id = self._search_show_id(series)
 
         return show_id


Test patch: