Skip to content

Repository files navigation

Emby.Plugins.Assrt

An Emby Server subtitle provider that downloads subtitles from assrt.net (射手网/伪) through its OSS API. It is aimed primarily at Chinese (简体 / 繁体) subtitles, with English / Japanese / Korean support where the uploaded subtitle provides them.

Built and verified against Emby Server 4.9.5 (.NET 8 runtime), target framework net8.0.


Features

  • Search and download subtitles from assrt.net directly inside Emby's Subtitle Downloads workflow.
  • Works for movies and TV episodes.
  • Language tagging from the assrt langlist flags, with smart picking of the best file inside multi-file archives (prefers a language match and a usable extension: srt > ass > ssa > vtt > sub > smi).
  • Returns the raw subtitle stream so Emby auto-detects the character encoding (handles GB2312 / Big5 / UTF-8 subtitles).
  • Configurable via the Emby dashboard (token, result count, match strictness).

Repository layout

.
├─ src/
│  └─ Emby.Plugins.Assrt/
│     ├─ Plugin.cs                    # plugin entry point (BasePluginSimpleUI)
│     ├─ AssrtSubtitleProvider.cs     # ISubtitleProvider: search + download
│     ├─ OpenCcConverter.cs           # in-process Simplified <-> Traditional conversion
│     ├─ Api/
│     │  ├─ AssrtApiClient.cs         # HTTP calls to the assrt OSS API
│     │  └─ AssrtModels.cs            # JSON response models
│     ├─ Configuration/
│     │  └─ PluginConfiguration.cs    # settings model (auto-generated dashboard UI)
│     ├─ Resources/opencc/            # OpenCC dictionary data (Apache-2.0, embedded)
│     └─ Emby.Plugins.Assrt.csproj
├─ docs/
│  └─ assrt-api.md                    # condensed assrt API reference & restrictions
├─ licenses/
│  └─ Apache-2.0.txt                  # license for the bundled OpenCC data
├─ Emby.Plugins.Assrt.sln
├─ build.ps1                          # build / deploy / restart helper
├─ LICENSE                            # GPL-3.0-or-later
├─ THIRD-PARTY-NOTICES.md             # attribution for bundled components (OpenCC)
├─ CHANGELOG.md
└─ README.md

How it maps to the assrt API

Plugin action assrt endpoint
Search subtitles GET /v1/sub/search?token=…&q=…&cnt=…&no_muxer=…
Download a subtitle GET /v1/sub/detail?token=…&id=… → download the chosen file

Search queries by movie title (or series name for episodes); GetSubtitles fetches details and downloads the best file. assrt download URLs expire, so the plugin always re-fetches details immediately before downloading (never caches a URL). See docs/assrt-api.md for the full API summary and restrictions.


Before you start: get an assrt token

The plugin does nothing without a token. Quick version (full details in docs/assrt-api.md):

  1. Register at https://assrt.net/user/register.xml — needs a nickname (≤12 chars), a valid email (avoid QQ mail), and a password (≥6 chars).
  2. Activate via the email link (the API stays locked until you do).
  3. Copy your 32-character token from the user control panel / API page.

Key restrictions to know up front

  • Rate limit is small and per-account, shared across your token and IP. The documented default is ~20 req/min but a new account may be as low as 5 req/min (check with /v1/user/quota). Large library scans can hit quota error 30900; request a higher quota from assrt if needed.
  • Search query must be ≥ 3 characters; max 15 results per search.
  • Attribution is required — assrt asks integrations to credit "字幕服务由 assrt.net 提供". This plugin does so via the provider name "Assrt" and this README; keep it if you fork.
  • Subtitle files are user-contributed content owned by their authors/assrt and are not covered by this plugin's license.

Build

Prerequisites

  • .NET SDK 8.0+https://aka.ms/dotnet/download. (If winget install Microsoft.DotNet.SDK.8 fails with "No applicable installer found", use the official script: & ([scriptblock]::Create((irm https://dot.net/v1/dotnet-install.ps1))) -Channel 8.0.)
  • A local Emby Server install — the project references MediaBrowser.Common/Controller/Model.dll from its system folder (they are not redistributed; referenced with Private=false).

Commands

# from the repo root
dotnet build -c Release
# or the helper (build + deploy into the Emby plugins folder + restart Emby)
.\build.ps1 -Deploy -Restart

By default the project looks for Emby at %AppData%\Emby-Server\system. If yours is elsewhere, pass the path:

dotnet build -c Release -p:EmbySystemDir="X:\path\to\Emby-Server\system"

Output: src\Emby.Plugins.Assrt\bin\Release\net8.0\Emby.Plugins.Assrt.dll. Only that single DLL is produced — System.Text.Json and the MediaBrowser.* assemblies are supplied by Emby's runtime.

Install

  1. Copy Emby.Plugins.Assrt.dll into your Emby plugins folder, e.g. %AppData%\Emby-Server\programdata\plugins.
  2. Restart Emby Server.
  3. Dashboard → Plugins → Assrt Subtitles → paste your API Token → Save.
  4. Dashboard → Library → (a library) → Subtitle Downloads → enable Assrt and the languages you want, then fetch subtitles on any item.

Configuration

Setting Default Description
API Token (empty) Required 32-char assrt token.
Max results per search 15 1–15 (the API maximum).
Match release group off When on, assrt filters by the release group in the file name. Leave off for broader matching.
Chinese conversion Off OpenCC character conversion of downloaded Chinese subtitles: s2t/s2tw/s2hk (Simplified → Traditional, generic / Taiwan / Hong Kong) or t2s (Traditional → Simplified). Each Chinese result is also offered unconverted. This is character conversion, not translation.

Troubleshooting

  • No results / nothing happens — confirm the token is saved and the library's Subtitle Downloads has Assrt enabled. Check …\Emby-Server\programdata\logs\embyserver.txt for [Assrt] log lines.
  • Quota errors (30900) — you've exceeded ~20 req/min; wait or request a higher quota from assrt.
  • Garbled subtitle text — Emby detects encoding from the stream; if a specific file is wrong, try another result.

License

This plugin is released under the GNU General Public License v3.0 (GPL-3.0-or-later). You may use, modify, and redistribute it under those terms; derivative works must remain GPL-licensed.

It bundles dictionary data from the OpenCC project, which is licensed under the Apache License 2.0 (compatible with GPLv3). See THIRD-PARTY-NOTICES.md for attribution and licenses/Apache-2.0.txt for the full license text.

Downloaded subtitle content is owned by its original authors / assrt.net and is not covered by this license. Respect assrt's terms of service.

Acknowledgements

  • Subtitle service provided by assrt.net (字幕服务由 assrt.net 提供).
  • Simplified ⇄ Traditional conversion data from OpenCC (Apache-2.0).
  • Built for Emby Server.

Support

If this plugin is useful to you, you can support development here:

☕ Buy Me a Coffee

About

Emby Server subtitle provider for assrt.net (射手网/伪) — Chinese subtitles with on-the-fly Simplified ⇄ Traditional (OpenCC) conversion. Built for Emby 4.9.x / net8.0.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages