/play endpoint to parse multi-quality HLS playlists from episode file strings before returning the stream to the player.
Version 2.1. The key in
init.conf must be "LME.NMoonAnime" (not "NMoonAnime" or "MoonAnime").HTTP routes
| Method | Path | Description |
|---|---|---|
GET | /lite/lme.nmoonanime | Main entry point — search, season list, voice selection, episode listing |
GET | /lite/lme.nmoonanime/play | Parses a file string into one or more HLS quality URLs and returns the stream |
How it works
Serials
Search
The module queries the Moonanime API using the title, IMDb ID, and optionally a MAL ID. The MAL ID can be supplied directly via the
mal_id parameter or inferred from kinopoisk_id when the source is hikka. TMDB sources suppress MAL ID lookup entirely.Serial detection
If
serial=-1 (type unknown), the module fetches the first season’s content to determine whether the result is a series or a movie, then routes to the appropriate rendering path.Season list
For serials, seasons are ordered by
SeasonNumber and listed. Selecting a season reloads with s=<number>.Voice selection
Each season has one or more voice tracks (dubbed or subbed). Voices are indexed numerically; the
t parameter holds the selected index (defaults to 0).Episode playback
Each episode carries a
file string that encodes one or more quality-labelled HLS URLs. The module routes all episodes through /lite/lme.nmoonanime/play, which parses the file string into individual quality streams. If only one quality is available, it is returned directly. Multiple qualities are returned as a StreamQualityTpl.Movies
For movies, each voice track’s file string (or the first available episode file) is sent to/play in the same way as serial episodes. The result is a list of voice options, each with a call action.
Stream resolution via /play
The /play endpoint receives a file parameter — a compact string encoding one or more HLS stream URLs with optional quality labels — and calls ParseStreams to split it into individual entries. It then wraps each URL through HostStreamProxy (with Referer: https://moonanime.art/) and returns either a single stream JSON or a StreamQualityTpl for the player to present quality options.
init.conf example
Configuration reference
Enable or disable the module.
Base URL of the Moonanime site.
Name shown in the Lampac UI.
Sort order among sources.
Route stream URLs through Lampac’s built-in stream proxy. Automatically disabled when
apn is active.Send HTTP requests to moonanime.art through the configured SOCKS5 proxy list.
Enables APN stream proxying. When
true, set apn_host to the proxy URL template. If active, streamproxy is automatically disabled.Proxy URL template used when
apn is true. Supports {encodeurl}, {encode_uri}, or {uri} as placeholders for the stream URL.