KBlixt / subcleaner

removes ads from subtitle files cleanly.
288 stars 13 forks source link

How add regex profile for hi type subs #40

Closed hlugt closed 1 year ago

hlugt commented 1 year ago

Hi, thanks for this subcleaner.

Can you please explain how to add hearing-impaired subs to the regex language profile? Bazarr puts them like ".en.hi.srt". Running subcleaner give a warning: "WARNING: language 'hi' have no regex profile associated with it." Should/Can it be added as a language code en.hi in de english regex profile conf? I get the idea it looks at id it as a separate language...

KBlixt commented 1 year ago

ah, nice catch, this is a bug.

KBlixt commented 1 year ago

could you send me the entire filename where you encounter this and the command you use?

Thank you :)

and if you've changed any config file let me know as well, otherwise I'll assume you run the default settings.

hlugt commented 1 year ago

Oops, my apologies: had not seen the request for filename and command...

KBlixt commented 1 year ago

No problem, I closed it since I can't reproduce it, so maybe it's been fixed as a side effect of something else I did. But would be great if you could confirm that this isn't a problem anymore 🙂

hlugt commented 1 year ago

Ok, I must admit, I am not sure anymore how I stumbled across this issue. I think it is probably resolved, as I can see the following in the log: 2023-06-05_22:55:32 - INFO: now cleaning subtitle: /data/movies/New/Doctor Strange in the Multiverse of Madness (2022)/Doctor.Strange.in.the.Multiverse.of.Madness.2022.2160p.UHD.BluRay.HDR10.REMUX.HEVC.TrueHD.7.1.Atmos-UnKn0wn {imdb-tt9419884}.en.hi.srt

saaiborg commented 1 year ago

Hi,

I'm having the same issue, but the hearing-impaired subs are marked as nameofthecontent.en.sdh.srt So "sdh" instead of "hi"

The error I get:

BAZARR Post-processing result for file /media/**.mkv : WARNING: language 'sdh' have no regex profile associated with it. WARNING: either create a regex profile for it or disable require_language_profile in the config. ERROR: subcleaner didn't successfully clean any files, failed to clean 1 files. subcleaner didn't successfully clean any files, failed to clean 1 files.

Thanks in advance for your help!

KBlixt commented 1 year ago

@saaiborg Thank you for letting me know, I made a quick fix for this. Give it a try again and let me know if it works 🙂

saaiborg commented 1 year ago

@saaiborg Thank you for letting me know, I made a quick fix for this. Give it a try again and let me know if it works 🙂

Great! It works. Many thanks for your great work