For a couple of files, I had UnicodeEncodeErrors raised when writing out a file it had successfully read in.
In my case, the output file was truncated to 1 KB.
As we have noted before, bad input data should be no reason to throttle a provider.
In this case, if the input language was not supported by whisper, we were raising a ValueError that was never caught and causing an error in the whisper provider for which it was throttled.
Instead, we are now detecting this case and logging an error message.
However, given that the input language was not one of the 99 currently known to whisper, it's probably a mislabeled audio track. If the user desired output language is English, then we will tell whisper that the input audio is also English and ask it to transcribe it. Whisper does a very good job of transcribing almost anything to English, so it's worth a try.
This should address the throttling in issue #2474.
* Backup files should be listed with newest ones first
Just like Sonarr and Radarr and everyone else.
* Add check_parser_binary() validation method
This is mainly to prevent the user from selecting mediainfo as the subtitles parser if it has not yet been installed on the user's system somewhere in the PATH.
* import JSONDecodeError from requests.exceptions instead of json
Because sometimes it will return the simplejson one instead and that one won't be caught by the except clause.
* import JSONDecodeError from requests.exceptions instead of json
Because sometimes it will return the simplejson one instead and that one won't be caught by the except clause.
Also fixed User-Agent assignment.