]> jfr.im git - yt-dlp.git/commit - README.md
Improve plugin architecture (#5553)
authorMatthew <redacted>
Sun, 1 Jan 2023 04:29:22 +0000 (04:29 +0000)
committerGitHub <redacted>
Sun, 1 Jan 2023 04:29:22 +0000 (04:29 +0000)
commit8e40b9d1ec132ae1bcac50b3ee520ece46ac9c55
tree910f1b931be45b9293dc763d9f46c33f7159c199
parent2fb0f858686c46abc50a0e253245afe750746775
Improve plugin architecture (#5553)

to make plugins easier to develop and use:
* Plugins are now loaded as namespace packages.
* Plugins can be loaded in any distribution of yt-dlp (binary, pip, source, etc.).
* Plugin packages can be installed and managed via pip, or dropped into any of the documented locations.
* Users do not need to edit any code files to install plugins.
* Backwards-compatible with previous plugin architecture.

As a side-effect, yt-dlp will now search in a few more locations for config files.

Closes https://github.com/yt-dlp/yt-dlp/issues/1389

Authored by: flashdagger, coletdjnz, pukkandan, Grub4K
Co-authored-by: Marcel <redacted>
Co-authored-by: pukkandan <redacted>
Co-authored-by: Simon Sawicki <redacted>
20 files changed:
.gitignore
README.md
devscripts/make_lazy_extractors.py
test/test_plugins.py [new file with mode: 0644]
test/testdata/yt_dlp_plugins/extractor/_ignore.py [new file with mode: 0644]
test/testdata/yt_dlp_plugins/extractor/ignore.py [new file with mode: 0644]
test/testdata/yt_dlp_plugins/extractor/normal.py [new file with mode: 0644]
test/testdata/yt_dlp_plugins/postprocessor/normal.py [new file with mode: 0644]
test/testdata/zipped_plugins/yt_dlp_plugins/extractor/zipped.py [new file with mode: 0644]
test/testdata/zipped_plugins/yt_dlp_plugins/postprocessor/zipped.py [new file with mode: 0644]
yt_dlp/YoutubeDL.py
yt_dlp/extractor/extractors.py
yt_dlp/options.py
yt_dlp/plugins.py [new file with mode: 0644]
yt_dlp/postprocessor/__init__.py
yt_dlp/utils.py
ytdlp_plugins/extractor/__init__.py [deleted file]
ytdlp_plugins/extractor/sample.py [deleted file]
ytdlp_plugins/postprocessor/__init__.py [deleted file]
ytdlp_plugins/postprocessor/sample.py [deleted file]