From 973bea4654a37b28deeff649c1a7bbd1317067d3 Mon Sep 17 00:00:00 2001 From: samhaswon Date: Wed, 28 Jan 2026 19:04:36 -0600 Subject: [PATCH 1/7] Port setup and audio service from `tidal-dl` to `tidal-dl-ng`. --- lidarr/Audio.service.bash | 76 +++++++++++++++++++++------------------ lidarr/setup.bash | 4 +-- lidarr/tidal-dl.json | 17 ++++++++- 3 files changed, 60 insertions(+), 37 deletions(-) diff --git a/lidarr/Audio.service.bash b/lidarr/Audio.service.bash index 32a62831..8623f06c 100644 --- a/lidarr/Audio.service.bash +++ b/lidarr/Audio.service.bash @@ -71,7 +71,10 @@ verifyConfig () { preferSpecialEditions="true" fi - audioPath="$downloadPath/audio" + audioPath="$downloadPath/audio" + tidalDlNgConfigDir="/config/extended/tidal_dl_ng" + tidalDlNgConfigFile="${tidalDlNgConfigDir}/config.json" + tidalDlNgConfigTemplate="/config/extended/tidal-dl.json" } @@ -101,8 +104,11 @@ Configuration () { - if [ ! -d /config/xdg ]; then - mkdir -p /config/xdg + if [ ! -d /config/extended ]; then + mkdir -p /config/extended + fi + if [ ! -d "$tidalDlNgConfigDir" ]; then + mkdir -p "$tidalDlNgConfigDir" fi if [ -z $topLimit ]; then @@ -206,16 +212,16 @@ DownloadFormat () { if [ "$audioFormat" == "native" ]; then if [ "$audioBitrate" == "master" ]; then - tidalQuality=Master + tidalQuality=HI_RES_LOSSLESS deemixQuality=flac elif [ "$audioBitrate" == "lossless" ]; then - tidalQuality=HiFi + tidalQuality=LOSSLESS deemixQuality=flac elif [ "$audioBitrate" == "high" ]; then - tidalQuality=High + tidalQuality=HIGH deemixQuality=320 elif [ "$audioBitrate" == "low" ]; then - tidalQuality=128 + tidalQuality=LOW deemixQuality=128 else log "ERROR :: Invalid audioFormat and audioBitrate options set..." @@ -229,7 +235,7 @@ DownloadFormat () { else bitrateError="false" audioFormatError="false" - tidalQuality=HiFi + tidalQuality=LOSSLESS deemixQuality=flac case "$audioBitrate" in @@ -269,7 +275,7 @@ DownloadFormat () { exit fi - tidal-dl -q HiFi + XDG_CONFIG_HOME=/config/extended tidal-dl-ng cfg quality_audio LOSSLESS 2>&1 | tee -a "/config/logs/$logFileName" deemixQuality=flac bitrateError="" audioFormatError="" @@ -301,32 +307,36 @@ NotFoundFolderCleaner () { } TidalClientSetup () { - log "TIDAL :: Verifying tidal-dl configuration" - touch /config/xdg/.tidal-dl.log - if [ -f /config/xdg/.tidal-dl.json ]; then - rm /config/xdg/.tidal-dl.json - fi - if [ ! -f /config/xdg/.tidal-dl.json ]; then - log "TIDAL :: No default config found, importing default config \"tidal.json\"" - if [ -f /config/extended/tidal-dl.json ]; then - cp /config/extended/tidal-dl.json /config/xdg/.tidal-dl.json - chmod 777 -R /config/xdg/ + log "TIDAL :: Verifying tidal-dl-ng configuration" + touch "${tidalDlNgConfigDir}/tidal-dl-ng.log" + if [ -f "$tidalDlNgConfigFile" ]; then + rm "$tidalDlNgConfigFile" + fi + if [ ! -f "$tidalDlNgConfigFile" ]; then + log "TIDAL :: No default config found, importing default config \"tidal-dl.json\"" + if [ -f "$tidalDlNgConfigTemplate" ]; then + cp "$tidalDlNgConfigTemplate" "$tidalDlNgConfigFile" + chmod 777 -R "$tidalDlNgConfigDir" fi fi TidaldlStatusCheck - tidal-dl -o "$audioPath"/incomplete 2>&1 | tee -a "/config/logs/$logFileName" DownloadFormat + XDG_CONFIG_HOME=/config/extended tidal-dl-ng cfg download_base_path "$audioPath/incomplete" 2>&1 | tee -a "/config/logs/$logFileName" + XDG_CONFIG_HOME=/config/extended tidal-dl-ng cfg quality_audio "$tidalQuality" 2>&1 | tee -a "/config/logs/$logFileName" + XDG_CONFIG_HOME=/config/extended tidal-dl-ng cfg path_binary_ffmpeg "/usr/bin/ffmpeg" 2>&1 | tee -a "/config/logs/$logFileName" - if [ ! -f /config/xdg/.tidal-dl.token.json ]; then + if ! ls "${tidalDlNgConfigDir}"/*auth*.json "${tidalDlNgConfigDir}"/*token*.json 1>/dev/null 2>&1; then TidaldlStatusCheck - #log "TIDAL :: ERROR :: Downgrade tidal-dl for workaround..." - #pip3 install tidal-dl==2022.3.4.2 --no-cache-dir &>/dev/null log "TIDAL :: ERROR :: Loading client for required authentication, please authenticate, then exit the client..." NotifyWebhook "FatalError" "TIDAL requires authentication, please authenticate now (check logs)" TidaldlStatusCheck - tidal-dl + if command -v script >/dev/null 2>&1; then + script -q -c "PYTHONUNBUFFERED=1 XDG_CONFIG_HOME=/config/extended tidal-dl-ng login" /dev/null + else + PYTHONUNBUFFERED=1 XDG_CONFIG_HOME=/config/extended tidal-dl-ng login + fi fi if [ ! -d /config/extended/cache/tidal ]; then @@ -347,8 +357,6 @@ TidalClientSetup () { fi TidaldlStatusCheck - #log "TIDAL :: Upgrade tidal-dl to newer version..." - #pip3 install tidal-dl==2022.07.06.1 --no-cache-dir &>/dev/null } @@ -356,9 +364,9 @@ TidaldlStatusCheck () { until false do running=no - if ps aux | grep "tidal-dl" | grep -v "grep" | read; then + if ps aux | grep "tidal-dl-ng" | grep -v "grep" | read; then running=yes - log "STATUS :: TIDAL-DL :: BUSY :: Pausing/waiting for all active tidal-dl tasks to end..." + log "STATUS :: TIDAL-DL-NG :: BUSY :: Pausing/waiting for all active tidal-dl-ng tasks to end..." sleep 2 continue fi @@ -367,12 +375,12 @@ TidaldlStatusCheck () { } TidalClientTest () { - log "TIDAL :: tidal-dl client setup verification..." + log "TIDAL :: tidal-dl-ng client setup verification..." i=0 while [ $i -lt 3 ]; do i=$(( $i + 1 )) TidaldlStatusCheck - tidal-dl -q Normal -o "$audioPath"/incomplete -l "$tidalClientTestDownloadId" 2>&1 | tee -a "/config/logs/$logFileName" + XDG_CONFIG_HOME=/config/extended tidal-dl-ng dl "https://tidal.com/browse/album/$tidalClientTestDownloadId" 2>&1 | tee -a "/config/logs/$logFileName" downloadCount=$(find "$audioPath"/incomplete -type f -regex ".*/.*\.\(flac\|opus\|m4a\|mp3\)" | wc -l) if [ $downloadCount -le 0 ]; then continue @@ -382,9 +390,7 @@ TidalClientTest () { done tidalClientTest="unknown" if [ $downloadCount -le 0 ]; then - if [ -f /config/xdg/.tidal-dl.token.json ]; then - rm /config/xdg/.tidal-dl.token.json - fi + rm -f "${tidalDlNgConfigDir}"/*auth*.json "${tidalDlNgConfigDir}"/*token*.json log "TIDAL :: ERROR :: Download failed" log "TIDAL :: ERROR :: You will need to re-authenticate on next script run..." log "TIDAL :: ERROR :: Exiting..." @@ -557,7 +563,9 @@ DownloadProcess () { if [ "$2" == "TIDAL" ]; then TidaldlStatusCheck - tidal-dl -q $tidalQuality -o "$audioPath/incomplete" -l "$1" 2>&1 | tee -a "/config/logs/$logFileName" + XDG_CONFIG_HOME=/config/extended tidal-dl-ng cfg download_base_path "$audioPath/incomplete" 2>&1 | tee -a "/config/logs/$logFileName" + XDG_CONFIG_HOME=/config/extended tidal-dl-ng cfg quality_audio "$tidalQuality" 2>&1 | tee -a "/config/logs/$logFileName" + XDG_CONFIG_HOME=/config/extended tidal-dl-ng dl "https://tidal.com/browse/album/$1" 2>&1 | tee -a "/config/logs/$logFileName" # Verify Client Works... clientTestDlCount=$(find "$audioPath"/incomplete/ -type f -regex ".*/.*\.\(flac\|opus\|m4a\|mp3\)" | wc -l) diff --git a/lidarr/setup.bash b/lidarr/setup.bash index 2658d5d0..4fde61d0 100644 --- a/lidarr/setup.bash +++ b/lidarr/setup.bash @@ -52,7 +52,7 @@ uv pip install --system --upgrade --no-cache-dir --break-system-packages \ pylast \ mutagen \ r128gain \ - tidal-dl \ + tidal-dl-ng \ deemix \ langdetect \ apprise && \ @@ -107,7 +107,7 @@ if [ ! -f /config/extended/deemix_config.json ]; then fi if [ ! -f /config/extended/tidal-dl.json ]; then - echo "Download Tidal config..." + echo "Download Tidal (tidal-dl-ng) config..." curl -sfL "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/tidal-dl.json" -o /config/extended/tidal-dl.json echo "Done" fi diff --git a/lidarr/tidal-dl.json b/lidarr/tidal-dl.json index c986d6fe..de8f2e23 100644 --- a/lidarr/tidal-dl.json +++ b/lidarr/tidal-dl.json @@ -1 +1,16 @@ -{"albumFolderFormat": "atd", "apiKeyIndex": 4, "audioQuality": "HiFi", "checkExist": true, "downloadPath": "/downloads/lidarr-extended/incomplete", "includeEP": true, "language": "0", "lyricFile": true, "multiThread": false, "saveAlbumInfo": false, "saveCovers": false, "showProgress": true, "showTrackInfo": true, "trackFileFormat": "{TrackNumber} - {TrackTitle}", "usePlaylistFolder": false, "videoFileFormat": "{VideoNumber} - {ArtistName} - {VideoTitle}{ExplicitFlag}", "videoQuality": "P1080"} +{ + "download_base_path": "/downloads/lidarr-extended/incomplete", + "quality_audio": "LOSSLESS", + "quality_video": "1080", + "format_album": "{album_artist}/{album_title} ({album_year})", + "format_track": "{track_number} - {track_title}", + "format_playlist": "{playlist_title}/{track_number} - {track_title}", + "format_mix": "{mix_title}/{track_number} - {track_title}", + "format_video": "{artist_name} - {track_title}", + "path_binary_ffmpeg": "/usr/bin/ffmpeg", + "extract_flac": false, + "save_album_info": false, + "save_covers": false, + "save_lyrics": true, + "hide_progress": false +} From 3ee9f6e0965fd480ff46cfe6375a70d7368b26a9 Mon Sep 17 00:00:00 2001 From: samhaswon Date: Wed, 28 Jan 2026 19:23:50 -0600 Subject: [PATCH 2/7] Audio script version bump --- lidarr/Audio.service.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lidarr/Audio.service.bash b/lidarr/Audio.service.bash index 8623f06c..6a185330 100644 --- a/lidarr/Audio.service.bash +++ b/lidarr/Audio.service.bash @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv bash -scriptVersion="2.48" +scriptVersion="2.5" scriptName="Audio" ### Import Settings From ffa52a03590dce191895d0be48567568192a9fde Mon Sep 17 00:00:00 2001 From: samhaswon Date: Wed, 28 Jan 2026 20:42:31 -0600 Subject: [PATCH 3/7] Port the video download script as well --- lidarr/TidalVideoDownloader.bash | 57 ++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/lidarr/TidalVideoDownloader.bash b/lidarr/TidalVideoDownloader.bash index ae8fb399..7db5f581 100644 --- a/lidarr/TidalVideoDownloader.bash +++ b/lidarr/TidalVideoDownloader.bash @@ -24,6 +24,9 @@ verifyConfig () { downloadPath="/config/extended/downloads" fi videoDownloadPath="$downloadPath/tidal/videos" + tidalDlNgConfigDir="/config/extended/tidal_dl_ng" + tidalDlNgConfigFile="${tidalDlNgConfigDir}/config.json" + tidalDlNgConfigTemplate="/config/extended/tidal-dl.json" if [ -z "$videoScriptInterval" ]; then videoScriptInterval="15m" fi @@ -45,24 +48,35 @@ verifyConfig () { } TidalClientSetup () { - log "TIDAL :: Verifying tidal-dl configuration" - if [ ! -f /config/xdg/.tidal-dl.json ]; then - log "TIDAL :: No default config found, importing default config \"tidal.json\"" - if [ -f /config/extended/tidal-dl.json ]; then - cp /config/extended/tidal-dl.json /config/xdg/.tidal-dl.json - chmod 777 -R /config/xdg/ + log "TIDAL :: Verifying tidal-dl-ng configuration" + if [ ! -d /config/extended ]; then + mkdir -p /config/extended + fi + if [ ! -d "$tidalDlNgConfigDir" ]; then + mkdir -p "$tidalDlNgConfigDir" + fi + if [ ! -f "$tidalDlNgConfigFile" ]; then + log "TIDAL :: No default config found, importing default config \"tidal-dl.json\"" + if [ -f "$tidalDlNgConfigTemplate" ]; then + cp "$tidalDlNgConfigTemplate" "$tidalDlNgConfigFile" + chmod 777 -R "$tidalDlNgConfigDir" fi fi - - tidal-dl -o "$videoDownloadPath"/incomplete 2>&1 | tee -a "/config/logs/$logFileName" - tidalQuality=HiFi - if [ ! -f /config/xdg/.tidal-dl.token.json ]; then - #log "TIDAL :: ERROR :: Downgrade tidal-dl for workaround..." - #pip3 install tidal-dl==2022.3.4.2 --no-cache-dir &>/dev/null + tidalQuality=LOSSLESS + XDG_CONFIG_HOME=/config/extended tidal-dl-ng cfg download_base_path "$videoDownloadPath/incomplete" 2>&1 | tee -a "/config/logs/$logFileName" + XDG_CONFIG_HOME=/config/extended tidal-dl-ng cfg quality_audio "$tidalQuality" 2>&1 | tee -a "/config/logs/$logFileName" + XDG_CONFIG_HOME=/config/extended tidal-dl-ng cfg quality_video "1080" 2>&1 | tee -a "/config/logs/$logFileName" + XDG_CONFIG_HOME=/config/extended tidal-dl-ng cfg path_binary_ffmpeg "/usr/bin/ffmpeg" 2>&1 | tee -a "/config/logs/$logFileName" + + if ! ls "${tidalDlNgConfigDir}"/*auth*.json "${tidalDlNgConfigDir}"/*token*.json 1>/dev/null 2>&1; then log "TIDAL :: ERROR :: Loading client for required authentication, please authenticate, then exit the client..." NotifyWebhook "FatalError" "TIDAL requires authentication, please authenticate now (check logs)" - tidal-dl 2>&1 | tee -a "/config/logs/$logFileName" + if command -v script >/dev/null 2>&1; then + script -q -c "PYTHONUNBUFFERED=1 XDG_CONFIG_HOME=/config/extended tidal-dl-ng login" /dev/null + else + PYTHONUNBUFFERED=1 XDG_CONFIG_HOME=/config/extended tidal-dl-ng login + fi fi if [ ! -d "$videoDownloadPath/incomplete" ]; then @@ -81,9 +95,9 @@ TidaldlStatusCheck () { until false do running=no - if ps aux | grep "tidal-dl" | grep -v "grep" | read; then + if ps aux | grep "tidal-dl-ng" | grep -v "grep" | read; then running=yes - log "STATUS :: TIDAL-DL :: BUSY :: Pausing/waiting for all active tidal-dl tasks to end..." + log "STATUS :: TIDAL-DL-NG :: BUSY :: Pausing/waiting for all active tidal-dl-ng tasks to end..." sleep 2 continue fi @@ -92,12 +106,12 @@ TidaldlStatusCheck () { } TidalClientTest () { - log "TIDAL :: tidal-dl client setup verification..." + log "TIDAL :: tidal-dl-ng client setup verification..." i=0 while [ $i -lt 3 ]; do i=$(( $i + 1 )) TidaldlStatusCheck - tidal-dl -q Normal -o "$videoDownloadPath"/incomplete -l "$tidalClientTestDownloadId" 2>&1 | tee -a "/config/logs/$logFileName" + XDG_CONFIG_HOME=/config/extended tidal-dl-ng dl "https://tidal.com/browse/album/$tidalClientTestDownloadId" 2>&1 | tee -a "/config/logs/$logFileName" downloadCount=$(find "$videoDownloadPath"/incomplete -type f -regex ".*/.*\.\(flac\|opus\|m4a\|mp3\)" | wc -l) if [ $downloadCount -le 0 ]; then continue @@ -107,9 +121,7 @@ TidalClientTest () { done tidalClientTest="unknown" if [ $downloadCount -le 0 ]; then - if [ -f /config/xdg/.tidal-dl.token.json ]; then - rm /config/xdg/.tidal-dl.token.json - fi + rm -f "${tidalDlNgConfigDir}"/*auth*.json "${tidalDlNgConfigDir}"/*token*.json log "TIDAL :: ERROR :: Download failed" log "TIDAL :: ERROR :: You will need to re-authenticate on next script run..." log "TIDAL :: ERROR :: Exiting..." @@ -339,7 +351,10 @@ VideoProcess () { downloadFailed=false log "$processCount/$lidarrArtistCount :: $lidarrArtistName :: $tidalVideoProcessNumber/$tidalVideoIdsCount :: $videoTitle ($id) :: Downloading..." - tidal-dl -r P1080 -o "$videoDownloadPath/incomplete" -l "$videoUrl" 2>&1 | tee -a "/config/logs/$logFileName" + XDG_CONFIG_HOME=/config/extended tidal-dl-ng cfg download_base_path "$videoDownloadPath/incomplete" 2>&1 | tee -a "/config/logs/$logFileName" + XDG_CONFIG_HOME=/config/extended tidal-dl-ng cfg quality_video "1080" 2>&1 | tee -a "/config/logs/$logFileName" + XDG_CONFIG_HOME=/config/extended tidal-dl-ng cfg path_binary_ffmpeg "/usr/bin/ffmpeg" 2>&1 | tee -a "/config/logs/$logFileName" + XDG_CONFIG_HOME=/config/extended tidal-dl-ng dl "$videoUrl" 2>&1 | tee -a "/config/logs/$logFileName" find "$videoDownloadPath/incomplete" -type f -exec mv "{}" "$videoDownloadPath/incomplete"/ \; find "$videoDownloadPath/incomplete" -mindepth 1 -type d -exec rm -rf "{}" \; &>/dev/null find "$videoDownloadPath/incomplete" -type f -regex ".*/.*\.\(mkv\|mp4\)" -print0 | while IFS= read -r -d '' video; do From 8357e72b78466c35b3fa735aa628477b4bd67124 Mon Sep 17 00:00:00 2001 From: samhaswon Date: Wed, 28 Jan 2026 21:02:46 -0600 Subject: [PATCH 4/7] Bump video script version --- tidal-dl-ng-porting.md | 258 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 258 insertions(+) create mode 100644 tidal-dl-ng-porting.md diff --git a/tidal-dl-ng-porting.md b/tidal-dl-ng-porting.md new file mode 100644 index 00000000..ad0237da --- /dev/null +++ b/tidal-dl-ng-porting.md @@ -0,0 +1,258 @@ +## What changes at a glance + +`tidal-dl` (from yaronzz/Tidal-Media-Downloader) is basically: + +* Interactive TUI (“Show interactive interface”) when you run `tidal-dl` with no args +* A few top-level flags, mainly: + + * `-l ` to download a link + * `-g` for a simple GUI + * `-h` for help ([GitHub][1]) + +`tidal-dl-ng` flips that into a modern “subcommand” CLI: + +* `tidal-dl-ng ...` (or the shorter alias `tdn`) +* Commands include `login`, `logout`, `cfg`, `dl`, `dl_fav`, `gui` ([PyPI][2]) + +So the “port” is mostly: flags and interactive menus become explicit subcommands, and settings move to a different config location/format. + +--- + +## Setup and installation differences + +### Python versions + +* `tidal-dl` docs/readme just show `pip3 install tidal-dl --upgrade` and works across typical Python 3 installs. ([GitHub][1]) +* `tidal-dl-ng` is stricter: it requires Python `>=3.12, <3.14` on PyPI. ([PyPI][2]) + +If you have automation scripts or a server, this is the first breaking change: you may need to upgrade the runtime. + +### Install/upgrade + +* Old: + + * `pip3 install tidal-dl --upgrade` ([GitHub][1]) +* New: + + * `pip install --upgrade tidal-dl-ng` + * GUI extra: `pip install --upgrade "tidal-dl-ng[gui]"` ([PyPI][2]) + +--- + +## CLI porting guide (command mapping) + +### Downloading a URL + +* Old: + + * `tidal-dl -l ""` + * Or open the interactive interface (`tidal-dl`) and paste the URL. ([GitHub][1]) +* New: + + * `tidal-dl-ng dl ` + * Or `tdn dl ` ([PyPI][2]) + +### Favorites / collections + +* Old: + + * Typically done via interactive UI flows (menus). ([YaornzZ][3]) +* New: + + * `tidal-dl-ng dl_fav tracks|artists|albums|videos` ([PyPI][2]) + +### Login/logout + +* Old: + + * Interactive prompt for credentials (and it persists a token file). ([YaornzZ][3]) +* New: + + * `tidal-dl-ng login` + * `tidal-dl-ng logout` ([PyPI][2]) + +### Configuring settings + +* Old: + + * You typically run `tidal-dl`, then use the “set config file” menu (documented as option 2) to set download path, audio quality, video quality, cover saving, naming rules, etc. ([YaornzZ][3]) +* New: + + * `tidal-dl-ng cfg` to list settings + * `tidal-dl-ng cfg ` to print one value + * `tidal-dl-ng cfg ` to set it ([PyPI][2]) + +This is the biggest “feel” change: instead of an in-app menu, you configure via `cfg` subcommand (and/or by editing the config file directly). + +--- + +## Configuration file differences (format + location) + +### `tidal-dl` config files + +Common files you’ll see: + +* `~/.tidal-dl.json` (settings) +* `~/.tidal-dl.token.json` (auth token) + +This layout is explicitly referenced by tooling that wraps `tidal-dl` (for persistence in containers). ([GitHub][4]) +And users commonly locate it in their home directory on Windows as `.tidal-dl.json`. ([GitHub][5]) + +### `tidal-dl-ng` config files + +`tidal-dl-ng` uses a JSON config (commonly named `config.json`) with keys like these (real-world example from an issue): + +* `download_base_path` +* `quality_audio` (example: `HI_RES_LOSSLESS`) +* `quality_video` (example: `"1080"`) +* Multiple output format templates: + + * `format_album`, `format_track`, `format_playlist`, `format_mix`, `format_video` +* ffmpeg integration: + + * `path_binary_ffmpeg` + * `extract_flac` +* Metadata/cover/lyrics toggles, concurrency, delay settings, etc. ([GitHub][6]) + +Location-wise, a common (and very practical) reference is Docker bind mounts mapping the config directory to: + +* `/root/.config/tidal_dl_ng` +* and placing `config.json` inside it ([hub.docker.com][7]) + +On Windows, one issue discussion notes that a “normal” run stores the config in the user profile folder (not beside a portable executable). ([GitHub][8]) + +### Key takeaway + +* You generally cannot “drop in” `.tidal-dl.json` and expect `tidal-dl-ng` to read it. +* Treat this as a settings migration: recreate equivalent settings in `tidal-dl-ng` via `cfg` or by editing its `config.json`. + +--- + +## Step-by-step migration checklist + +### 1) Install `tidal-dl-ng` in a clean place + +* Make sure you’re on Python 3.12+ first. ([PyPI][2]) +* Install: + + * `pip install --upgrade tidal-dl-ng` ([PyPI][2]) + +Negative bit: if you have older systems (NAS boxes, old distros, older macOS Python environments), Python 3.12 can be the blocker. Plan for that early. + +### 2) Do a fresh login (don’t try to reuse old token files) + +* Run: `tidal-dl-ng login` ([PyPI][2]) + +In practice, `tidal-dl`’s `.tidal-dl.token.json` and `tidal-dl-ng`’s credentials are not interchangeable, so expect to authenticate again. + +### 3) Recreate your core settings in `tidal-dl-ng` + +Start with: + +* `tidal-dl-ng cfg` (to list everything) ([PyPI][2]) + +Then set the big ones first: + +* Download directory + + * `download_base_path` (exists in real configs) ([GitHub][6]) +* Audio quality + + * `quality_audio` (example value: `HI_RES_LOSSLESS`) ([GitHub][6]) +* Video quality + + * `quality_video` (example: `"1080"`) ([GitHub][6]) +* Naming/organization templates + + * `format_album`, `format_track`, `format_playlist`, `format_mix`, `format_video` ([GitHub][6]) + +Mapping tip (conceptual): + +* `tidal-dl` “Download path” -> `download_base_path` +* `tidal-dl` “Audio quality (Master/HiFi/High/Normal)” -> `quality_audio` (new values differ, for example `HI_RES_LOSSLESS`) ([YaornzZ][3]) +* `tidal-dl` “Video quality 1080/720/…” -> `quality_video` ([YaornzZ][3]) + +Negative bit: naming templates are not 1:1. `tidal-dl` has its own set of tags (documented as “Possible Tags”). `tidal-dl-ng` uses different placeholder names like `{album_artist}`, `{track_title}`, etc. ([GitHub][1]) +So you’ll likely need to redesign your folder layout strings, not merely copy them. + +### 4) If you relied on FLAC extraction or video processing, set ffmpeg explicitly + +`tidal-dl-ng` is very explicit about ffmpeg path/config, and many problems trace back to it. You’ll see settings like: + +* `path_binary_ffmpeg` +* `extract_flac` ([GitHub][6]) + +Negative bit: this is one of the most common failure modes. If ffmpeg is missing or the path is wrong, you’ll get partial functionality (downloads may work, but processing/extraction won’t). + +### 5) Update scripts and aliases + +If you had scripts like: + +* `tidal-dl -l "$url"` + +Port them to: + +* `tdn dl "$url"` ([PyPI][2]) + +If you used the interactive “paste URL” workflow, the closest equivalent is still CLI, but it’s command-first now (`dl`, `dl_fav`, etc.). + +--- + +## “Gotchas” you should expect + +* Runtime requirement jump: Python 3.12+ is non-negotiable on current releases. ([PyPI][2]) +* Config migration is manual: old `.tidal-dl.json` isn’t the same format, and `tidal-dl-ng` config keys/templates differ. ([GitHub][4]) +* ffmpeg path issues are common, and can silently degrade your output (no extraction, no post-processing) unless you set `path_binary_ffmpeg` correctly. ([hub.docker.com][7]) +* Portability: on Windows especially, “portable folder” expectations can clash with config going into the user profile directory. ([GitHub][8]) + +--- + +[1]: https://github.com/yaronzz/Tidal-Media-Downloader "GitHub - yaronzz/Tidal-Media-Downloader: Download 'TIDAL' Music On Windows/Linux/MacOs (PYTHON/C#)" +[2]: https://pypi.org/project/tidal-dl-ng/ "tidal-dl-ng · PyPI" +[3]: https://doc.yaronzz.com/post/tidal_dl_installation/ "Tidal-Media-Downloader Installation Documentation | YaornzZ" +[4]: https://github.com/rgnet1/tidal-dl?utm_source=chatgpt.com "rgnet1/tidal-dl: Web UI wrapper for ..." +[5]: https://github.com/yaronzz/Tidal-Media-Downloader/issues/1037?utm_source=chatgpt.com "[QUESTION]: Where can I find my settings for tidal-dl? #1037" +[6]: https://github.com/exislow/tidal-dl-ng/issues/387?utm_source=chatgpt.com "Config Module Not Found · Issue #387 · exislow/tidal-dl-ng" +[7]: https://hub.docker.com/r/nillivanilli0815/tidal-dl-ng-web?utm_source=chatgpt.com "nillivanilli0815/tidal-dl-ng-web - Docker Image" +[8]: https://github.com/exislow/tidal-dl-ng/issues/634?utm_source=chatgpt.com "GUI glitches · Issue #634 · exislow/tidal-dl-ng" + +--- + +Since `tidal-dl` is still broken and `tidal-dl-ng` works, port the audio downloading script to it. + +Fixes #391, #374, #289, and maybe more. + +## Changes + +- Mostly just find/replace `tidal-dl` calls for `tidal-dl-ng`. +- Moved TIDAL config/auth state under `/config/extended/tidal_dl_ng` via `XDG_CONFIG_HOME` and ensured directories exist. +- Mapped audio quality settings to `tidal-dl-ng` enums and set `download_base_path`/`quality_audio` through `tidal-dl-ng cfg`. +- Updated the bundled TIDAL config to `tidal-dl-ng` format and switched setup to install `tidal-dl-ng`. + +## Breaks + +The port does require some changes to work. + +- The `Audio` service must be updated, of course. + - This could be fixed by checking file hashes in the setup script. +- The `tidal-dl.json` file contents are changed. This could be worked around with a rename if desired. If so, the URL in the setup script will break. + +## Testing + +I haven't tested every possible configuration, but it seems to work with lossless/master for the quality. I've tested artists with a mix of lossless and "Max" with no issues. I also started it on my server, and it is having some upstream issues with existing files. + +When testing, I mostly just followed the existing setup directions and then copied over the new Audio service (including renaming) and the new tidal config file. + +## Potential Issues + +For context, since Lidarr started having issues from the MusicBrainz change, I've mostly been doing things manually. Then `tidal-dl` broke, and I tried fixing it, then gave up after realizing I was basically rewriting the thing. So, I moved to using `tidal-dl-ng`. + +However, since I started using it, there has apparently been some kind of take-down on the original repo. The PyPi package is still up and working, for now, but the GitHub repo is gone. + +For reference, here's the PyPi package: https://pypi.org/project/tidal-dl-ng/ +But the GitHub repo is a 404: https://github.com/exislow/tidal-dl-ng + +If that's an issue, several forks exist that could be used. I haven't found one on PyPi yet, but they could just be installed from GitHub directly like this: +```bash +uv pip install --system --upgrade --no-cache-dir --break-system-packages "git+https://github.com/FunWarry/tidal-dl-ng-For-DJ.git@main" +``` \ No newline at end of file From e938dc4e56b788400becd7f45b62e2e01d8c3391 Mon Sep 17 00:00:00 2001 From: samhaswon Date: Wed, 28 Jan 2026 21:04:20 -0600 Subject: [PATCH 5/7] Revert "Bump video script version" This reverts commit 8357e72b78466c35b3fa735aa628477b4bd67124. --- tidal-dl-ng-porting.md | 258 ----------------------------------------- 1 file changed, 258 deletions(-) delete mode 100644 tidal-dl-ng-porting.md diff --git a/tidal-dl-ng-porting.md b/tidal-dl-ng-porting.md deleted file mode 100644 index ad0237da..00000000 --- a/tidal-dl-ng-porting.md +++ /dev/null @@ -1,258 +0,0 @@ -## What changes at a glance - -`tidal-dl` (from yaronzz/Tidal-Media-Downloader) is basically: - -* Interactive TUI (“Show interactive interface”) when you run `tidal-dl` with no args -* A few top-level flags, mainly: - - * `-l ` to download a link - * `-g` for a simple GUI - * `-h` for help ([GitHub][1]) - -`tidal-dl-ng` flips that into a modern “subcommand” CLI: - -* `tidal-dl-ng ...` (or the shorter alias `tdn`) -* Commands include `login`, `logout`, `cfg`, `dl`, `dl_fav`, `gui` ([PyPI][2]) - -So the “port” is mostly: flags and interactive menus become explicit subcommands, and settings move to a different config location/format. - ---- - -## Setup and installation differences - -### Python versions - -* `tidal-dl` docs/readme just show `pip3 install tidal-dl --upgrade` and works across typical Python 3 installs. ([GitHub][1]) -* `tidal-dl-ng` is stricter: it requires Python `>=3.12, <3.14` on PyPI. ([PyPI][2]) - -If you have automation scripts or a server, this is the first breaking change: you may need to upgrade the runtime. - -### Install/upgrade - -* Old: - - * `pip3 install tidal-dl --upgrade` ([GitHub][1]) -* New: - - * `pip install --upgrade tidal-dl-ng` - * GUI extra: `pip install --upgrade "tidal-dl-ng[gui]"` ([PyPI][2]) - ---- - -## CLI porting guide (command mapping) - -### Downloading a URL - -* Old: - - * `tidal-dl -l ""` - * Or open the interactive interface (`tidal-dl`) and paste the URL. ([GitHub][1]) -* New: - - * `tidal-dl-ng dl ` - * Or `tdn dl ` ([PyPI][2]) - -### Favorites / collections - -* Old: - - * Typically done via interactive UI flows (menus). ([YaornzZ][3]) -* New: - - * `tidal-dl-ng dl_fav tracks|artists|albums|videos` ([PyPI][2]) - -### Login/logout - -* Old: - - * Interactive prompt for credentials (and it persists a token file). ([YaornzZ][3]) -* New: - - * `tidal-dl-ng login` - * `tidal-dl-ng logout` ([PyPI][2]) - -### Configuring settings - -* Old: - - * You typically run `tidal-dl`, then use the “set config file” menu (documented as option 2) to set download path, audio quality, video quality, cover saving, naming rules, etc. ([YaornzZ][3]) -* New: - - * `tidal-dl-ng cfg` to list settings - * `tidal-dl-ng cfg ` to print one value - * `tidal-dl-ng cfg ` to set it ([PyPI][2]) - -This is the biggest “feel” change: instead of an in-app menu, you configure via `cfg` subcommand (and/or by editing the config file directly). - ---- - -## Configuration file differences (format + location) - -### `tidal-dl` config files - -Common files you’ll see: - -* `~/.tidal-dl.json` (settings) -* `~/.tidal-dl.token.json` (auth token) - -This layout is explicitly referenced by tooling that wraps `tidal-dl` (for persistence in containers). ([GitHub][4]) -And users commonly locate it in their home directory on Windows as `.tidal-dl.json`. ([GitHub][5]) - -### `tidal-dl-ng` config files - -`tidal-dl-ng` uses a JSON config (commonly named `config.json`) with keys like these (real-world example from an issue): - -* `download_base_path` -* `quality_audio` (example: `HI_RES_LOSSLESS`) -* `quality_video` (example: `"1080"`) -* Multiple output format templates: - - * `format_album`, `format_track`, `format_playlist`, `format_mix`, `format_video` -* ffmpeg integration: - - * `path_binary_ffmpeg` - * `extract_flac` -* Metadata/cover/lyrics toggles, concurrency, delay settings, etc. ([GitHub][6]) - -Location-wise, a common (and very practical) reference is Docker bind mounts mapping the config directory to: - -* `/root/.config/tidal_dl_ng` -* and placing `config.json` inside it ([hub.docker.com][7]) - -On Windows, one issue discussion notes that a “normal” run stores the config in the user profile folder (not beside a portable executable). ([GitHub][8]) - -### Key takeaway - -* You generally cannot “drop in” `.tidal-dl.json` and expect `tidal-dl-ng` to read it. -* Treat this as a settings migration: recreate equivalent settings in `tidal-dl-ng` via `cfg` or by editing its `config.json`. - ---- - -## Step-by-step migration checklist - -### 1) Install `tidal-dl-ng` in a clean place - -* Make sure you’re on Python 3.12+ first. ([PyPI][2]) -* Install: - - * `pip install --upgrade tidal-dl-ng` ([PyPI][2]) - -Negative bit: if you have older systems (NAS boxes, old distros, older macOS Python environments), Python 3.12 can be the blocker. Plan for that early. - -### 2) Do a fresh login (don’t try to reuse old token files) - -* Run: `tidal-dl-ng login` ([PyPI][2]) - -In practice, `tidal-dl`’s `.tidal-dl.token.json` and `tidal-dl-ng`’s credentials are not interchangeable, so expect to authenticate again. - -### 3) Recreate your core settings in `tidal-dl-ng` - -Start with: - -* `tidal-dl-ng cfg` (to list everything) ([PyPI][2]) - -Then set the big ones first: - -* Download directory - - * `download_base_path` (exists in real configs) ([GitHub][6]) -* Audio quality - - * `quality_audio` (example value: `HI_RES_LOSSLESS`) ([GitHub][6]) -* Video quality - - * `quality_video` (example: `"1080"`) ([GitHub][6]) -* Naming/organization templates - - * `format_album`, `format_track`, `format_playlist`, `format_mix`, `format_video` ([GitHub][6]) - -Mapping tip (conceptual): - -* `tidal-dl` “Download path” -> `download_base_path` -* `tidal-dl` “Audio quality (Master/HiFi/High/Normal)” -> `quality_audio` (new values differ, for example `HI_RES_LOSSLESS`) ([YaornzZ][3]) -* `tidal-dl` “Video quality 1080/720/…” -> `quality_video` ([YaornzZ][3]) - -Negative bit: naming templates are not 1:1. `tidal-dl` has its own set of tags (documented as “Possible Tags”). `tidal-dl-ng` uses different placeholder names like `{album_artist}`, `{track_title}`, etc. ([GitHub][1]) -So you’ll likely need to redesign your folder layout strings, not merely copy them. - -### 4) If you relied on FLAC extraction or video processing, set ffmpeg explicitly - -`tidal-dl-ng` is very explicit about ffmpeg path/config, and many problems trace back to it. You’ll see settings like: - -* `path_binary_ffmpeg` -* `extract_flac` ([GitHub][6]) - -Negative bit: this is one of the most common failure modes. If ffmpeg is missing or the path is wrong, you’ll get partial functionality (downloads may work, but processing/extraction won’t). - -### 5) Update scripts and aliases - -If you had scripts like: - -* `tidal-dl -l "$url"` - -Port them to: - -* `tdn dl "$url"` ([PyPI][2]) - -If you used the interactive “paste URL” workflow, the closest equivalent is still CLI, but it’s command-first now (`dl`, `dl_fav`, etc.). - ---- - -## “Gotchas” you should expect - -* Runtime requirement jump: Python 3.12+ is non-negotiable on current releases. ([PyPI][2]) -* Config migration is manual: old `.tidal-dl.json` isn’t the same format, and `tidal-dl-ng` config keys/templates differ. ([GitHub][4]) -* ffmpeg path issues are common, and can silently degrade your output (no extraction, no post-processing) unless you set `path_binary_ffmpeg` correctly. ([hub.docker.com][7]) -* Portability: on Windows especially, “portable folder” expectations can clash with config going into the user profile directory. ([GitHub][8]) - ---- - -[1]: https://github.com/yaronzz/Tidal-Media-Downloader "GitHub - yaronzz/Tidal-Media-Downloader: Download 'TIDAL' Music On Windows/Linux/MacOs (PYTHON/C#)" -[2]: https://pypi.org/project/tidal-dl-ng/ "tidal-dl-ng · PyPI" -[3]: https://doc.yaronzz.com/post/tidal_dl_installation/ "Tidal-Media-Downloader Installation Documentation | YaornzZ" -[4]: https://github.com/rgnet1/tidal-dl?utm_source=chatgpt.com "rgnet1/tidal-dl: Web UI wrapper for ..." -[5]: https://github.com/yaronzz/Tidal-Media-Downloader/issues/1037?utm_source=chatgpt.com "[QUESTION]: Where can I find my settings for tidal-dl? #1037" -[6]: https://github.com/exislow/tidal-dl-ng/issues/387?utm_source=chatgpt.com "Config Module Not Found · Issue #387 · exislow/tidal-dl-ng" -[7]: https://hub.docker.com/r/nillivanilli0815/tidal-dl-ng-web?utm_source=chatgpt.com "nillivanilli0815/tidal-dl-ng-web - Docker Image" -[8]: https://github.com/exislow/tidal-dl-ng/issues/634?utm_source=chatgpt.com "GUI glitches · Issue #634 · exislow/tidal-dl-ng" - ---- - -Since `tidal-dl` is still broken and `tidal-dl-ng` works, port the audio downloading script to it. - -Fixes #391, #374, #289, and maybe more. - -## Changes - -- Mostly just find/replace `tidal-dl` calls for `tidal-dl-ng`. -- Moved TIDAL config/auth state under `/config/extended/tidal_dl_ng` via `XDG_CONFIG_HOME` and ensured directories exist. -- Mapped audio quality settings to `tidal-dl-ng` enums and set `download_base_path`/`quality_audio` through `tidal-dl-ng cfg`. -- Updated the bundled TIDAL config to `tidal-dl-ng` format and switched setup to install `tidal-dl-ng`. - -## Breaks - -The port does require some changes to work. - -- The `Audio` service must be updated, of course. - - This could be fixed by checking file hashes in the setup script. -- The `tidal-dl.json` file contents are changed. This could be worked around with a rename if desired. If so, the URL in the setup script will break. - -## Testing - -I haven't tested every possible configuration, but it seems to work with lossless/master for the quality. I've tested artists with a mix of lossless and "Max" with no issues. I also started it on my server, and it is having some upstream issues with existing files. - -When testing, I mostly just followed the existing setup directions and then copied over the new Audio service (including renaming) and the new tidal config file. - -## Potential Issues - -For context, since Lidarr started having issues from the MusicBrainz change, I've mostly been doing things manually. Then `tidal-dl` broke, and I tried fixing it, then gave up after realizing I was basically rewriting the thing. So, I moved to using `tidal-dl-ng`. - -However, since I started using it, there has apparently been some kind of take-down on the original repo. The PyPi package is still up and working, for now, but the GitHub repo is gone. - -For reference, here's the PyPi package: https://pypi.org/project/tidal-dl-ng/ -But the GitHub repo is a 404: https://github.com/exislow/tidal-dl-ng - -If that's an issue, several forks exist that could be used. I haven't found one on PyPi yet, but they could just be installed from GitHub directly like this: -```bash -uv pip install --system --upgrade --no-cache-dir --break-system-packages "git+https://github.com/FunWarry/tidal-dl-ng-For-DJ.git@main" -``` \ No newline at end of file From fb1430d8f2e7688e7d7730cf4c3c3930516a21ac Mon Sep 17 00:00:00 2001 From: samhaswon Date: Wed, 28 Jan 2026 21:05:18 -0600 Subject: [PATCH 6/7] Bump video script version --- lidarr/Video.service.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lidarr/Video.service.bash b/lidarr/Video.service.bash index 64c9e64a..7e91c7fa 100644 --- a/lidarr/Video.service.bash +++ b/lidarr/Video.service.bash @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv bash -scriptVersion="4.0" +scriptVersion="4.1" scriptName="Video" ### Import Settings From 8a226d1e2530284d29a34f3d22ac59a52ddbdaab Mon Sep 17 00:00:00 2001 From: samhaswon Date: Wed, 28 Jan 2026 21:06:24 -0600 Subject: [PATCH 7/7] Update the correct script versions --- lidarr/TidalVideoDownloader.bash | 2 +- lidarr/Video.service.bash | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lidarr/TidalVideoDownloader.bash b/lidarr/TidalVideoDownloader.bash index 7db5f581..fce5f010 100644 --- a/lidarr/TidalVideoDownloader.bash +++ b/lidarr/TidalVideoDownloader.bash @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv bash -scriptVersion="2.1" +scriptVersion="2.2" scriptName="TidalVideoDownloader" #### Import Settings diff --git a/lidarr/Video.service.bash b/lidarr/Video.service.bash index 7e91c7fa..64c9e64a 100644 --- a/lidarr/Video.service.bash +++ b/lidarr/Video.service.bash @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv bash -scriptVersion="4.1" +scriptVersion="4.0" scriptName="Video" ### Import Settings