Support for the extensions API enables users to finally take advantage of the large variety of sources Tachiyomi offers. Extensions are sources that can be downloaded from the central repository allowing users to add sources as they need them. Extension support in the TachiWeb backend should be now feature complete and currently covers:
Viewing a list of all installed extensions and extensions available in the central repository
Downloading and installing extensions from the central repository. Extensions that are out of date where a newer version exists in the central repository can also be updated.
Deleting extensions
Installing extensions that are not available in the central repository from APK files. These extensions are untrusted by default and TachiWeb will not load them until the user explicitly trusts the extension.
The API to access all these features:
Extensions are identified by their package name
Make a GET request to /api/v2/extensions to list all extensions
Make a GET request to /api/v2/extensions/[COMMA SEPARATED PACKAGE NAMES] to get information on specific extensions
Make a POST request to /api/v2/extensions with an APK file in the "extension" form field to install an extension not present in the central repository.
Make a DELETE request to /api/v2/extensions/[COMMA SEPARATED PACKAGE NAMES] to delete extensions
Make a POST request to /api/v2/extensions/[COMMA SEPARATED PACKAGE NAMES]/install to download and install extensions from the central repository. If the extensions are already installed but a newer version is available, it will upgrade them instead.
Make a POST request to /api/v2/extensions/trust with the signature hash of the untrusted extension in the "signature_hash" form field to trust an extension. Multiple extensions may have the same signature hash so a single POST request may trust multiple extensions. Future extensions that have the same signature hash will also become trusted.
Make a GET request to /api/v2/extensions/[PACKAGE NAME]/icon to get an extension's icon
Make a POST request to /api/v2/extensions/reload-available to reload what extensions are available in the central repository (and also check for extension updates)
Extension response format:
{
// Extension package name
"pkg_name": "eu.kanade.tachiyomi.extension.en.dynasty",
// Extension name
"name": "Dynasty",
// Extension status. Either INSTALLED, UNTRUSTED or AVAILABLE
// INSTALLED: Extension is downloaded and installed
// UNTRUSTED: Extension is downloaded and installed but not trusted, the user cannot use it until it is trusted
// AVAILABLE: Extension is available in the central repository and is not downloaded/installed
"status": "INSTALLED",
// Version name of extension
"version_name": "1.2.6",
// Computer-readable version code of extension
"version_code": 6,
// Signature hash of extension. Only present when extension status is UNTRUSTED. Used to trust the extension.
"signature_hash": null,
// Language of extension represented in ISO 639-1 format. Can also be set to "all" when the extension includes sources of multiple languages.
"lang": "en",
// A list of the IDs of all the sources included in the extension. Extensions may include multiple sources. Only present when the extension status is INSTALLED
"sources": [
"738706855355689486"
],
// Whether or not an update is available for this extension. Only present when the extension status is INSTALLED
"has_update": false
}
As far as UI goes, there are some corners you can cut. Specifically, about extension trust, just auto-trust all extensions that are uploaded. Basically, every time you see an extension with an "UNTRUSTED" status, send a request to the server to trust it immediately. Otherwise, refer to the Tachiyomi app for what the extension UI should look like. You should also provide a UI to enable/disable individual sources as the sources list can grow really fast if users install many extensions. A single extension may even include 30+ sources!
Support for the extensions API enables users to finally take advantage of the large variety of sources Tachiyomi offers. Extensions are sources that can be downloaded from the central repository allowing users to add sources as they need them. Extension support in the TachiWeb backend should be now feature complete and currently covers:
The API to access all these features:
Extension response format: { // Extension package name "pkg_name": "eu.kanade.tachiyomi.extension.en.dynasty", // Extension name "name": "Dynasty", // Extension status. Either INSTALLED, UNTRUSTED or AVAILABLE // INSTALLED: Extension is downloaded and installed // UNTRUSTED: Extension is downloaded and installed but not trusted, the user cannot use it until it is trusted // AVAILABLE: Extension is available in the central repository and is not downloaded/installed "status": "INSTALLED", // Version name of extension "version_name": "1.2.6", // Computer-readable version code of extension "version_code": 6, // Signature hash of extension. Only present when extension status is UNTRUSTED. Used to trust the extension. "signature_hash": null, // Language of extension represented in ISO 639-1 format. Can also be set to "all" when the extension includes sources of multiple languages. "lang": "en", // A list of the IDs of all the sources included in the extension. Extensions may include multiple sources. Only present when the extension status is INSTALLED "sources": [ "738706855355689486" ], // Whether or not an update is available for this extension. Only present when the extension status is INSTALLED "has_update": false }
As far as UI goes, there are some corners you can cut. Specifically, about extension trust, just auto-trust all extensions that are uploaded. Basically, every time you see an extension with an "UNTRUSTED" status, send a request to the server to trust it immediately. Otherwise, refer to the Tachiyomi app for what the extension UI should look like. You should also provide a UI to enable/disable individual sources as the sources list can grow really fast if users install many extensions. A single extension may even include 30+ sources!