Build and publish container / build (pull_request) Successful in 7m41s
Rockbox applies the offset a ReplayGain tag carries but has no loudness analysis of its own, so an untagged mirror plays every album at whatever level it was mastered to. Albums are measured with rsgain once their tracks are in place, album gain and track gain both, leaving the device to choose between them. An album is re-measured as a whole whenever it gains, loses or replaces a track, because album gain is a property of all of its tracks and one new track makes the value stored on every sibling wrong. rsgain runs with --preserve-mtimes. Staleness here is an mtime comparison and tagging rewrites the file, so without it every levelled track would look newer than its source and the next pass would re-encode the whole library. Whether a file has already been levelled is decided by walking its ID3v2 frame headers and seeking over the bodies. Cover art is embedded in every mirror file, so reading the tag whole would turn an idle pass into a full read of the library. A missing rsgain is reported and then left alone rather than failing the pass: the mirror is still correct audio in the right place. Two existing tests move with the change. ffprobe's csv writer renders the ReplayGain side data as a trailing empty field, and a copied MP3 now differs from its source in the container while carrying identical audio. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
42 lines
2.0 KiB
YAML
42 lines
2.0 KiB
YAML
# TrueNAS Scale "Custom App" definition.
|
|
#
|
|
# Adjust the two host paths and the user to match your pool. The source is
|
|
# mounted read-only on purpose: nothing here should ever be able to write to
|
|
# the lossless library.
|
|
services:
|
|
music-mirror:
|
|
image: code.emmathe.dev/lyrathorpe/music-mirror:latest
|
|
container_name: music-mirror
|
|
restart: unless-stopped
|
|
# The dataset owner, so the mirror is not written as root. `id apps` or the
|
|
# ownership of the mirror dataset will tell you the right numbers.
|
|
user: "568:568"
|
|
environment:
|
|
MUSIC_MIRROR_SOURCE: /music
|
|
MUSIC_MIRROR_MIRROR: /mirror
|
|
# LAME V0 averages about 245 kbps. Use 256 for constant bitrate instead.
|
|
MUSIC_MIRROR_QUALITY: V0
|
|
# How long to wait between passes. Lidarr imports are picked up on the
|
|
# next one.
|
|
MUSIC_MIRROR_INTERVAL: 6h
|
|
# Concurrent encodes; defaults to the CPU count. Lower it to leave the
|
|
# NAS responsive during the first full pass.
|
|
# MUSIC_MIRROR_JOBS: "4"
|
|
# Name files so a FAT32 device will take them, for copying to a Rockbox
|
|
# player. Quoted, because an unquoted yes or true is a YAML boolean and
|
|
# compose rejects a boolean here. Accepts 1, true or yes.
|
|
#
|
|
# Turning this on renames every file whose name held a reserved
|
|
# character. They are moved, not re-encoded, so the first pass after
|
|
# enabling it is quick -- but it is a one-way change to every such path,
|
|
# so decide before running it rather than after.
|
|
MUSIC_MIRROR_FAT32_SAFE: "true"
|
|
# ReplayGain tags, so Rockbox can level the volume between albums. On by
|
|
# default; set to 0 to skip the measuring pass. The first pass after
|
|
# enabling it levels the whole library, which costs a decode of every
|
|
# track, so expect it to take about as long as the original encode.
|
|
# MUSIC_MIRROR_REPLAYGAIN: "0"
|
|
volumes:
|
|
- /mnt/tank/media/music:/music:ro
|
|
- /mnt/tank/media/music-mp3:/mirror
|