update commit prev
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
## 🎯 Purpose
|
||||
This guide describes how to write, test, and register a plugin so the application can discover and use it as a pluggable component.
|
||||
|
||||
> Keep plugin code small, focused, and well-tested. Built-in plugins live in `Provider/` and external drop-in plugins live under `plugins/`.
|
||||
> Keep plugin code small, focused, and well-tested. Bundled plugins and drop-in plugins share the same `plugins/` layout.
|
||||
|
||||
---
|
||||
|
||||
@@ -125,8 +125,9 @@ pytest -q
|
||||
---
|
||||
|
||||
## 📦 Registration & packaging
|
||||
- Built-in plugins live under `Provider/` and are auto-discovered from that package.
|
||||
- Bundled plugins live under `plugins/` and are auto-discovered from that package.
|
||||
- External user plugins can be dropped into `plugins/` or any directory listed in `MM_PLUGIN_PATH` / `MEDEIA_PLUGIN_PATH`.
|
||||
- Package directories are preferred so plugin-specific files can travel with the plugin.
|
||||
- Plugin authors should import from `ProviderCore.*`.
|
||||
|
||||
---
|
||||
@@ -146,19 +147,19 @@ pytest -q
|
||||
- [ ] Provide `URL` / `URL_DOMAINS` or `url_patterns()` for routing
|
||||
- [ ] Add `download()` or `download_url()` for piped/passed URL downloads
|
||||
- [ ] Add tests under `tests/`
|
||||
- [ ] Add the plugin module to `Provider/` for built-ins, or drop it into `plugins/` for plug-and-play user installs
|
||||
- [ ] Add the plugin under `plugins/<name>/` for bundled or plug-and-play installs
|
||||
|
||||
---
|
||||
|
||||
## 🔗 Further reading
|
||||
- See existing built-in plugins in `Provider/` for patterns and edge cases.
|
||||
- See existing bundled plugins in `plugins/` for patterns and edge cases.
|
||||
- Check `API/` helpers for HTTP and debrid clients.
|
||||
|
||||
|
||||
---
|
||||
|
||||
If you'd like, I can:
|
||||
- Add an example plugin file under `Provider/` as a template (see `Provider/hello_provider.py`), and
|
||||
- Add an example plugin file under `plugins/` as a template (see `plugins/hello/__init__.py`), and
|
||||
- Create unit tests for it (see `tests/test_provider_hello.py`).
|
||||
|
||||
I have added a minimal example provider and tests in this repository; use them as a starting point for new providers.
|
||||
I have added a minimal example plugin and tests in this repository; use them as a starting point for new plugins.
|
||||
|
||||
Reference in New Issue
Block a user