🧩
Seanime Extensions
🧩
Seanime Extensions
  • Seanime
    • Getting started
    • Core APIs
    • Changelog
  • Content Providers
    • Write, test, share
    • Anime torrent provider
    • Manga provider
    • Online streaming provider
  • Plugins
    • Introduction
    • Write, test, share
    • APIs
      • Helpers
      • Store
      • Storage
      • Database
      • AniList
      • System
        • Permissions
        • OS
        • Filepath
        • Commands
        • Buffers, I/O
        • MIME
    • UI
      • Basics
      • User Interface
        • Tray
        • Toast
        • Screen
        • Command Palette
        • Action
        • DOM
      • Anime/Library
        • Anime
        • Playback
        • Continuity
        • Auto Downloader
        • Auto Scanner
        • Filler Manager
        • External Player Link
      • Downloading
        • Downloader
        • Torrent Client
      • Other
        • Manga
        • Discord
        • MPV
    • Hooks
    • Example
  • Frequently asked
    • Feature requests
Powered by GitBook
On this page
  • 1. Write and test
  • Code the extension
  • Test in the playground
  • 2. Create a manifest file
  • Create the file
  • Paste the payload
  • 3. Share
  • 4. Update your extension
  • Add user configuration (optional)
  1. Content Providers

Write, test, share

PreviousChangelogNextAnime torrent provider

Last updated 1 month ago

Content providers are a type of extension used to add more sources to existing features in Seanime.

  • Anime torrent sources

  • Manga sources

  • Online streaming sources

1. Write and test

Code the extension

Test in the playground

  1. Go to the Extensions page in Seanime.

  2. Click on the Playground dropdown option.

  1. Select which type of extension you want to test and enter the code.

You will be able to select the method (function) you want to test. Different methods have different simulation parameters based on real in-app usage.

2. Create a manifest file

Create the file

Make the ID unique in order to avoid conflicts.

The name of the file should be the same as the ID.

my-original-extension-id.json
{
    "id": "my-original-extension-id",
    "name": "My Extension Name",
    "description": "My Extension Description",
    "manifestURI": "",
    "version": "1.0.0",
    "author": "Author Name",
    "type": "",
    "language": "",
    "lang": "",
    "payload": ""
}
  • id: ID of your extension.

  • name: The name of the extension.

  • description: A short description of the extension.

  • manifestURI: The URI where the manifest file is hosted. Used by Seanime to check for updates. This can be empty if you don’t plan on hosting and sharing your extension.

  • version: The version of the extension. x.x.x (e.g. 0.1.0)

  • author: The author of the extension.

  • type: The type of extension. See below for the available types.

  • anime-torrent-provider, manga-provider, onlinestream-provider

  • language: The programming language of the extension.

  • Can be typescript, or javascript.

  • lang: ISO 639-1 language of the extension’s content (e.g. “en”, “fr” etc.).

  • Set it to multi if your extension supports multiple languages.

Paste the payload

You have two options:

  1. Paste the code of your extension in the payload field.

  2. Paste a URL to the code of your extension in the payloadURI field and remove payload empty.

3. Share

4. Update your extension

This is a simple process. Just update the version field in the JSON file and paste the new code in the payload field.

Your extension might become incompatible with a later version of Seanime.

Do not change your extension ID between updates

Add user configuration (optional)

You can make it so users can enter arbitrary values that you can use in variables inside your code. This is useful when your extension needs to use a personal API key for example.

Guide
  • Declare any number of string variables containing the configuration field keys you want to accept in the format {{key}}. These variables will be replaced with the values the user entered when the extension is loaded.

  • In your manifest file, add a userConfig field.

The field's 'name' should be the same as the key between the double curly brackets in your code.

{
    //...
    "userConfig": {
        "requiresConfig": true,
        "version": 1,
        "fields": [
            {
                "name": "api",
                "label": "API URL",
                "type": "text",
                "default": "https://feed.animetosho.org/json"
            },
            {
                "name": "withSmartSearch",
                "label": "Enable Smart Search",
                "type": "switch",
                "default": "true"
            },
            {
                "name": "type",
                "label": "Provider Type",
                "type": "select",
                "default": "main",
                "options": [
                    {
                        "label": "Main",
                        "value": "main"
                    },
                    {
                        "label": "Special",
                        "value": "special"
                    }
                ]
            }
        ]
    }
}
  • requiresConfig: Set to true to force the user to validate the configuration before the extension is loaded.

  • version: The version of the configuration. Increment this number when you make changes to the configuration fields of your extension.

If you want to share your extension with others, you can host the manifest file on GitHub and the link to the file.

If you just want to use it for yourself, just place the JSON file in the extensions directory in your .

Check the for breaking changes and update your code accordingly.

share
data directory
Extension Changelog
Anime torrent provider
Manga provider
Online streaming provider