add movies and tv show library types with Jellyfin NFO support

- Add `movies` type: per-movie folders with video files, poster/backdrop
  images, and optional Jellyfin NFO metadata (title, year, plot, rating,
  genres, runtime). Grid view with 2:3 poster art, detail modal with play
  and two-click delete of the movie folder.
- Add `tv` type: Series -> Season -> Episode hierarchy with lazy loading at
  each level. Reads tvshow.nfo and episodedetails NFO files for metadata.
  Episode grid with video thumbnails, streams via existing video player.
  Delete is limited to the entire series folder to avoid breaking Jellyfin.
- Add fast-xml-parser dependency for Kodi/Jellyfin NFO parsing (lib/nfo.ts)
- Migrate existing DB to expand the libraries CHECK constraint to include
  the two new types; migration is idempotent and preserves existing data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Garret Patti
2026-04-05 11:36:05 -04:00
parent b3abc7ee4c
commit e8b317f99d
17 changed files with 1589 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
export type LibraryType = 'games' | 'mixed'
export type LibraryType = 'games' | 'mixed' | 'movies' | 'tv'
export interface Library {
id: string
@@ -26,6 +26,52 @@ export interface FileEntry {
thumbnailUrl: string | null
}
export interface Movie {
id: string
title: string
year: number | null
plot: string | null
rating: number | null
genres: string[]
runtime: number | null
posterUrl: string | null
backdropUrl: string | null
videoPath: string
}
export interface TvSeries {
id: string
title: string
year: number | null
plot: string | null
genres: string[]
status: string | null
posterUrl: string | null
backdropUrl: string | null
seasonCount: number
}
export interface TvSeason {
id: string
seriesId: string
title: string
seasonNumber: number | null
posterUrl: string | null
episodeCount: number
}
export interface TvEpisode {
id: string
title: string
episodeNumber: number | null
seasonNumber: number | null
plot: string | null
aired: string | null
rating: number | null
thumbnailUrl: string | null
videoPath: string
}
export interface DirectoryListing {
path: string
entries: FileEntry[]