jellyfin / jellyfin-plugin-opensubtitles

Home Page:https://jellyfin.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ERR] Error downloading subtitles from "Open Subtitles" error fills my log after installing the plugin on Jellyfin 10.7.6

zeldatp151 opened this issue · comments

My log is filled with this error after installing the open subtitles plugin and adding my login info.

System.Xml.XmlException: 'src' is an unexpected token. The expected token is '='. Line 10, position 16.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(String expectedToken1, String expectedToken2)
   at System.Xml.XmlTextReaderImpl.ParseAttributes()
   at System.Xml.XmlTextReaderImpl.ParseElement()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at XmlRpcHandler.XmlRpcGenerator.DecodeMethodResponse(String xmlResponse)
   at OpenSubtitlesHandler.OpenSubtitles.SearchSubtitlesAsync(SubtitleSearchParameters[] parameters, CancellationToken cancellationToken)
   at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Subtitles.SubtitleManager.SearchSubtitles(SubtitleSearchRequest request, CancellationToken cancellationToken)
[2021-07-27 13:35:10.214 -04:00] [ERR] Invalid response type
[2021-07-27 13:35:10.229 -04:00] [ERR] Invalid response type
[2021-07-27 13:35:10.290 -04:00] [ERR] Invalid response type
[2021-07-27 13:35:10.371 -04:00] [ERR] Invalid response type
[2021-07-27 13:35:10.471 -04:00] [ERR] Invalid response type
[2021-07-27 13:35:10.634 -04:00] [ERR] Invalid response type
[2021-07-27 13:35:10.652 -04:00] [ERR] Invalid response type
[2021-07-27 13:35:10.704 -04:00] [ERR] Invalid response type
[2021-07-27 13:35:10.739 -04:00] [ERR] Invalid response type
[2021-07-27 13:35:10.988 -04:00] [ERR] Invalid response type
[2021-07-27 13:35:11.054 -04:00] [ERR] Invalid response type
[2021-07-27 13:35:11.071 -04:00] [ERR] Invalid response type
[2021-07-27 13:35:11.092 -04:00] [ERR] Invalid response type
[2021-07-27 13:35:11.139 -04:00] [ERR] Error downloading subtitles from "Open Subtitles"
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Net.Http.Headers.HttpHeaders.AddHeaderInfo(HeaderDescriptor descriptor, HeaderStoreItemInfo sourceInfo)
   at System.Net.Http.Headers.HttpHeaders.AddHeaders(HttpHeaders sourceHeaders)
   at System.Net.Http.Headers.HttpRequestHeaders.AddHeaders(HttpHeaders sourceHeaders)
   at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.PostAsync(Uri requestUri, HttpContent content, CancellationToken cancellationToken)
   at OpenSubtitlesHandler.Utilities.SendRequestAsync(Byte[] request, String userAgent, CancellationToken cancellationToken)
   at OpenSubtitlesHandler.OpenSubtitles.SearchSubtitlesAsync(SubtitleSearchParameters[] parameters, CancellationToken cancellationToken)
   at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Subtitles.SubtitleManager.SearchSubtitles(SubtitleSearchRequest request, CancellationToken cancellationToken)
.
.
.
System.Xml.XmlException: Root element is missing.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at XmlRpcHandler.XmlRpcGenerator.DecodeMethodResponse(String xmlResponse)
   at OpenSubtitlesHandler.OpenSubtitles.SearchSubtitlesAsync(SubtitleSearchParameters[] parameters, CancellationToken cancellationToken)
   at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Subtitles.SubtitleManager.SearchSubtitles(SubtitleSearchRequest request, CancellationToken cancellationToken)
[2021-07-27 13:35:15.336 -04:00] [ERR] Error downloading subtitles from "Open Subtitles"
.
.
.
[2021-07-27 13:38:17.890 -04:00] [ERR] Error downloading subtitles from "Open Subtitles"
System.Xml.XmlException: The 'hr' start tag on line 6 position 2 does not match the end tag of 'body'. Line 7, position 3.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
   at System.Xml.XmlTextReaderImpl.ParseEndElement()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at XmlRpcHandler.XmlRpcGenerator.DecodeMethodResponse(String xmlResponse)
   at OpenSubtitlesHandler.OpenSubtitles.LogInAsync(String username, String password, String language, CancellationToken cancellationToken)
   at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.Login(CancellationToken cancellationToken)
   at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Subtitles.SubtitleManager.SearchSubtitles(SubtitleSearchRequest request, CancellationToken cancellationToken)```

This occurs because OS is rate limiting how many Subs you can download per day. Unfortunately, the plugin doesn't recognise this and will keep trying to hammer the servers until you either stop the service, or a day has passed, and your search quota has been reset.

If the developer is reading this, please consider putting in a timeout flag or perhaps detecting when things are being rejected and quit and try again later.