jellyfin / jellyfin-plugin-opensubtitles

Home Page:https://jellyfin.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Log path on IOException for media hashing

Nothing4You opened this issue · comments

Describe the isue
Sometimes the plugin attempts to hash movies and fails due to IO errors.
It would be great if the path for these failures could be logged for further investigation.

System:

  • OS: Debian
  • Virtualization: QEMU
  • Jellyfin Version: 10.7.1
  • Open Subtitles plugin version: 10.0.0.0

To Reproduce

  1. Have a media item referencing a path which results in in an IO error when accessed
  2. Run the Download missing subtitles task

Expected behavior
Log should contain the path that was attempted to be accessed.

Logs

[2021-04-24 19:52:45.984 +00:00] [ERR] [80] MediaBrowser.Providers.Subtitles.SubtitleManager: Error downloading subtitles from "Open Subtitles"
System.IO.IOException: Input/output error
   at System.IO.FileStream.CheckFileCall(Int64 result, Boolean ignoreNotSupported)
   at System.IO.FileStream.ReadNative(Span`1 buffer)
   at System.IO.FileStream.ReadSpan(Span`1 destination)
   at System.IO.FileStream.Read(Byte[] array, Int32 offset, Int32 count)
   at OpenSubtitlesHandler.MovieHasher.ComputeMovieHash(Stream input)
   at OpenSubtitlesHandler.Utilities.ComputeHash(Stream stream)
   at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Subtitles.SubtitleManager.SearchSubtitles(SubtitleSearchRequest request, CancellationToken cancellationToken)