diff --git a/lidarr/Audio.service.bash b/lidarr/Audio.service.bash
index 32a62831..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
@@ -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/TidalVideoDownloader.bash b/lidarr/TidalVideoDownloader.bash
index ae8fb399..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
@@ -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
diff --git a/lidarr/setup.bash b/lidarr/setup.bash
index 2658d5d0..1197f171 100644
--- a/lidarr/setup.bash
+++ b/lidarr/setup.bash
@@ -1,5 +1,5 @@
#!/usr/bin/with-contenv bash
-scriptVersion="1.4.5"
+scriptVersion="1.4.6"
SMA_PATH="/usr/local/sma"
if [ -f /config/setup_version.txt ]; then
@@ -42,7 +42,7 @@ uv pip install --system --upgrade --no-cache-dir --break-system-packages \
jellyfish \
beautifulsoup4 \
yt-dlp \
- beets \
+ "beets<2.6" \
yq \
pyxDamerauLevenshtein \
pyacoustid \
@@ -52,10 +52,10 @@ uv pip install --system --upgrade --no-cache-dir --break-system-packages \
pylast \
mutagen \
r128gain \
- tidal-dl \
deemix \
langdetect \
apprise && \
+uv pip install --system --upgrade --no-cache-dir --break-system-packages "git+https://github.com/FunWarry/tidal-dl-ng-For-DJ.git@master" && \
echo "************ setup SMA ************"
if [ -d "${SMA_PATH}" ]; then
rm -rf "${SMA_PATH}"
@@ -72,55 +72,55 @@ uv pip install --system --break-system-packages -r ${SMA_PATH}/setup/requirement
mkdir -p /custom-services.d/python /config/extended
parallel ::: \
- 'echo "Download QueueCleaner service..." && curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/universal/services/QueueCleaner -o /custom-services.d/QueueCleaner && echo "Done"' \
- 'echo "Download AutoConfig service..." && curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/AutoConfig.service.bash -o /custom-services.d/AutoConfig && echo "Done"' \
- 'echo "Download Video service..." && curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/Video.service.bash -o /custom-services.d/Video && echo "Done"' \
- 'echo "Download Tidal Video Downloader service..." && curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/TidalVideoDownloader.bash -o /custom-services.d/TidalVideoDownloader && echo "Done"' \
- 'echo "Download Audio service..." && curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/Audio.service.bash -o /custom-services.d/Audio && echo "Done"' \
- 'echo "Download AutoArtistAdder service..." && curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/AutoArtistAdder.bash -o /custom-services.d/AutoArtistAdder && echo "Done"' \
- 'echo "Download UnmappedFilesCleaner service..." && curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/UnmappedFilesCleaner.bash -o /custom-services.d/UnmappedFilesCleaner && echo "Done"' \
- 'echo "Download ARLChecker service..." && curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/python/ARLChecker.py -o /custom-services.d/python/ARLChecker.py && curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/ARLChecker -o /custom-services.d/ARLChecker && echo "Done"' \
- 'echo "Download Script Functions..." && curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/universal/functions.bash -o /config/extended/functions && echo "Done"' \
- 'echo "Download PlexNotify script..." && curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/PlexNotify.bash -o /config/extended/PlexNotify.bash && echo "Done"' \
- 'echo "Download SMA config..." && curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/sma.ini -o /config/extended/sma.ini && echo "Done"' \
- 'echo "Download LyricExtractor script..." && curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/LyricExtractor.bash -o /config/extended/LyricExtractor.bash && echo "Done"' \
- 'echo "Download ArtworkExtractor script..." && curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/ArtworkExtractor.bash -o /config/extended/ArtworkExtractor.bash && echo "Done"' \
- 'echo "Download Beets Tagger script..." && curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/BeetsTagger.bash -o /config/extended/BeetsTagger.bash && echo "Done"'
+ 'echo "Download QueueCleaner service..." && curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/universal/services/QueueCleaner -o /custom-services.d/QueueCleaner && echo "Done"' \
+ 'echo "Download AutoConfig service..." && curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/AutoConfig.service.bash -o /custom-services.d/AutoConfig && echo "Done"' \
+ 'echo "Download Video service..." && curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/Video.service.bash -o /custom-services.d/Video && echo "Done"' \
+ 'echo "Download Tidal Video Downloader service..." && curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/TidalVideoDownloader.bash -o /custom-services.d/TidalVideoDownloader && echo "Done"' \
+ 'echo "Download Audio service..." && curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/Audio.service.bash -o /custom-services.d/Audio && echo "Done"' \
+ 'echo "Download AutoArtistAdder service..." && curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/AutoArtistAdder.bash -o /custom-services.d/AutoArtistAdder && echo "Done"' \
+ 'echo "Download UnmappedFilesCleaner service..." && curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/UnmappedFilesCleaner.bash -o /custom-services.d/UnmappedFilesCleaner && echo "Done"' \
+ 'echo "Download ARLChecker service..." && curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/python/ARLChecker.py -o /custom-services.d/python/ARLChecker.py && curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/ARLChecker -o /custom-services.d/ARLChecker && echo "Done"' \
+ 'echo "Download Script Functions..." && curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/universal/functions.bash -o /config/extended/functions && echo "Done"' \
+ 'echo "Download PlexNotify script..." && curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/PlexNotify.bash -o /config/extended/PlexNotify.bash && echo "Done"' \
+ 'echo "Download SMA config..." && curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/sma.ini -o /config/extended/sma.ini && echo "Done"' \
+ 'echo "Download LyricExtractor script..." && curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/LyricExtractor.bash -o /config/extended/LyricExtractor.bash && echo "Done"' \
+ 'echo "Download ArtworkExtractor script..." && curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/ArtworkExtractor.bash -o /config/extended/ArtworkExtractor.bash && echo "Done"' \
+ 'echo "Download Beets Tagger script..." && curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/BeetsTagger.bash -o /config/extended/BeetsTagger.bash && echo "Done"'
if [ ! -f /config/extended/beets-config.yaml ]; then
echo "Download Beets config..."
- curl -sfL "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/beets-config.yaml" -o /config/extended/beets-config.yaml
+ curl -sfL "https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/beets-config.yaml" -o /config/extended/beets-config.yaml
echo "Done"
fi
if [ ! -f /config/extended/beets-config-lidarr.yaml ]; then
echo "Download Beets lidarr config..."
- curl -sfL "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/beets-config-lidarr.yaml" -o /config/extended/beets-config-lidarr.yaml
+ curl -sfL "https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/beets-config-lidarr.yaml" -o /config/extended/beets-config-lidarr.yaml
echo "Done"
fi
if [ ! -f /config/extended/deemix_config.json ]; then
echo "Download Deemix config..."
- curl -sfL "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/deemix_config.json" -o /config/extended/deemix_config.json
+ curl -sfL "https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/deemix_config.json" -o /config/extended/deemix_config.json
echo "Done"
fi
if [ ! -f /config/extended/tidal-dl.json ]; then
- echo "Download Tidal config..."
- curl -sfL "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/tidal-dl.json" -o /config/extended/tidal-dl.json
+ echo "Download Tidal (tidal-dl-ng) config..."
+ curl -sfL "https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/tidal-dl.json" -o /config/extended/tidal-dl.json
echo "Done"
fi
if [ ! -f /config/extended/beets-genre-whitelist.txt ]; then
echo "Download beets-genre-whitelist.txt..."
- curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/beets-genre-whitelist.txt -o /config/extended/beets-genre-whitelist.txt
+ curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/beets-genre-whitelist.txt -o /config/extended/beets-genre-whitelist.txt
echo "Done"
fi
if [ ! -f /config/extended.conf ]; then
echo "Download Extended config..."
- curl -sfL https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/extended.conf -o /config/extended.conf
+ curl -sfL https://raw.githubusercontent.com/samhaswon/arr-scripts/main/lidarr/extended.conf -o /config/extended.conf
chmod 777 /config/extended.conf
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
+}
diff --git a/universal/functions.bash b/universal/functions.bash
index ed3df173..346cef56 100644
--- a/universal/functions.bash
+++ b/universal/functions.bash
@@ -21,15 +21,15 @@ logfileSetup () {
getArrAppInfo () {
# Get Arr App information
if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then
- arrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
- if [ "$arrUrlBase" == "null" ]; then
+ arrUrlBase="$(sed -n 's:.*\(.*\).*:\1:p' /config/config.xml | head -n1)"
+ if [ -z "$arrUrlBase" ]; then
arrUrlBase=""
else
- arrUrlBase="/$(echo "$arrUrlBase" | sed "s/\///")"
+ arrUrlBase="/$(echo "$arrUrlBase" | sed 's:^/*::; s:/*$::')"
fi
- arrName="$(cat /config/config.xml | xq | jq -r .Config.InstanceName)"
- arrApiKey="$(cat /config/config.xml | xq | jq -r .Config.ApiKey)"
- arrPort="$(cat /config/config.xml | xq | jq -r .Config.Port)"
+ arrName="$(sed -n 's:.*\(.*\).*:\1:p' /config/config.xml | head -n1)"
+ arrApiKey="$(sed -n 's:.*\(.*\).*:\1:p' /config/config.xml | head -n1)"
+ arrPort="$(sed -n 's:.*\(.*\).*:\1:p' /config/config.xml | head -n1)"
arrUrl="http://127.0.0.1:${arrPort}${arrUrlBase}"
fi
}
@@ -39,14 +39,15 @@ verifyApiAccess () {
do
arrApiTest=""
arrApiVersion=""
+
+ arrApiVersion="v1"
+ arrApiTest="$(curl -fsS "$arrUrl/api/$arrApiVersion/system/status?apikey=$arrApiKey" 2>/dev/null | jq -er '.instanceName // .appName // empty' 2>/dev/null || true)"
+
if [ -z "$arrApiTest" ]; then
arrApiVersion="v3"
- arrApiTest="$(curl -s "$arrUrl/api/$arrApiVersion/system/status?apikey=$arrApiKey" | jq -r .instanceName)"
- fi
- if [ -z "$arrApiTest" ]; then
- arrApiVersion="v1"
- arrApiTest="$(curl -s "$arrUrl/api/$arrApiVersion/system/status?apikey=$arrApiKey" | jq -r .instanceName)"
+ arrApiTest="$(curl -fsS "$arrUrl/api/$arrApiVersion/system/status?apikey=$arrApiKey" 2>/dev/null | jq -er '.instanceName // .appName // empty' 2>/dev/null || true)"
fi
+
if [ ! -z "$arrApiTest" ]; then
break
else