Files
AppleSync/applesync.example.toml
T
2026-11-26 15:11:41 +01:00

114 lines
3.8 KiB
TOML

# AppleSync configuration example.
#
# AppleSync reads public Apple Music playlist URLs, finds each playlist track's
# album on Qobuz, downloads the full albums through the existing `rip`
# (streamrip-go) binary, and writes an m3u containing the playlist tracks.
#
# This example uses the paths on jirachi. Copy to applesync.toml and edit.
[global]
# Where rip writes new downloads. AppleSync also passes this as `rip -f`.
downloads_dir = "/home/pihole/music/Full/QOBUZ_MONITOR"
# Root of the final, imported music library that the music server scans.
# AppleSync looks for tracks here first (e.g. Full/Otta/ASTRA/06 STRANGER.flac)
# and falls back to downloads_dir for albums that have not been imported yet.
# Defaults to downloads_dir when omitted.
library_dir = "/home/pihole/music/Full"
# Where generated m3u files are written. Relative entries in the m3u are
# resolved from each file's own directory.
m3u_dir = "/home/pihole/music/Full/Qobuz/Playlists"
# "relative" (recommended) or "absolute" paths inside the m3u.
m3u_paths = "relative"
# Default mode for every playlist: "replace" or "append".
# replace: rebuild the m3u to contain exactly the playlist tracks.
# append: keep existing entries, append only tracks not already listed.
mode = "replace"
# Extended m3u: #EXTM3U plus #EXTINF lines. Set false for bare paths.
extended_m3u = true
# What to do when a playlist track cannot be matched or found:
# warn: write the tracks that were found and report the rest (default)
# fail: do not write that playlist's m3u if anything is missing
missing = "warn"
# Set true to make every run a dry run (useful while tuning).
dry_run = false
# Concurrent Qobuz lookups (1-16).
concurrency = 4
# Match cache, run lock and rip batch files live here.
state_dir = "~/.local/state/applesync"
# How to find downloaded files:
# albums only scan folders for the albums in the playlists (recommended for
# large libraries such as jirachi's Full tree)
# auto scan album folders, fall back to a full scan if many are missing
# all always scan the whole tree (slow)
library_scan = "albums"
# Optional JSON report path. Can also be set with --report.
report = ""
[apple]
# Apple's catalog language. The storefront is taken from the playlist URL.
language = "en-US"
[qobuz]
# Public Qobuz app id. Leave empty to use the app id already present in rip's
# config, or to scrape the public one from play.qobuz.com.
app_id = ""
[rip]
# rip is called as:
# rip [--no-progress] [--config-path ...] -q <quality> [-c <codec>]
# -f <downloads_dir> file <batch.json> [--force]
# Use an absolute path for cron, where ~/.local/bin may not be in PATH.
binary = "/home/pihole/.local/bin/rip"
# Optional path to a non-default rip config. AppleSync also reads this config
# for the Qobuz app id.
config_path = ""
# Qobuz quality 0-4 (same scale as rip: 4 is the highest).
quality = 3
# Optional post-download conversion: ALAC, FLAC, OGG, MP3, AAC.
codec = ""
# Extra global rip flags, e.g. ["--no-ssl-verify"].
extra_args = []
# Pass --no-progress to rip (useful for cron logs).
no_progress = false
[beets]
# Query the beets library for canonical paths and ISRCs. This is much faster
# than walking a large library and finds albums that have already been imported
# out of downloads_dir. Falls back to a filesystem scan if beets is unavailable
# or fails.
enabled = true
binary = "/home/pihole/.local/bin/beet"
# Add one [[playlist]] block per playlist.
[[playlist]]
url = "https://music.apple.com/us/playlist/indie-chill/pl.c4074df0f3114c7d9572859645229d75"
# Optional display name. Defaults to the Apple playlist title.
# name = "indie + chill"
# Optional m3u file name, relative to global.m3u_dir (or an absolute path).
# Defaults to slug(playlist name).m3u, e.g. indie-chill.m3u.
# m3u = "indie-chill.m3u"
# Optional per-playlist mode override.
# mode = "append"
enabled = true