Commit Graph

13 Commits

Author SHA1 Message Date
Shivelight c31ee338dc
Add option for automatic subtitle character encoding normalization (#68)
* Add option for automatic subtitle character encoding normalization

The rationale behind this function is that some services use ISO-8859-1
(latin1) or Windows-1252 (CP-1252) instead of UTF-8 encoding, whether
intentionally or accidentally. Some services even stream subtitles with
malformed/mixed encoding (each segment has a different encoding).

* Remove Subtitle parameter `auto_fix_encoding`

Just always attempt to fix encoding. If the subtitle is neither UTF-8 nor CP-1252, then it should realistically error out instead of producing garbage Subtitle data anyway.

* Move Subtitle encoding fixing code out of if drm tree

* Use chardet as a last ditch effort fixing Subs, or return original data

* Move Subtitle.fix_encoding method to utilities as try_ensure_utf8

* Add Shivelight as a contributor

---------

Co-authored-by: rlaphoenix <rlaphoenix@pm.me>
2023-12-02 11:00:55 +00:00
rlaphoenix 959590a6bb Overhaul tooling, linting, editor configs, and README 2023-12-02 09:57:13 +00:00
rlaphoenix 883c9ae063 docs: Add Discord badge to README 2023-07-09 14:41:11 +01:00
rlaphoenix bfceb15f14 docs: Remove portable installation steps and info
I'm not happy with the approach used here to make portable installations of Devine, therefore for now I will remove the information relating to portable installations.
2023-07-04 03:03:07 +01:00
rlaphoenix 1ff4858ca7 Fix mistake in Web Address for FFmpeg in README 2023-05-28 19:46:55 +01:00
rlaphoenix cd2831fe82 Add Hollander-1908 to Contributors list 2023-03-14 12:39:05 +00:00
rlaphoenix c1f716cb6c Drop support for Python 3.8 2023-02-22 03:43:22 +00:00
rlaphoenix f06ca768c3 Add varyg1001 to the Contributors list 2023-02-13 18:33:51 +00:00
rlaphoenix 6a3559bc0f Add Arias800 to the Contributor list in the README 2023-02-12 17:54:02 +00:00
rlaphoenix 77d892a2a9 Add DeepSource Active Issues Badge to Readme 2023-02-10 19:31:35 +00:00
rlaphoenix 8c66e57175 Change the icon next to the project name 2023-02-06 04:00:14 +00:00
rlaphoenix 8b9247bfc5 Fix the organization name across the project
Sadly `devine` was not available.
2023-02-06 02:55:22 +00:00
rlaphoenix 7fd87b8aa2 Initial commit 2023-02-06 02:41:29 +00:00