Files
lidarr/Dockerfile.fork
shaunrd0 b258e7e41b Per-track monitoring for Lidarr — track-level Monitored flag + UI + stats fixes
Squashes 8 fork commits onto upstream/develop as a single diff for cleaner
cross-fork comparison. Original history preserved on pre-squash-backup tag
locally.

Motivation
──────────
Upstream Lidarr only supports per-album monitoring. This fork adds a
per-track Monitored bit, exposed via the API, so a companion tool
(musicseerr fork: shaunrd0/musicseerr) can selectively grab a single
track from an album without flipping the whole album's monitor state.

Changes
───────

• Track POCO + persistence
  src/NzbDrone.Core/Music/Model/Track.cs gains a Monitored property
  (default true — new tracks start monitored, matching the historical
  behavior where every track on a monitored album was implicitly
  in-scope). AlbumRepository / TrackRepository / TrackService updated
  to read, write, and bulk-update the field.

• UI: per-track monitor toggle on album details page
  Adds a checkbox column in the Album Details track list so users can
  flip individual tracks Monitored/Unmonitored without using the API.

• UI: Tracks column on Wanted/Missing and Wanted/CutoffUnmet
  Adds an explicit "Tracks" column to those views so the row shows
  monitored-tracks / total-tracks for each album, making partial-album
  state visible at a glance.

• Stats correctness
  TrackCount on album-level stats is now gated by Tracks.Monitored
  (an album where every track is unmonitored should not be counted as
  having wanted/missing tracks). Wanted Tracks denominator switched
  from monitored-track-count to total trackCount, matching the
  semantics of the new column.

• Build: custom Dockerfile.fork for local image
  Multi-stage build producing a hotio-compatible runtime image,
  targeting linux-musl-x64 (hotio's base is Alpine). Used by the
  lidarr-personal and lidarr-shared instances; lidarr (the public
  stock instance on gnat:8686) continues running upstream hotio.

Compatibility
─────────────
The schema migration is purely additive (one new BOOLEAN column with a
true default), so a fork → upstream rollback works without data loss —
the column simply becomes dead weight on disk.
2026-05-30 00:01:33 +00:00

47 lines
2.1 KiB
Docker

# syntax=docker/dockerfile:1.7
#
# Multi-stage build for the local Lidarr fork (shaunrd0/Lidarr).
#
# Stage 1 (builder): .NET 8 SDK + Node 20 + yarn — runs upstream's build.sh
# targeting linux-musl-x64/net8.0 only.
# Stage 2 (runtime): hotio/lidarr:nightly — inherits hotio's s6-overlay
# PUID/PGID/UMASK entrypoint; we only swap in our binaries
# over /app/bin/. Keeps lidarr-shared's config + restic
# backup story unchanged.
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates gnupg \
&& mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends nodejs \
&& npm install -g yarn \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY . .
# build.sh respects --backend / --frontend / --packages / --runtime / --framework
RUN ./build.sh --backend --frontend --packages --runtime linux-musl-x64 --framework net8.0
# Sanity check: the artifact directory must exist and contain Lidarr.dll
RUN test -f /src/_artifacts/linux-musl-x64/net8.0/Lidarr/Lidarr.dll || \
(echo "BUILD FAILED — Lidarr.dll missing from artifacts" && ls -la /src/_artifacts/ && exit 1)
FROM ghcr.io/hotio/lidarr:nightly
# Replace the hotio image's bundled binaries with our fork's build. Hotio's
# entrypoint, s6 services, PUID/PGID handling, and /config volume all stay
# the same; only the .NET app code changes.
RUN rm -rf /app/bin
COPY --from=builder --chown=root:root /src/_artifacts/linux-musl-x64/net8.0/Lidarr/ /app/bin/
# Stamp a marker file so it's obvious from inside the container which build
# is running. Useful for "is this the fork?" debugging.
RUN echo "fork: shaunrd0/Lidarr, track-monitored feature, built $(date -u +%Y-%m-%dT%H:%M:%SZ)" > /app/bin/FORK_INFO.txt