morpheus65535 / bazarr

Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movie and Bazarr takes care of everything for you.
https://www.bazarr.media
GNU General Public License v3.0
2.76k stars 216 forks source link

zimuku.py does not handle archives with ZIP or RAR suffix, only handles zip or rar #2588

Closed waterloo3122 closed 1 week ago

waterloo3122 commented 1 month ago

Describe the bug some subtitles from provider zimuku are suffixed with ZIP or RAR, not normally small cased zip or rar

logs: 2024-07-22 10:35:01,189 - subliminal_patch.providers.zimuku (7f28a286eb38) : DEBUG (zimuku:340) - Identified zip archive 2024-07-22 10:35:01,189 - subliminal_patch.providers.zimuku (7f28a286eb38) : DEBUG (zimuku:341) - Identified zip archive with filename attachment; filename="[zmk.pw]xxx.xxx.S02E01.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb.ZIP"

then download error occured

Expected behavior should handle ZIP or RAR suffixed subtitle archives

Software (please complete the following information):

waterloo3122 commented 1 month ago
image

adding code to bazarr/custom_libs/subliminal_patch/providers/zimuku.py may solve the problem

waterloo3122 commented 1 month ago

is it also possilble to handle 7zip archived subtitles?

anderson-oki commented 1 month ago

I'm unable to test but filename seems to be fine to cast to lowercase. Using:

filename = r.headers["Content-Disposition"].lower()

Any help testing this would be appreciated @waterloo3122.

Can you edit your file and replace the line 319 with the code i sent above. If the fix works, i will push to the development branch.


As for 7zip archives, it has to be implemented and tested. But it seems possible to implement. Any help is appreciated.

morpheus65535 commented 1 month ago

@waterloo3122 were you able to test this?

anderson-oki commented 1 week ago

No News, Good News!

The issue will be applied and it will be fixed on the upcoming beta!