Thorrent qBit Plugin Lab - v0.9.99.02
=======================================

Goal
----
Run qBittorrent-style Python search plugins directly inside Thorrent without requiring qBittorrent to be installed.

Plugin folder
-------------
Add plugin .py files here:

data\plugins\qbit\engines\

The included demo plugin is named:

demo_offline.py.sample

Rename it to:

demo_offline.py

to test the runner without internet.

Plugin management UI
--------------------
Open Thorrent and click the sidebar qBit Plugin Lab icon.

The Plugin Lab page shows:

- installed plugin .py files
- enabled/disabled state
- plugin filename/path
- buttons to Open Folder, Refresh, Search, Enable All, and Disable All

Enabled/disabled state
----------------------
Thorrent does not rename plugin files when you disable them.

Instead, it stores disabled plugin filenames in:

config\qbit_plugin_lab.json

Only enabled plugins are searched.

Safety
------
qBittorrent-style plugins are Python scripts. They can execute Python code.

Thorrent runs each plugin in a subprocess with timeout protection so a broken plugin is less likely to freeze the UI, but this is not a true security sandbox.

Use audited plugins only.

Search behavior
---------------
When qBit Plugin Lab runs a search:

1. Thorrent scans data\plugins\qbit\engines
2. Disabled plugins are skipped
3. Each enabled plugin runs in its own subprocess
4. Plugin stdout is parsed in qBittorrent's pipe-delimited result format
5. Results are normalized into Thorrent's result list

Known limitations
-----------------
This is still experimental.

Some qBittorrent plugins may expect helper functions or behavior that Thorrent does not fully emulate yet. If a plugin fails, check Source Diagnostics for stderr/attempt details.


Preinstalled plugins
--------------------
This release includes thepiratebay.py and yts.py in data\plugins\qbit\engines\.
They can be enabled/disabled from qBit Plugin Lab like any other plugin.

## v0.9.99.02 Plugin Diagnostics

Installed Plugins now includes per-plugin tools:

- Test: runs only the selected plugin with the current search text.
- Open File: opens the plugin .py file for review/editing.
- Output: shows the most recent stdout/stderr preview captured from Test.

Search-all plugin runs still respect enabled/disabled state. The Test button can be used to inspect one selected plugin directly.

