No description
  • Go 98.9%
  • Makefile 0.9%
  • Dockerfile 0.2%
Find a file
zemdregon 3cbb03f9a9
Some checks are pending
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
fix: TV show title handling (vault-tested)
2026-08-17 09:35:01 -05:00
.github chore(deps): bump actions/setup-go from 6 to 7 (#29) 2026-08-12 09:47:50 -05:00
cmd/module chore: refresh docs/CI and align module bootstrap 2026-07-22 19:09:49 -05:00
deploy chore: refresh docs/CI and align module bootstrap 2026-07-22 19:09:49 -05:00
internal fix: TV show title handling (vault-tested) 2026-08-17 09:35:01 -05:00
proto/tvmgmtv1 feat: media admin adapter, history, titles, and root paths 2026-07-21 20:20:06 -05:00
test Initial commit: TV show library manager with season/episode hierarchy 2026-06-14 09:33:58 -05:00
.dockerignore Initial commit: TV show library manager with season/episode hierarchy 2026-06-14 09:33:58 -05:00
.env.example chore: refresh docs/CI and align module bootstrap 2026-07-22 19:09:49 -05:00
.gitignore Initial commit: TV show library manager with season/episode hierarchy 2026-06-14 09:33:58 -05:00
.golangci.yml Initial commit: TV show library manager with season/episode hierarchy 2026-06-14 09:33:58 -05:00
CHANGELOG.md Advertise settings capability (v0.1.9). 2026-08-10 04:48:13 -05:00
COMPATIBILITY.md Initial commit: TV show library manager with season/episode hierarchy 2026-06-14 09:33:58 -05:00
CONTRIBUTING.md Initial commit: TV show library manager with season/episode hierarchy 2026-06-14 09:33:58 -05:00
Dockerfile Initial commit: TV show library manager with season/episode hierarchy 2026-06-14 09:33:58 -05:00
go.mod chore(deps): bump google.golang.org/grpc to v1.83.0 (#27) 2026-08-10 19:12:47 -05:00
go.sum chore(deps): bump google.golang.org/grpc to v1.83.0 (#27) 2026-08-10 19:12:47 -05:00
LICENSE Initial commit: TV show library manager with season/episode hierarchy 2026-06-14 09:33:58 -05:00
Makefile Initial commit: TV show library manager with season/episode hierarchy 2026-06-14 09:33:58 -05:00
muxcore.json Advertise settings capability (v0.1.9). 2026-08-10 04:48:13 -05:00
README.md chore: refresh docs/CI and align module bootstrap 2026-07-22 19:09:49 -05:00
ROADMAP.md feat: media admin adapter, history, titles, and root paths 2026-07-21 20:20:06 -05:00
SECURITY.md Initial commit: TV show library manager with season/episode hierarchy 2026-06-14 09:33:58 -05:00

Media TV Shows

CI Go Version License: GPL-3.0

TV show library manager for MuxCore — browse, search, and manage your TV series with TMDB metadata, season/episode tracking, and admin UI integration.

A MuxCore sidecar module that manages TV show libraries with hierarchical series/season/episode storage, artwork serving, and full MediaAdminService support for the admin UI.


How It Works

Admin UI / clients ──→ media-tvshows ──→ SQLite (series, seasons, episodes, tags, history)
                         │
                         ├──→ metadata-tmdb (search / refresh)
                         ├──→ media-root-folders (root path validation)
                         ├──← file.imported / download.dispatched events
                         └──→ HTTP /images/ (artwork)

Key Features

  • Series/Season/Episode hierarchy — full tree structure with foreign key cascades
  • TMDB metadata — import and refresh via the metadata capability (metadata-tmdb)
  • Episode file tracking — add/remove episode files; optional on-disk delete; multi-episode file links
  • Series typesstandard, daily, or anime (affects lookup / absolute numbering)
  • Per-episode and per-season monitoring — toggle monitoring at any level; season toggle cascades to episodes
  • Tags & calendar — tag series; air-date calendar; list monitored missing episodes
  • Alternate titles — store and look up series by alternate / clean titles
  • History — import, grab, and delete events via MediaAdminService.ListHistory
  • Root folder paths — validates against media-root-folders when available
  • Event consumers — subscribes to file.imported and download.dispatched
  • Admin UI integration — implements MediaAdminService (browse, search, edit, artwork, tags, calendar, missing, history)
  • Flat MediaAdminService model — each series appears as a MediaItem with metadata fields (season count, episode count, status, network, vote average)
  • TV-specific management APITvManagementService for library CRUD, monitoring, files, tags, calendar, titles, and lookup

Configuration

CLI Flags

Flag Default Description
--muxcore-mesh-addr - Core gRPC address
--muxcore-module-id media-tvshows Module identity

Environment Variables

Variable Default Description
TVSHOWS_DB_PATH /var/lib/media-tvshows/tvshows.db SQLite database path
TVSHOWS_GRPC_ADDR :9440 gRPC listen address
TVSHOWS_HTTP_ADDR :9450 HTTP listen address for artwork
TVSHOWS_IMAGE_DIR /var/lib/media-tvshows/images Artwork images directory
MUXCORE_GRPC_ADDR localhost:9090 Core mesh gRPC address
MUXCORE_INSECURE_DISABLE_TLS false Disable TLS for dev
MUXCORE_MODULE_ID media-tvshows Module identity (overrides flag default)

Quick Start

# Build
make build

# Run against local core (dev mode)
export MUXCORE_INSECURE_DISABLE_TLS=true
./media-tvshows --muxcore-mesh-addr localhost:9090

Deployment

Docker

make docker
docker run -d --restart=unless-stopped \
  -e MUXCORE_GRPC_ADDR=core:9090 \
  -e MUXCORE_INSECURE_DISABLE_TLS=true \
  ghcr.io/muxcore-media/media-tvshows:latest

docker-compose

docker compose -f deploy/docker-compose.yml up

systemd

sudo cp deploy/systemd/muxcore-module.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now muxcore-module

Development

make test     # run tests with race detection
make lint     # golangci-lint
make fmt      # format code
make proto    # regenerate protobuf code

Integration Tests

# Start core in dev mode, then:
MUXCORE_GRPC_ADDR=localhost:9090 go test -tags=integration -race -count=1 ./test/

Implementation

  • Registers with capabilities: "media.library", "media.library.tv"
  • Implements contracts-media-admin MediaAdminService (including tags, calendar, missing, history; collections unimplemented)
  • Exposes TvManagementService gRPC API (proto/tvmgmtv1)
  • Uses SQLite for persistence (WAL mode, single connection)
  • Serves artwork images via HTTP file server
  • Discovers metadata and media-root-folders peers over the core mesh

License

GPL-3.0