About Extensions
Important
Shiru does not provide extensions and the maintainers cannot provide you sources. Please do not ask.
Frequently Asked Questions about Extensions.
What are some recommended extensions and sources?
Shiru is bring-your-own-content and does not offer anything.
Is there a curated list of extensions and sources?
No. Shiru is not directly associated with any extensions or sources. It's merely a client for streaming one's own media.
How to install/uninstall extensions?
Inside Settings > Extensions > Sources you can add sources by either inputting a full URL such as https://example.website/index.json or if extensions are published on npm you can use npm:User/PackageName or on github gh:User/PackageName. This will automatically import all extensions the source provides. You can then uninstall an extension by pressing the remove button next to it.
Can you disable extensions?
You can disable extensions in the extensions list by clicking on their toggle.
How to develop new extensions?
Extensions for Shiru need to be written in JavaScript which are run in an isolated Web Worker. Make sure the data you're fetching is CORS enabled. Extension type definitions and example structures are available on GitHub. For testing you can specify a file path to the extension you are developing to quickly verify changes.
Options object, which is passed to the class's single, batch and movie functions as the first parameters has the following fields:
- anilistId: number - Anilist anime id, can be used to query data from Anilist, such as MalID, episode metadata etc
- anidbAid?: number - AniDB anime id, not always present, useful to query mapping API's
- anidbEid?: number - AniDB episode id, not always present, useful to query specific data, as AnidbEIDs map to manually maintained files
- titles: string[] - list of titles and alternative titles for the given anime
- episode?: number - episode to look for, not always present
- episodeCount?: number - total episode count for the series, not always present
- resolution: '2160' | '1080' | '720' | '540' | '480' | '' - resolution height. empty string means any
- exclusions: string[] - list of keywords to exclude from searches such as codecs unsuppored by the platform, etc
Results object, array of which is returned by the functions of the class has the following fields:
- title: string - torrent title, this isn't always the file title as a torrent might include multiple files
- link: string - http:// link to .torrent file, or magnet:// link
- id?: number - unused for now
- seeders: number
- leechers: number
- downloads: number
- hash: string - info hash REQUIRED
- size: number - size in bytes
- verified: boolean - if it's a verified release, e.g. it's 100% certain it's the correct episode, manually verified by the provider e.g. anidb
- date: Date - date the torrent was uploaded
- type?: 'batch' | 'best' | 'alt' - type of the result best/alt means it's the best known release