Skip to content

Kodi as a second target; the Jellyfin folder is optional - #7

Merged
Ivamic merged 6 commits into
mainfrom
feat/kodi
Nov 15, 2026
Merged

Ivamic merged 6 commits into
mainfrom
feat/kodi

Conversation

@Ivamic

@Ivamic Ivamic commented Nov 15, 2026

Copy link
Copy Markdown
Owner

What changes

  • Several targets in one app. Immich is read once per pass; every target plans and writes its own output folder, with its own files and its own queue for the media server in the registry (migration 0008). Pictures are downloaded once for all targets. Jellyfin is optional: a folder for Jellyfin, for Kodi, or both.
  • Kodi. SHOWRUNNER_KODI_OUTPUT_LOCATION adds a folder for Kodi 21 with "Local information only". Files are named by the time of filming and a decimal id (2024-07-15 143211 [1898906754].mp4); the season and the number come from the NFO, so watched marks stay when a video is inserted. Faces of people go to .actors/.
  • Telling Kodi over JSON-RPC (SHOWRUNNER_KODI_URL, _USERNAME, _PASSWORD, _OUTPUT_PATH): a changed show is cleaned within its own folder, the library scanned and the show refreshed; a show without files is removed. Shows are found by the Immich id in their NFO. Changes wait while Kodi is off.
  • Settings named by target: SHOWRUNNER_JELLYFIN_OUTPUT_DIR / _LOCATION; the old SHOWRUNNER_OUTPUT_DIR / _LOCATION are still read when the new ones are not set.
  • A disk that is not mounted: an output folder that lost its .showrunner file while the app has files there is left alone; Kodi cleans a show only when it opens its folder.
  • Documentation: a Kodi step in docs/install.md (Samba, source, web server), the READMEs in five languages, CHANGELOG. Version 0.2.0rc1.

Checked

  • 194 tests in Linux with PostgreSQL; ruff, mypy, the web page checks.
  • Migration 0008 up and down on data.
  • Kodi 21.3: the naming scheme tried on a trial library (the hexadecimal id with e and digits, S2024E03 in the name rejected because watched marks moved); the folder written by the test instance recognised completely; the app's client told a real Kodi about a new title, a removed episode and a removed show, with the watched mark kept.
  • Test instance: both folders written, Jellyfin unchanged; an emptied Kodi folder is not filled.

🤖 Generated with Claude Code

Ivamic and others added 6 commits November 15, 2026 11:50
Immich is read once per pass and every target plans and writes its own output folder: the
registry keeps files and the queue for the media server per target (migration 0008). Pictures
are downloaded once for all targets. A target-agnostic pass is the base for Kodi.

The Jellyfin output folder is now SHOWRUNNER_JELLYFIN_OUTPUT_DIR (SHOWRUNNER_JELLYFIN_OUTPUT_LOCATION
in compose.yaml); the old names SHOWRUNNER_OUTPUT_DIR and SHOWRUNNER_OUTPUT_LOCATION are still read
when the new ones are not set. An app without any output folder refuses to sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SHOWRUNNER_KODI_OUTPUT_DIR (SHOWRUNNER_KODI_OUTPUT_LOCATION in compose.yaml) adds a folder for
Kodi with "Local information only", next to the Jellyfin one or alone. Files are named by the
date of filming and a decimal id, `2024-07-15 143211 [1898906754].mp4`: Kodi recognises the
episode by the date, takes the season and the number from the NFO, and the name never changes
when a video is inserted, so watched marks stay. A hexadecimal id is avoided, since Kodi reads
`e` followed by digits as an episode number. Faces of people go to `.actors/` of the show.

The NFO files are shared by both targets (checked on Jellyfin 12.4 and Kodi 21.3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With SHOWRUNNER_KODI_URL (and _USERNAME, _PASSWORD, _OUTPUT_PATH) the app tells Kodi what a pass
changed: a changed show is cleaned within its own folder, the library scanned and the show
refreshed, so that new titles are read; a show without files is removed. Shows are found by the
Immich id in their NFO. Kodi on a TV box is often off: the shows stay queued for Kodi, apart from
the queue of Jellyfin, until it answers. Nothing is cleaned while Kodi can not open the folder.

`showrunner check` reaches Kodi and the folder; the page and /api/health show the queue of Kodi.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The guide gets a step for Kodi: the Samba share that follows the links of the app, the source
with "Local information only", the web server of Kodi for the notifications, the names of the
files, and what to do when something does not work. The READMEs in all five languages say that
the shows reach Jellyfin, Kodi or both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A disk that is not mounted leaves an empty folder at its mount point. If the registry holds files
of a target and its folder has lost the hidden `.showrunner` file, the pass writes nothing there
and says "is the disk mounted?"; no album is stamped, so the next pass looks at them all again.
Before Kodi cleans a show, the app checks that Kodi opens the folder of that show: a clean of a
folder Kodi can not reach would remove its episodes and their watched marks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Ivamic
Ivamic merged commit 9c32735 into main Nov 15, 2026
3 checks passed
@Ivamic
Ivamic deleted the feat/kodi branch November 15, 2026 11:38
@Ivamic Ivamic mentioned this pull request Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant