Skip to content

Impulse139/JellyFin_MultiTag

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jellyfin_multi_tag

This is a fork to Druidblack's jellyfin_multi_tag script Druidblack/jellyfin_multi_tag

Which was inspired by BobHasNoSoul/Jellyfin-Qualitytags.

Disclaimer: I am not very experienced in coding, so Claude AI was used to help me create my tweaks and changes.

This script adds badges with information about quality, episode count, series status, and more.


Installation

  1. Install the JavaScript Injector Plugin for Jellyfin
  2. Get a free API key from themoviedb.org
  3. Paste the contents of multi_tag.js into the plugin (REPLACING API_KEY with your TMDb key), save, and reload
  4. For media bar integration, also inject MediaBar_QualityTags.js
  5. If badges don't appear immediately, clear your browser/client cache. For Jellyfin Media Player the cache is at: C:\Users\USERNAME\AppData\Local\Jellyfin Media Player\cache

Additional settings at the beggining of the file that can be adjusted:

  const SHOW_DV_PROFILE = true;                  // DV P7/P8.x or just DV

  const SHOW_RATINGS = false;                    // show/hide rating badges completely
  const COLORIZE_RATING = false;                 // color indication of the rating
  const RATING_COLOR_TEXT_ONLY = false;          // if true: color the text, background #f0f0f0

  // Season plan and progress
  const ENABLE_PLANNED_EPISODES = true;          // pull up the planned number of episodes of the season
  const SHOW_SEASON_PROGRESS_BADGE = true;       // "Ep current/planned" if both numbers are present

  // TMDb (source for season plans and series status)
  const ENABLE_TMDB = true;                      // TMDb for seasonal plans
  const ENABLE_TMDB_ENDED = true;               // TMDb as a source of "Ended" status for TV series
  const TMDB_API_KEY = 'API_KEY';               // <<< insert your TMDb API key
  const TMDB_LANGUAGE = 'en-US';

  // Series: status badges
  const SHOW_SERIES_ENDED_BADGE = true;         // show the red "Ended" badge
  const SHOW_SERIES_CONTINUING_BADGE = true;    // show the green "Ongoing" badge

For Custom CSS with non rectangular Cast & Crew cards, Recommend setting these values to FALSE:

  // Person (actors): birthplace on poster (from Jellyfin metadata)
  const SHOW_PERSON_BIRTHPLACE = false;

  // Person (actors): display birth country as flag (optional)
  // Mode: 'text' (place text), 'flag' (flag only), 'both' (flag and text)
  const BIRTHFLAG_FALLBACK_TO_TEXT = false;

  // Person (actors): age at time of current film/episode release (from Jellyfin metadata)
  const SHOW_PERSON_AGE_AT_RELEASE = false;
  const SHOW_PERSON_AGE_AT_RELEASE_BOTTOM = false; // additionally: age bottom right

Features

Original features — unchanged

The following features from the original script are present and untouched:

  • Music album format badge (FLAC, MP3, AAC, etc.)
  • E-book format badge (EPUB, PDF, MOBI, etc.)
  • Actor birthplace and country flag on person cards — supports text, flag emoji, or both (PERSON_BIRTHPLACE_DISPLAY); rendered via Twemoji for cross-platform consistency
  • Actor age at time of current film/episode release date (top-left badge), plus current age or age at death (bottom-right badge)

Original features — modified

The following original features are still present but have been extended or changed:

  • Video resolution — still shows a resolution badge, but expanded (see Video Quality)
  • Audio format — still shown as a badge, but completely rewritten detection engine (see Audio Quality)
  • Ratings — still shown, but now can be disabled entirely via SHOW_RATINGS
  • Series status and quality badge* — "Ended" badge still present; now joined by an "Ongoing" badge (see Series Status)
  • Series quality badge — New method for determining series quality; (see Series quality detection fix)

Changes

All comments translated from Russian to English

The original script's comments were in Russian, which have been translated to English.


New on/off toggles

  • SHOW_RATINGS — hide or show rating badges entirely. The original always showed them with no way to disable
  • SHOW_SERIES_CONTINUING_BADGE — enable or disable the new "Ongoing" badge for currently airing series independently of the "Ended" badge

Series status

Two separate status badges are now shown on series cards, both sourced from TMDb:

  • 🔴 Ended — shown when TMDb reports the series as ended, canceled, or cancelled (controlled by SHOW_SERIES_ENDED_BADGE)
  • 🟢 Ongoing — shown when TMDb reports the series as returning series, in production, or planned (controlled by SHOW_SERIES_CONTINUING_BADGE)

Both badges can be enabled or disabled independently.


Series quality detection fix

The original script fetched whatever episode appeared first in the database when determining the quality badge for a series card — this could be a Season 0 special or an extra, resulting in a wrong or missing quality badge.

This fork first explicitly requests the first episode of Season 1 (ParentIndexNumber: 1). If no Season 1 episode exists, it falls back to any episode while still explicitly excluding Season 0 items.


Video quality

HDR / Dolby Vision badges

Badge Color Hex Notes
DV (Dolby Vision) #8000cc
HDR #cc0000
SDR (DV+SDR) #6b4f5a Shown instead of HDR when DV base layer is SDR (BT.709)

Resolution badges

The generic HD label from the original has been removed entirely.

Ranges account for cropped content (e.g. a 1920×804 file with black bars removed still correctly detects as 1080p).

The original had 3 resolution tiers (4K, HD, SD). This fork expands to 6 distinct tiers, each with its own badge color:

Badge Threshold Color Hex
8K > 2160px height #6600cc
4K 1441 – 2160px height #0066cc
2K 1081 – 1440px height #00cccc
1080p 721 – 1080px height #009933
720p 481 – 720px height #ffa500
SD ≤ 480px height #666666

Audio quality

The original detected only 3 outcomes: ATMOS, DD 5.1, or Stereo — all based solely on channel count. This fork replaces that with a full scoring engine that identifies the actual codec from multiple Jellyfin metadata fields, then selects the best stream by format quality first and channel count second.

The detection now reads from: DisplayTitle, Title, Profile, Codec, AudioCodec, Format, Container, ChannelLayout, CodecTag, CodecLongName — this handles cases where Jellyfin strips codec fields from combined movie versions.

All audio badges include a channel suffix (e.g. Dolby Atmos 7.1, DTS-HD MA 5.1).

Audio hierarchy

Score Badge Label Color Hex
21 DTS:X #00bcd4
20 Dolby Atmos #00acc1
19 Dolby (TrueHD) #0097a7
18 DD+ Atmos #00838f
17 DTS-HD MA / PCM / LPCM / FLAC #00796b
16 DTS-HD HRA #00695c
15 DTS-HD #004d40
14 DD+ #33691e
13–11 xHE-AAC / HE-AACv2 / AAC-ELD #33691e
10 DTS ES #7cb342
9 DD EX #e65100
8 DTS #ef6c00
7 DD #f57c00
6–3 OPUS / AAC / AAC-LC / HE-AAC / AAC-LD #f57c00

PCM and LPCM additionally display bit depth where available (e.g. PCM:S24 5.1).

Mono/Stereo

Score Badge Label Color Hex
2 Stereo #546e7a
1 Mono #455a64

Stereo and Mono appear as badge labels when no recognizable surround codec is detected. Additionally, any codec that resolves to a 2.0 or 1.0 channel track (e.g. DD 2.0, DTS 2.0) will display using the Stereo or Mono color respectively — since at that channel count, the experience is stereo/mono regardless of codec. Lossless formats (FLAC, PCM, LPCM) are exempt from this override and always keep their own color.


Media bar integration

A companion script MediaBar_QualityTags.js is included in this repository. It integrates the quality tag data into the Jellyfin media bar, displaying the quality badges alongside the shown item's info.


Persistent localStorage cache

Quality data is now cached in localStorage under the key jellyfin_quality_cache_v1, persisting across browser sessions for significantly faster badge rendering on repeat loads.

Cache entries are automatically invalidated using two strategies:

  • DateModified check — if Jellyfin's DateModified timestamp has changed (e.g. a file was replaced or metadata was edited), the entry is discarded and re-fetched.
  • ChildCount check (Seasons) — if the episode count on a Season has changed, the entry is invalidated even if DateModified is unchanged. Jellyfin does not update DateModified on a season when a new episode is added, so this check catches that case explicitly.

Additionally, if a Movie or Episode is cached with no quality data (no resolution, no audio codec) — which can happen if the entry was fetched before Jellyfin finished scanning the file — the cache entry is automatically discarded and re-fetched on the next page load. This retries every session until real data is returned. Each normally-populated item is only re-validated once per session. A utility function window.clearJellyfinQualityCache() is also exposed for manually clearing the cache from the browser console if needed.


Shared window API

The following are exposed on the window object to allow companion scripts (such as MediaBar_QualityTags.js) to stay in sync with the quality tag script without duplicating logic:

  • window._jellyfinAudioColorMap — the full audio format-to-color mapping
  • window._jellyfinDetectAudioLabel — the audio detection function
  • window._jellyfinOverlayCache — the live overlay cache

Screenshots

logo logo1 logo2 logo3 logo4 logo3

About

This fork has my own tweaks and changes to Druidblack's jellyfin_multi_tag script which adds tags with information about video/audio quality, ratings, show status, number of episodes, etc..

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%