chrissix666-lab

Tree / Self Hosting / Movies & TV Shows / Jellyfin / Navigation & Shortcuts

Keyboard Library Navigation

Configurable shortcuts for navigation, filtering, sorting and playback.

Status
Green · Published
Type
script
Hours
about 32
Tokens
about 15 M

A full command reference with real titles on every line sits in its README.

GitHub

In this article
  1. Controlling Jellyfin by typing
  2. How the language works
  3. Going places
  4. Playing
  5. Random
  6. Lists: filter, sort, view, letter
  7. Marking and the More menu
  8. Paging and scrolling
  9. Setup and settings
  10. What a command language runs into
  11. Also part of Essentials

Controlling Jellyfin by typing

The goal is in the first line of the README: control Jellyfin entirely by typing. Not a set of shortcuts, but a small command language. You start typing anywhere in the web interface and press Enter. Backspace edits, Escape clears, and a small overlay shows what you have typed so far. It stays out of the way while a video plays or a real input field has focus.

Almost everything you can reach with the mouse has a sentence here: libraries, tabs, titles, seasons, people, filters, sorting, views, the letter picker, playback, chapters, trailers, marking as watched, the More menu, paging, scrolling. Most words come with their obvious variants, so movies, movie, film and films all do the same thing and you never need to remember the one correct spelling.

How the language works

The first concept is scope. A bare command works on the page you are on, like sort name. A remote command works from anywhere and jumps first, like movies or gladiator.

Then you can combine. The script takes modifiers out of your sentence and always runs them in a fixed order: target, filter, view, sort, reset, then the action, and the letter last. That is why these three lines do the same thing:

  • armageddon sort name view banner letter a
  • letter a armageddon sort name view banner
  • sort name armageddon letter a view banner

Order matters in only a few places, and those are deliberate. movies fav opens the Favorites tab of the Movies library, and fav movies opens the Movies section of the global favourites page.

Some words mean two things. up scrolls if it can and otherwise searches for the film called Up. 9 scrolls to 9 percent and otherwise searches for the film 9. The forced forms page up and movie up always mean one thing.

WordTries firstFalls back toForce the actionForce the title
mletter M in the A to Z pickerthe film Mletter mmovie m
upscroll upthe film Uppage upmovie up
nextnext page arrowthe film Nextpage nextmovie next
9scroll to 9 percentthe film 9page 9movie 9

Going places

Libraries. movies, tvshows, livetv, collections, homevideos and music each have their aliases: tv, series, shows, live, pvr, sets, boxsets, songs and so on. A library's own custom name also works, so a renamed photo library is reachable by typing that exact name. Any Movies or TV Shows word lands on that library's first tab, on purpose, instead of whatever the page remembered.

Tabs. The library word comes first: movies trailers, series upcoming, livetv guide. Movies has Suggestions, Trailers, Favorites, Collections and Genres. TV Shows has Suggestions, Upcoming, Genres, Networks and Episodes. Live TV has Programs, Guide, Channels, Recordings, Schedule and Series. If you are already inside the library the tab word alone is enough, and while the Genres tab is open, typing a genre's name goes straight into it. movies genre war does both steps from anywhere.

Home and favourites. home and fav go to the global pages, and fav people or fav collections go to a section of the favourites page. Inside the Movies library the short forms prefer the local Favorites tab, so home fav exists to force the global page.

Titles. Just type the name. The script tries the exact title, then the title without a trailing bracket, then the title cut at a subtitle separator. The prefixes movie and tvshow are optional, and a release year helps when two films share a name. A trailing four-digit number is tried both as part of the title and as a year. If a film exists in several editions, add the distinguisher, as in blade runner final cut. If the match is not unambiguous, no match is returned, which is better than landing on the wrong film.

Seasons and episodes. farscape season 2, farscape s2 and farscape s02 are the same, and stargate atlantis s2:e1 or s02e01 reach an episode. babylon 5 specials opens season 0. Inside a show the short forms work alone: s2, e1, s2e1, or episode 1 spelled out. main goes from an episode or season back up to the series.

Collections. Title first, then the collection word: john wick collection, dark knight saga. The word is recognised in many languages, from filmreihe and coleccion to kolekcja and samling.

People. A person word plus a name opens the profile, as in actor idris elba, and person, actress, celeb and others work too. Adding a media word, in either order, jumps to that person's section: movies actors scarlett johansson, tvshows actors matt damon, episode celebrity chris evans.

Tags, genres, studios. tag based on true events, genre war and studio a24 open a list across all libraries, unlike movies genre war, which stays inside one library.

Search and system. search alien or find gladiator open the search results. reload, back for the browser's back button, fullscreen and window round it off.

Playing

play gladiator, armageddon play, resume con air and replay pearl harbor work in either order. On a film or episode, Play and Resume are the same button and Replay forces a restart. On a series, season or collection there is only one visible Play button, and only shuffle differs. Once you are on the page, play needs no title at all, and play s2, play e3 and play s2e3 work from inside a show. A show or season starts with the first unwatched episode, or from the beginning.

  • Chapters: play gladiator chapter 3, or the chapter's real name if the file has named chapters
  • Percent: play starship troopers 50%, or just play 75% on the current item; 0% acts like a forced replay and 100% is capped to 99 so you do not land past the end
  • Trailers: trailer on the current page, or farscape trailer, babylon 5 season 2 trailer, john wick collection trailer; everything except episodes and home videos
  • Next Up: next up on a series page, farscape next up from anywhere, play next up to start it directly

Random

Bare random looks at where you are. On a library page it picks from that library. On a genre, studio, tag or person view it asks the server across the whole list, not only what is loaded on screen. Inside a specific item it goes one level deeper: a series or season gives a random episode, a collection gives a random movie, an episode gives a different episode of the same show. From Home it picks a mix. Filters you set by hand are not taken into account, only the base view.

  • Forced type: random movie, random collection, random tvshow
  • Scoped to a title: farscape random, random mission impossible collection, stargate sg-1 random s2, farscape random season
  • Played instead of opened: add play, as in play random movie
  • Nested: random tvshow random episode picks a random show, then a random episode inside it, and random collection random movie does the same for collections
  • With a seek: play farscape random chapter 3, play random tvshow random episode 50%

Lists: filter, sort, view, letter

Filter takes pairs of category and value, as many as you like. The categories are genre, year, tag, rating, feature, video type and filter. Features are subtitles, trailers, special features, theme songs and theme videos. Video types are hd, sd, 4k, 3d, bluray and dvd. The filter category holds played, unplayed, resumable and favourite. So filter genre action rating pg-13 feature trailer video type 4k is one line, and movies filter genre action jumps first.

Reset is whole or partial. reset filters clears everything, reset filters genre removes all genre filters, and reset filters genre war rating r removes exactly those two and keeps the rest.

Sort uses sort plus a field, optionally with ascending or descending, or only the direction to keep the current field. Movies offer name, random, community and critics rating, date added, date played, parental rating, play count, release date and runtime. TV Shows add date episode added, list views add folders, and the Collections tab has a shorter list.

View uses banner, list, poster, poster card, thumb and thumb card. List views add primary, disc and logo, plus show title for the checkbox.

Letter jumps in the A to Z picker: letter a, or letter # for entries that start with something else. It runs last wherever you typed it, so the full line movies filter genre action view thumb sort runtime letter d works in any word order.

Marking and the More menu

Watched and favourite are toggles with a forgiving grammar. Fifteen sentence patterns (add to, mark as, set, remove from, toggle and more) combine with watched, unwatched, played, unplayed or with the favourite spellings. The watched words also work alone. Each works on the current page or on a title: mark played con air, armageddon mark fav, tvshow toggle favourite farscape.

The More menu has a word for each entry, most of them spaced or squashed: download, download all, add to collection, add to playlist, copy stream url, edit metadata, edit images, edit subtitles, identify, media info, refresh metadata, share, delete. Downloads work for a movie, a whole show, a season or an episode, so download farscape s2e1 is enough.

Paging and scrolling

  • Between pages: next page, prev page, page first, page last, and repeats like next 3 or 5 prev, which stop early at the end
  • Within a page: page top, page bottom, page up, page down, page 65 for a percent position, 34 down for many screens at once
  • Lazy forms: next, prev, up, down, top, bottom or a bare number, with the title fallback described above
  • Auto-scroll: scroll, scroll slow, scroll fast, and stop; it keeps running while you type other things, and scroll delay 5 sets the pause before it restarts at the top

Setup and settings

The script needs the JavaScript Injector by n00bcodr and nothing else. The settings sit at the top of the script:

NameDefaultEffect
idleResetMs2500How long the typed buffer waits before it resets, in milliseconds
minLength1Minimum characters before Enter runs anything
preventSpaceScroll"smart"true always blocks spacebar scrolling, false never does, "smart" blocks it only once you have started typing, so an empty buffer scrolls as usual
showIndicatortrueShows the overlay of what you typed
indicatorCorner"top-center"Anchor of the overlay: the four corners, top or bottom center, or the center of the screen
indicatorOffsetX"0vw"Extra horizontal offset, as percent of window width, so it stays independent of resolution
indicatorOffsetY"6vh"Extra vertical offset, as percent of window height
indicatorColor"#00ff41"Text colour of the overlay

The defaults work as they are. If the overlay collides with your theme, move it, and if you type slowly, raise idleResetMs.

Very little has to be learned before it is useful. A library word and a title already cover most evenings, and the long lines are for the moments when you would otherwise click through four menus: movies filter genre action view thumb sort runtime letter d replaces a filter dialog, a view menu, a sort menu and the letter picker.

What a command language runs into

This was large from the start: the current script has 4,800 lines, and the README is a reference of about 50 KB. The script does not get a clean interface to Jellyfin. It reads the page, finds the right control and presses it for you. That is why the audit by Claude sessions, with a counter-audit against the source of both versions, turned up a long list.

Enter was the first thing to go wrong. The script swallowed it always, which broke OK on TV layouts and normal keyboard use. It now only takes Enter for a typed command. Any <video> on the page also counted as a stop signal, so a theme video blocked typing, and only the real player counts now.

The dangerous one came from the counter-audit. Item actions such as delete, edit and identify looked for a More button across the whole page, so on a library page they could hit the first card. Those commands now work on detail pages only.

Then there is the page itself. Filter labels and menu texts differ by language and by dialog, so finding controls by their text left some filters doing nothing. Jellyfin keeps old pages hidden in the document, and Next Up could hit one of those.

Jellyfin 12's new library pages forced the biggest change. They are built with React, so clicking through them was no option. The script now changes the page's own stored settings for sort, view, filter and tabs, which also works in any language. On 10.10.7 the same approach serves only the experimental layout, and the classic pages stay as they were.

Also part of Essentials

This script now also runs inside my Essentials plugin, with its settings on a normal dashboard page instead of values at the top of the code. On its own, through the JavaScript Injector, it works as before.

Connected

Next: MKV Subtitle Extractor & Parser