feat(jellyfin): watch from one's own Jellyfin server and learn the words of its subtitles

Animelon's way of learning from video, from the person's own Jellyfin
server: connected per device (Settings, or a studyset's Add material ›
Watch from Jellyfin) with a name and password or a Quick Connect code,
over HTTPS only (plain HTTP only to a server on the same machine); the
token stays in the system's keyring. Shows, films and videos tied to a
studyset follow the person in their settings as the server's and the
item's ids alone (settings schema 9), named by the server when shown.

The Watch screen plays the video (video_player on Android, media_kit's
libmpv on Linux and Windows) with the line in the studyset's front
language cut into the dictionary's words with furigana, and the back
language's line beneath; a word tapped pauses the video and becomes a
card with the line and its translation as its first hint, tagged with
the show. The video's words are listed, most frequent first. The sound is
the track in the studyset's language, whichever the file marks default,
and the menu switches it; the subtitles read are a whole track, never a
forced one (which only covers what the sound doesn't say), and captions
for the hard of hearing only without plain ones. The line and its
translation take the video's width in a box of a fixed height, so the
video keeps its size; in the dark theme the video's colours glow around
it, as YouTube's ambient mode, and the words' panel takes the colour of
the episode's picture under the pointer.

A line is cut into words with one request: DictionaryEndpoint.withKeys
looks up every stretch of it that may be a word, as it stands and as
every word it may be a conjugation of, in the new dictionary_key table
(one row per key, indexed; migration dictionary-keys adds the table and
its index, nothing else), which the loader fills beside the entries.
The instance gets the text of each line looked up and keeps none of it,
as the Watch screen says.

Linux builds need libmpv-dev, and the app links libmpv: the snap stages
Ubuntu's libmpv2, makes the update-alternatives links for BLAS and LAPACK
that ffmpeg's speech recognition needs (staging never runs install
scripts), and removes what the GNOME runtime and core24 already hold, as
older copies of cairo, pango and librsvg hid the runtime's from its GTK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-13 11:31:37 +02:00
commit da51ef73cb
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -2048,5 +2048,63 @@
"planContinue": "Continue “{title}”",
"@planContinue": {"placeholders": {"title": {"type": "String"}}},
"planNothing": "Nothing due right now.",
"planLearningPaths": "Learning paths"
"planLearningPaths": "Learning paths",
"jellyfinTitle": "Jellyfin",
"jellyfinSubtitle": "Watch shows and films from your own Jellyfin server, and learn the words of their subtitles.",
"jellyfinPrivacy": "Your server's address and your sign-in stay on this device, and the shows tied to a studyset follow you as ids, never titles. To find the words of a line, the app asks the instance about its text, which it answers and doesn't keep.",
"jellyfinSignedInAs": "{user} on {server}",
"@jellyfinSignedInAs": {"placeholders": {"user": {"type": "String"}, "server": {"type": "String"}}},
"jellyfinSignOut": "Sign out of Jellyfin",
"jellyfinAddress": "Server address",
"jellyfinAddressHint": "jellyfin.example.org",
"jellyfinFind": "Continue",
"jellyfinUser": "User name",
"jellyfinPassword": "Password",
"jellyfinSignIn": "Sign in",
"jellyfinQuickConnect": "Sign in with a code",
"jellyfinQuickConnectCode": "Enter this code under Quick Connect in a Jellyfin app you're signed in to:",
"jellyfinQuickConnectWaiting": "Waiting for the code to be approved…",
"jellyfinOtherServer": "Another server",
"jellyfinUnreachable": "No server answered at that address over HTTPS.",
"jellyfinNotEncrypted": "That address isn't encrypted, and your password would travel in the clear. Use the server's HTTPS address.",
"jellyfinNotJellyfin": "That address isn't a Jellyfin server.",
"jellyfinWrongCredentials": "The user name or password is wrong.",
"jellyfinSignedOut": "You were signed out of Jellyfin. Sign in again.",
"jellyfinFailed": "That didn't work on the Jellyfin server. Try again.",
"studysetWatch": "Watch from Jellyfin",
"jellyfinBrowseTitle": "Watch",
"jellyfinTied": "Tied to this studyset",
"jellyfinLibraries": "Libraries",
"jellyfinSearchHint": "Search shows and films",
"jellyfinTie": "Tie to this studyset",
"jellyfinUntie": "Untie from this studyset",
"jellyfinEmpty": "Nothing here",
"jellyfinEpisode": "S{season} E{episode}",
"@jellyfinEpisode": {"placeholders": {"season": {"type": "int"}, "episode": {"type": "int"}}},
"jellyfinNoPlayer": "Videos can't play on this device.",
"jellyfinNoPlayerLinux": "Videos can't play on this device: playing them needs libmpv (the package libmpv2).",
"watchNoSubtitles": "This video has no subtitles in the studyset's language as text, so there is nothing to look up.",
"watchSubtitles": "Subtitles",
"watchTranslation": "Translation",
"watchAudio": "Audio",
"watchTracks": "Audio and subtitles",
"watchNone": "None",
"watchPlay": "Play",
"watchPause": "Pause",
"watchPreviousLine": "Previous line",
"watchNextLine": "Next line",
"watchRepeatLine": "Repeat line",
"watchPauseAtLineEnd": "Pause after each line",
"watchWordsTitle": "Words in this video",
"watchWordsNewOnly": "New only",
"watchWordsFinding": "Finding the words…",
"watchWordCount": "{count}×",
"@watchWordCount": {"placeholders": {"count": {"type": "int"}}},
"watchAdd": "Add",
"watchAdded": "{word} added, with this line",
"@watchAdded": {"placeholders": {"word": {"type": "String"}}},
"watchTapAWord": "Tap a word of the subtitles to look it up.",
"watchFormOf": "A form of {word}",
"@watchFormOf": {"placeholders": {"word": {"type": "String"}}},
"watchFailed": "The video couldn't be played."
}