Commit Graph

19 Commits

Author SHA1 Message Date
rlaphoenix f7f974529b build: Explicitly use marisa-trie==1.1.0 for Python 3.12 wheels
The current version of langcodes (v3.3.0) is quite old and doesn't have explicit support for Python 3.11+ yet. It does work on Python 3.12 but one of it's dependencies, marisa-trie==0.7.8, does not have wheels for Python 3.12.

By explicitly using the pre-release version of one of langcode's dependencies, language-data, which is what depends on marisa-trie, we can upgrade to marisa-trie==1.1.0 which does have a wheel for Python 3.12.
2024-03-05 16:31:25 +00:00
rlaphoenix a55f4f6ac7 Update dependencies 2024-02-29 23:57:57 +00:00
rlaphoenix c6c2e9ca51 Add Curl-Impersonate Downloader via curl_cffi project
The browser to imitate can be set in the config:

For example,
```yaml
curl_impersonate:
    browser: chrome110
```

It will default to using chrome110 if no value is set in the config.

A list of available Browsers are listed here: https://github.com/yifeikong/curl_cffi#sessions
2024-01-11 22:29:49 +00:00
rlaphoenix 86635f9b7f Add Support for Python 3.12, update dependencies 2023-12-02 21:17:41 +00:00
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 a31cb6aa2f deps: Update all dependencies 2023-07-07 18:20:49 +01:00
rlaphoenix 89f5e04348 Bump requests from 2.28.2 to 2.31.0 2023-05-27 20:15:51 +01:00
rlaphoenix bf82065400 Move back to the official pymp4 dependency
All the latest changes in my fork is now available on the official pymp4 repository, and a new PyPI release v1.4.0 is available with the fixes to use.
2023-05-07 18:30:42 +01:00
rlaphoenix 2b07399f5a Update dependency on my fork of pymp4
It may look like I'm downgrading, but I'm not.

1.5.0 was an incorrect version bump based on TrueDread's fork. v1.4.0 is the next release after, even though it's a lower version. v1.4.0 should be used instead.
2023-04-23 22:36:41 +01:00
rlaphoenix 8c14b73bc1 Replace abandoned pymp4 with my fork of pymp4
My fork contains various fixes by beardypig and truedread that do not have a release on PyPI yet.
2023-03-27 18:41:28 +01:00
rlaphoenix 111dac9264 Fix association of preceding HLS EXT-X-KEYs with m3u8 fork
This will improve efficiency and accuracy of getting appropriate DRM systems when downloading segments.

This can dramatically improve download speed from less than 50 kb/s to full speed if the HLS playlist used a lot of AES-128 EXT-X-KEYs. E.g., a unique key for each segment.

This was caused because the HLS.get_drm function took EVERY EXT-X-KEY, checked for supported systems, loaded them, and returned the supported objects. This meant it could load possibly 100s of AES-128 ClearKey objects (likely requiring URL downloads for the key URI) causing a huge delay before downloading each segment.
2023-03-09 21:46:48 +00:00
rlaphoenix cddfdf6336 Update Changelog for v2.0.1 2023-03-07 10:28:18 +00:00
rlaphoenix fb49210b5a Remove explicit dependency on colorama
It's not used by devine itself, but it's still a sub-dependency. Remove from being an explicit dependency in case the sub-dependencies ever remove it as well.
2023-03-01 08:35:42 +00:00
rlaphoenix a841dbe2ab Remove dependency on tqdm 2023-03-01 08:33:40 +00:00
rlaphoenix 8d626822cb Remove coloredlogs and now unused log constants 2023-02-25 11:46:03 +00:00
rlaphoenix 39ff347f58 Add new dependency, rich 13.3.1 2023-02-25 11:22:54 +00:00
rlaphoenix c1f716cb6c Drop support for Python 3.8 2023-02-22 03:43:22 +00:00
rlaphoenix 7fd87b8aa2 Initial commit 2023-02-06 02:41:29 +00:00