Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to download deleted subtitles misses relevant log information #146

Open
keinezeit8 opened this issue Aug 4, 2024 · 1 comment
Open

Comments

@keinezeit8
Copy link

I have the plugin running on a regular interval but it has stopped downloading for a while now. Manual downloads still work.

I get the following error message in the logs

[2024-08-04 20:36:11.630 +02:00] [ERR] [63] MediaBrowser.Providers.MediaInfo.SubtitleScheduledTask: Error downloading subtitles
System.Net.Http.HttpRequestException: Subtitle with Id 297659 could not be downloaded: OK
   at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.GetSubtitlesInternal(String id, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Subtitles.SubtitleManager.DownloadSubtitles(Video video, LibraryOptions libraryOptions, String subtitleId, CancellationToken cancellationToken)
   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, Boolean isAutomated, CancellationToken cancellationToken)

It makes sense that this request fails since the subtitles with that ID have been deleted.
https://www.opensubtitles.com/en/subtitles/297659
Unfortunately there is no easy way to find out what episode/movie was the problem and I am not sure, but I believe that the plugin crashes completely and stops downloading other subtitles.

Solutions in preferred order:

  1. Plugin can work around deleted content
  2. Plugin skips deleted content and mentions the problematic media in the logs
  3. Plugin stops and mentions the problematic media in the logs
@MBR-0001
Copy link
Contributor

MBR-0001 commented Aug 4, 2024

This has been encountered before, the official response from opensubtitles was to report the broken subtitles to them. From the jellyfin standpoint, afaik the task should not stop if an exception happens (at least that was the behavior in 10.8, I don't know about 10.9). Could you enable debug logging and run the task to see what happens when an exception occurs?
From what I know scenario 2. should already be happening

As for 1., the plugin could store the bad subtitle IDs in memory and skip them next time I guess, but I'll try asking opensubtitles about this scenario again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants