jellyfin / jellyfin-plugin-opensubtitles

https://jellyfin.org
GNU General Public License v3.0
128 stars 27 forks source link

opensubtitles plugin does not search for subtitles in tv series #38

Open bekon16 opened 3 years ago

bekon16 commented 3 years ago

Hi,

I would like to report some isse. Cant download subtitles for TV series. I'm sure that subtitles exists, but plugin shows only: "No results found." It works for movies, but not for TV series. My naming scheme looks like this:

Library points to general folder with TV series: /media/tv_series Then folder with specific series, for example: "The_Mandalorian_2019" Then season: "Season_2" Then episode: "The_Mandalorian_S02E02.mkv"

So it looks like this:

Option "Only download subtitles that are a perfect match for my video files" is unchecked.

Plugin Version 9.0.0.0 Jellyfin Version 10.6.4

Any idea how to solve it? I just switch from emby and there it works for the same naming scheme.

BR.

Sim0nW0lf commented 3 years ago

I am having the same issue. Also my Movies and TV Series are seperated into 3 directories and only for one directory jellyfin finds subtitles. Some more information about my case also here: https://forum.jellyfin.org/t/opensubtitles-only-loading-in-one-directory/3977

Jan 17 00:44:44 filme-server jellyfin[903]: [00:44:44] [INF] Executing Download missing subtitles
Jan 17 00:51:03 filme-server jellyfin[903]: [00:51:03] [ERR] Error downloading subtitles
Jan 17 00:51:03 filme-server jellyfin[903]: MediaBrowser.Model.Net.HttpException: Backend fetch failed
Jan 17 00:51:03 filme-server jellyfin[903]:    at Emby.Server.Implementations.HttpClientManager.HttpClientManager.EnsureSuccessStatusCode(HttpResponseMessage response, HttpRequestOptions options)
Jan 17 00:51:03 filme-server jellyfin[903]:    at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsyncInternal(HttpRequestOptions options, HttpMethod httpMethod)
Jan 17 00:51:03 filme-server jellyfin[903]:    at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsync(HttpRequestOptions options, HttpMethod httpMethod)
Jan 17 00:51:03 filme-server jellyfin[903]:    at OpenSubtitlesHandler.Utilities.SendRequestAsync(Byte[] request, String userAgent, CancellationToken cancellationToken)
Jan 17 00:51:03 filme-server jellyfin[903]:    at OpenSubtitlesHandler.OpenSubtitles.LogInAsync(String username, String password, String language, CancellationToken cancellationToken)
Jan 17 00:51:03 filme-server jellyfin[903]:    at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.Login(CancellationToken cancellationToken)
Jan 17 00:51:03 filme-server jellyfin[903]:    at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.GetSubtitlesInternal(String id, PluginConfiguration options, CancellationToken cancellationToken)
Jan 17 00:51:03 filme-server jellyfin[903]:    at MediaBrowser.Providers.Subtitles.SubtitleManager.DownloadSubtitles(Video video, LibraryOptions libraryOptions, String subtitleId, CancellationToken cancellationToken)
Jan 17 00:51:03 filme-server jellyfin[903]:    at MediaBrowser.Providers.MediaInfo.SubtitleDownloader.DownloadSubtitles(Video video, List`1 mediaStreams, Boolean skipIfEmbeddedSubtitlesPresent, Boolean skipIfAudioTrackMatches, Boolean requirePerfectMatch, String language, String[] disabledSubtitleFetchers, String[] subtitleFetcherOrder, VideoContentType mediaType, CancellationToken cancellationToken)
Jan 17 00:51:04 filme-server jellyfin[903]: [00:51:04] [ERR] Error downloading subtitles from Open Subtitles
Jan 17 00:51:04 filme-server jellyfin[903]: MediaBrowser.Model.Net.HttpException: Backend fetch failed
Jan 17 00:51:04 filme-server jellyfin[903]:    at Emby.Server.Implementations.HttpClientManager.HttpClientManager.EnsureSuccessStatusCode(HttpResponseMessage response, HttpRequestOptions options)
Jan 17 00:51:04 filme-server jellyfin[903]:    at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsyncInternal(HttpRequestOptions options, HttpMethod httpMethod)
Jan 17 00:51:04 filme-server jellyfin[903]:    at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsync(HttpRequestOptions options, HttpMethod httpMethod)
Jan 17 00:51:04 filme-server jellyfin[903]:    at OpenSubtitlesHandler.Utilities.SendRequestAsync(Byte[] request, String userAgent, CancellationToken cancellationToken)
Jan 17 00:51:04 filme-server jellyfin[903]:    at OpenSubtitlesHandler.OpenSubtitles.LogInAsync(String username, String password, String language, CancellationToken cancellationToken)
Jan 17 00:51:04 filme-server jellyfin[903]:    at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.Login(CancellationToken cancellationToken)
Jan 17 00:51:04 filme-server jellyfin[903]:    at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
Jan 17 00:51:04 filme-server jellyfin[903]:    at MediaBrowser.Providers.Subtitles.SubtitleManager.SearchSubtitles(SubtitleSearchRequest request, CancellationToken cancellationToken)
Jan 17 00:52:24 filme-server jellyfin[903]: [00:52:24] [ERR] Error downloading subtitles from Open Subtitles
Jan 17 00:52:24 filme-server jellyfin[903]: System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
Jan 17 00:52:24 filme-server jellyfin[903]:    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
Jan 17 00:52:24 filme-server jellyfin[903]:    at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
Jan 17 00:52:24 filme-server jellyfin[903]:    at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
Jan 17 00:52:24 filme-server jellyfin[903]:    at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
Jan 17 00:52:24 filme-server jellyfin[903]:    at XmlRpcHandler.XmlRpcGenerator.DecodeMethodResponse(String xmlResponse)
Jan 17 00:52:24 filme-server jellyfin[903]:    at OpenSubtitlesHandler.OpenSubtitles.LogInAsync(String username, String password, String language, CancellationToken cancellationToken)
Jan 17 00:52:24 filme-server jellyfin[903]:    at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.Login(CancellationToken cancellationToken)
Jan 17 00:52:24 filme-server jellyfin[903]:    at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
Jan 17 00:52:24 filme-server jellyfin[903]:    at MediaBrowser.Providers.Subtitles.SubtitleManager.SearchSubtitles(SubtitleSearchRequest request, CancellationToken cancellationToken)

These are some Errors I get in my logs. (Many more looking just like that)

bekon16 commented 3 years ago

Hi, @iPwnWolf Did you find solution for this problem? What "path" works for you to download subtitles?

Sim0nW0lf commented 3 years ago

@bekon16 I was chatting in the Matrix chat Support and it seemed to be a bug. The problem is, that only so many subtitles can be downloaded at a time and jellyfin doesn't have a good timing system jet.

I was able to resolve this issue by offloading this task to another program. Now I am using radarr/sonarr to organize my media and they can communicate with bazarr which will be downloading all the subtitles. It takes time, because of the limits and very often you have to wait for hours to be able to load subtitles again but you just have to wait, bazarr takes care of the timing. Nice bonus is also automatic timing alignment of the subtitles to the audio and also the ability to load forced and normal subtitles.

It was a pain to reorganize my library for sonarr and radarr but I really love it that now I don't have to organize anything anymore! I hope I could help you!

bekon16 commented 3 years ago

Thanks for response. I'm not sure whether my problem is similar as yours. I have problem with downloading subtitles even for one episode just for test purposes - it works for movies so should work for TV series too. I tried to setup naming scheme as in jellyfin doc but still no luck - not found.

Sim0nW0lf commented 3 years ago

@bekon16 It doesn't matter to be honest. Just deactivate subtitle downloading in jellyfin and set up radarr and sonarr with bazarr. That will work because bazarr will know from sonarr where your tv shows are and from radarr where your movies are... You will have no Problems at all after that. For me bazarr is loading about 150 subtitles/day (also refreshing old ones that can be improved)