EruIluvatar 0 Posted June 23, 2016 Share Posted June 23, 2016 Hi there Tl;dr: OpenSubtitleDownloader downloads the subtitles anyway, even though there are no permissions to write them to the filesystem. I found a potential misbehavior of the OpenSubtitleDownloader worker. The case is the following: - repeatedly got notifications about failed subtitle downloads - day after day the same, though there were not many new subtitles to download - thought I got an IP ban (my ISP barely changes IPs because of VDSL, no way to easily renew it but call the hotline...) - e-mailed the admin of opensubtitles.org, asking to lift the ban - turns out there is no ban, but instead I find that my account downloaded more than 22000 subtitles although there way less than 1000 unique titles on my server (hence very few subtitles actually needed) So I started digging a bit deeper and found the following: - First, there are many reports because of "Access to the path ... is denied. System.Unauthorized.AccessException". (There are exactly 200 of those log entries every day, which matches the daily limit by opensubtitles.org.) - After those messages, numberless other entries exist because of "OpenSubtitles rate limit reached, System.ApplicationException". I found the problem being wrong ownership/permission of the folders (my mistake / samba problem, should have known that sooner). My guess is that the OpenSubtitleDownloader downloads the subtitles anyway, even though there are no permissions to write them to the filesystem. This kind of behavior could be fixed, if the permissions were checked first and download initiated later on. It would sure lower the traffic for all parties. Also could help debugging for fellow users, as the download limit is not the actual problem. So, maybe this could be adjusted in the next release? --- Example log entries: 05/24/2016;;SubtitleDownloadFailure;Info;Subtitles failed to download for Futurama: The Beast with a Billion Backs;Provider: Open Subtitles;Access to the path "/media/4acf0d45-ffc0-4a98-b96f-9482a67ce22c/Shared/Filme/Futurama - The Beast With A Billion Backs/Futurama The Beast With A Billion Backs.ger.srt" is denied. System.UnauthorizedAccessException at System.IO.FileStream..ctor (System.String path FileMode mode FileAccess access FileShare share Int32 bufferSize Boolean anonymous FileOptions options) <0x7f5039d5d240 + 0x005ed> in <filename unknown>:0 at System.IO.FileStream..ctor (System.String path FileMode mode FileAccess access FileShare share Int32 bufferSize) <0x7f5039d5cf00 + 0x0004d> in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string System.IO.FileMode System.IO.FileAccess System.IO.FileShare int) at CommonIO.ManagedFileSystem.GetFileStream (System.String path FileMode mode FileAccess access FileShare share Boolean isAsync) <0x40edd730 + 0x000c0> in <filename unknown>:0 at MediaBrowser.Providers.Subtitles.SubtitleManager+<DownloadSubtitles>d__18.MoveNext () <0x411d6c80 + 0x008c3> in <filename unknown>:0 05/25/2016;;SubtitleDownloadFailure;Info;Subtitles failed to download for Futurama - The Silence of the Clamps;Provider: Open Subtitles;OpenSubtitles rate limit reached System.ApplicationException at MediaBrowser.Providers.Subtitles.OpenSubtitleDownloader+<GetSubtitlesInternal>d__1.MoveNext () <0x411d8ca0 + 0x00753> in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f5039c018a0 + 0x00029> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f5039bff880 + 0x000a7> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f5039bff800 + 0x0006b> in <filename unknown>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f5039bff7b0 + 0x0003a> in <filename unknown>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x7f5039bffee0 + 0x00017> in <filename unknown>:0 at MediaBrowser.Providers.Subtitles.SubtitleManager+<DownloadSubtitles>d__18.MoveNext () <0x411d6c80 + 0x00472> in <filename unknown>:0 Link to comment Share on other sites More sharing options...
Luke 36886 Posted June 23, 2016 Share Posted June 23, 2016 Hi, good observation. Thanks for the report. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now