Repository navigation
Offline subtitles for downloads, faster source search, Stremio add-ons - #15
Merged
Merged
Conversation
Downloads get a Subtitles sheet: tick any number of subtitles from OpenSubtitles and SubSource (grouped by language, any language searchable, SDH filter) or import an SRT/VTT/ASS file. They are kept per title and episode in filesDir/subtitles and the player lists them first, online or offline. SubtitleFetcher reads file: URLs only from that folder. "Save to gallery" repackages a finished download into an MP4 in Movies/OpenStream with Media3 Transformer, reading the download cache like the offline player, without re-encoding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Q3Wvy4u4xbBdt49QcBbkR
The export never writes to or evicts the download cache, whatever the shared CacheDataSource factory is set to; a failed or cancelled export only removes its temp MP4 and the unfinished gallery entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Q3Wvy4u4xbBdt49QcBbkR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Q3Wvy4u4xbBdt49QcBbkR
Removes GalleryExporter and the media3-transformer dependency. The Downloads subtitle sheet only searched OpenSubtitles and SubSource, so subtitles the player showed under the source's name never appeared there. Downloads now record the stream's subtitles (stream.json next to the saved ones); older downloads look the title up in the stream sources again. They are listed first and saved with the stream's headers. SubtitleFetcher only reads .srt/.vtt/.ass from the saved folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Q3Wvy4u4xbBdt49QcBbkR
Saving a stream's subtitles failed with "no readable subtitles": the parser only accepted hh:mm:ss.mmm, while WebVTT may write mm:ss.mmm. The player never hit this because ExoPlayer parses stream subtitles itself. The same parser feeds sideloaded subtitles in the player and the cast proxy. Subtitle URLs that turn out to be HLS playlists are now fetched segment by segment and joined. A save that gets a web page back says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Q3Wvy4u4xbBdt49QcBbkR
Settings > Downloads > Subtitles picks any number of languages (English by default; none turns it off) and whether OpenSubtitles and SubSource count too. When a download starts, DownloadSubtitleSaver saves every subtitle in those languages: the stream's own, then the sites' (languages the general search leaves out are asked for by name). It stops when the download is removed and cleans up if it was removed meanwhile. Both settings are in backups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Q3Wvy4u4xbBdt49QcBbkR
… breaker - Cancelling a resolution (leaving the player, switching episodes) was recorded as a failure of every provider still running; five of those turned a provider off until the app restarted. Cancellation now records nothing, and the breaker reopens after two minutes. If it would leave nothing to try, everything is tried. - The 20 s provider timeout could not interrupt OkHttp's blocking execute(), so one slow provider held up completion and the fallback stage. Providers now run in their own scope and are awaited with a 25 s deadline (enough for the WebView path); every provider yields an outcome, so a resolution can't wait forever. - The IMDb id lookup ran first with no limit on TMDB; it now gets 8 s, and the "searching" state is sent before it. - Fallback providers start after 8 s if direct ones have found nothing yet, instead of waiting for the slowest direct provider. - AnimeEpisodeMapper locks per episode, so a lookup stuck on the previous episode no longer blocks the next one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Q3Wvy4u4xbBdt49QcBbkR
- New `stremio` engine (StremioAddonProvider): reads the add-on manifest
for content types and id prefixes, asks /stream/{movie|series}/{id}.json
with IMDb ids (tmdb: ids when the add-on takes them), and plays streams
that carry a direct url, with the add-on's request headers and
subtitles. Torrent, YouTube and external-link streams are skipped.
- A Stremio manifest.json (or stremio:// link, or /configure page link)
pasted into Add repository becomes a one-add-on repository and is
installed right away when it serves streams without needing setup.
- Official catalog: HdHub, yastream, Zeus, FrostStream and FenixFlix,
each checked to return direct streams for a movie and an episode with no
account or key (status Beta). Bundled copy updated.
- Docs: engine tables, how Stremio add-ons map onto extensions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Q3Wvy4u4xbBdt49QcBbkR
HdHub listed The Matrix 27 times: about a dozen releases, each on up to four hosts, and 16 of those links could not play (12 hubcloud mirrors redirect to a 404, 3 FSLv2 signed URLs had already expired, 1 PixelDrain file wanted a captcha). The player failed over through them one by one, which looked like it switching between qualities. - Streams are grouped by release name and size; each release keeps the first mirror that answers a 16-byte range request with video bytes (or #EXTM3U for HLS). Releases are checked in parallel within 8 s. - Labels read "add-on name · size · release" instead of the host and size tags, and keep two-line add-on names together. - The player says a source "didn't play" rather than "stopped responding", which also covered links that were dead from the start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Q3Wvy4u4xbBdt49QcBbkR
- Marketplace > Installed shows each source's rank with arrows to move it. The order is stored per device; sources not ranked yet follow the catalog's priority. A provider's priority is now its position in it. - Search order: "All at once" (default, unchanged behaviour: everything in parallel, streams sorted by quality, the order breaking ties) or "In my order": one source at a time from the top, stopping at the first that finds streams, ranked by the order before quality. When those streams all fail, or on Find more, everything else is searched as before. - The mode is in AppSettings and in backups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012Q3Wvy4u4xbBdt49QcBbkR
Add-ons label streams with host tags, emoji and scene file names
("HdHub VM 1080p · 1.98 GB · Matrix.1.The.Matrix.(1999).1080p.Dual.Audio.
(Hin.Eng).Vegamovies.is.mkv"). StremioStreamLabels rebuilds each name from
what the add-on says, in a fixed order: resolution, HDR, IMAX, source,
codec, 60fps, audio languages (or dual/multi audio), dubbed/subtitled, size
-- "1080p · BluRay · HEVC 10-bit · Hindi + English · 1.98 GB". Streams that
say too little lead with a cleaned remainder of their own text, minus the
film's title, years, episode markers and emoji ("kisskh", "Source 2 ·
Dubbed"). Same names within one add-on get numbered.
Also fixes mirror grouping: it keyed on the first title line only, so Zeus's
dubbed and subtitled streams (both "Fonte: Filme/Serie 02") were merged.
The key now uses every descriptive line except host footers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Q3Wvy4u4xbBdt49QcBbkR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Subtitles for downloads
SavedSubtitleRepositorykeeps files infilesDir/subtitles/<download id>/withindex.json, plusstream.jsonrecording the stream's own subtitles. The player lists saved subtitles first, online or offline, and never reloads the media item for them.SubtitleFetcherreadsfile:URLs only for.srt/.vtt/.assinside that folder, because the cast proxy fetches any URL it is given.01:02.345) were dropped, so stream subtitles had no cues. This affected saving, sideloaded subtitles in the player and casting. HLS subtitle playlists are now joined into one file.Source search
execute(), so one slow provider held up completion and the fallback stage. Providers now run in their own scope and are awaited with a 25 s deadline, and every provider yields an outcome.AnimeEpisodeMapperlocks per episode.Stremio add-ons
stremioengine (StremioAddonProvider). It reads the add-on manifest for types and id prefixes, then requests/stream/{movie|series}/{id}.jsonwith IMDb ids, ortmdb:ids when the add-on accepts them. It plays direct-urlstreams with the add-on's request headers and subtitles; torrent, YouTube and external-link streams are skipped.manifest.json,stremio://link or/configurelink pasted into Add repository becomes a one-add-on repository, installed right away when it can play.The "Save to gallery" feature from earlier commits was removed again, along with the
media3-transformerdependency.Risk / third-party behaviour relied on
sublanguageid-<ISO 639-2/B>), SubSource's site API: undocumented, keyless.🤖 Generated with Claude Code
https://claude.ai/code/session_012Q3Wvy4u4xbBdt49QcBbkR