v1.0.270 - Adjust beets file locations

pull/139/head
RandomNinjaAtk 2 years ago committed by GitHub
parent 3058117461
commit a3684d1924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
scriptVersion="1.0.269" scriptVersion="1.0.270"
if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
if [ "$lidarrUrlBase" == "null" ]; then if [ "$lidarrUrlBase" == "null" ]; then
@ -746,12 +746,12 @@ DownloadProcess () {
ProcessWithBeets () { ProcessWithBeets () {
# Input # Input
# $1 Download Folder to process # $1 Download Folder to process
if [ -f /scripts/library.blb ]; then if [ -f /config/extended/beets-library.blb ]; then
rm /scripts/library.blb rm /config/extended/beets-library.blb
sleep 0.1 sleep 0.1
fi fi
if [ -f /scripts/beets.log ]; then if [ -f /config/extended/logs/beets.log ]; then
rm /scripts/beets.log rm /config/extended/logs/beets.log
sleep 0.1 sleep 0.1
fi fi
@ -762,7 +762,7 @@ ProcessWithBeets () {
touch "/config/beets-match" touch "/config/beets-match"
sleep 0.1 sleep 0.1
beet -c /scripts/beets-config.yaml -l /scripts/library.blb -d "$1" import -qC "$1" beet -c /config/extended/scripts/beets-config.yaml -l /config/extended/beets-library.blb-d "$1" import -qC "$1"
if [ $(find "$1" -type f -regex ".*/.*\.\(flac\|opus\|m4a\|mp3\)" -newer "/config/beets-match" | wc -l) -gt 0 ]; then if [ $(find "$1" -type f -regex ".*/.*\.\(flac\|opus\|m4a\|mp3\)" -newer "/config/beets-match" | wc -l) -gt 0 ]; then
log "$processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: SUCCESS: Matched with beets!" log "$processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: SUCCESS: Matched with beets!"
find "$downloadPath/incomplete" -type f -iname "*.flac" -print0 | while IFS= read -r -d '' file; do find "$downloadPath/incomplete" -type f -iname "*.flac" -print0 | while IFS= read -r -d '' file; do

Loading…
Cancel
Save