Hello,
If a Betaseries zip file contain more than 1 file, Bazarr take the first one and not the better one.
This is done by this function in betaseries.py :
````
def _get_subtitle_from_archive(archive):
for name in archive.namelist():
# discard hidden files
if os.path.split(name)[-1].startswith('.'):
continue
# discard non-subtitle files
if not name.lower().endswith(SUBTITLE_EXTENSIONS):
continue
return archive.read(name)
return None
````
Is it possible to change this behaviour ?
@Mexx62 You can take a look at this one please?
I'll take a look at it. The idea would be to compute the scores of each file and take the best, right?
@dtroncy Do you have an example of file + provider that triggers this behavior that I could use to test the solution?
I have the exact same problem. These subtitles are the very best because they come from sous-titre.eu : https://www.betaseries.com/srt/815017 but they don't sync with AMZN-KINGS release because this is not the first sub in the zip file. The perfect behaviour would be to list .zip subtitles and extract the one which match the release.
@ Mexx62, you can use this one as an example (https://www.betaseries.com/srt/812108].
In the zip file, you can find 2 files:
When Bazarr downloads the zip file on betaseries, it takes the first file in the zip file that is not necessarily the best one according to the file name.
It's almost the same example as @kxzaon.
@Mexx62 did you had time to look into this?
I haven't had time yet to look into it, I think I'll be able to before the end of the week.
Keeping you in touch :wink:
No problem! Thanks! :-)
Thanks to @Mexx62 !
Most helpful comment
I'll take a look at it. The idea would be to compute the scores of each file and take the best, right?
@dtroncy Do you have an example of file + provider that triggers this behavior that I could use to test the solution?