1.0.069 - Improve duplicate checking by ignoring filename case-sensitivity

#208 - Attempt to prevent dupes by ignoring filename case-sensitivity
pull/226/head
RandomNinjaAtk 2 years ago committed by GitHub
parent ba7638853f
commit 90fee7fc18
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.068" scriptVersion="1.0.069"
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)"
@ -749,7 +749,7 @@ for lidarrArtistId in $(echo $lidarrArtistIds); do
fi fi
fi fi
fi fi
if [ -f "$videoPath/$lidarrArtistFolderNoDisambig/${musicbrainzVideoTitleClean}${plexVideoType}.mkv" ]; then if [[ -n $(find "$videoPath/$lidarrArtistFolderNoDisambig" -maxdepth 1 -iname "${musicbrainzVideoTitleClean}${plexVideoType}.mkv") ]]; then
log "$processCount of $lidarrArtistIdsCount :: MBZDB :: $lidarrArtistName :: ${musicbrainzVideoTitle}${musicbrainzVideoDisambiguation} :: Previously Downloaded, skipping..." log "$processCount of $lidarrArtistIdsCount :: MBZDB :: $lidarrArtistName :: ${musicbrainzVideoTitle}${musicbrainzVideoDisambiguation} :: Previously Downloaded, skipping..."
continue continue
fi fi
@ -838,15 +838,7 @@ for lidarrArtistId in $(echo $lidarrArtistIds); do
tidy -w 2000 -i -m -xml "$videoPath/$lidarrArtistFolderNoDisambig/${videoTitleClean}${plexVideoType}.nfo" &>/dev/null tidy -w 2000 -i -m -xml "$videoPath/$lidarrArtistFolderNoDisambig/${videoTitleClean}${plexVideoType}.nfo" &>/dev/null
fi fi
fi fi
if [ -f "$videoPath/$lidarrArtistFolderNoDisambig/${videoTitleClean}${plexVideoType}.nfo" ]; then if [[ -n $(find "$videoPath/$lidarrArtistFolderNoDisambig" -maxdepth 1 -iname "${videoTitleClean}${plexVideoType}.mkv") ]]; then
if cat "$videoPath/$lidarrArtistFolderNoDisambig/${videoTitleClean}${plexVideoType}.nfo" | grep "source" | read; then
sleep 0
else
log "$processCount of $lidarrArtistIdsCount :: IMVDB :: $lidarrArtistName :: ${videoTitleClean} :: NFO Missing Source information, purging for re-processing..."
rm "$videoPath/$lidarrArtistFolderNoDisambig/${videoTitleClean}${plexVideoType}"*
fi
fi
if [ -f "$videoPath/$lidarrArtistFolderNoDisambig/${videoTitleClean}${plexVideoType}.mkv" ]; then
log "$processCount of $lidarrArtistIdsCount :: IMVDB :: $lidarrArtistName :: ${imvdbVideoTitle} :: Previously Downloaded, skipping..." log "$processCount of $lidarrArtistIdsCount :: IMVDB :: $lidarrArtistName :: ${imvdbVideoTitle} :: Previously Downloaded, skipping..."
continue continue
fi fi

Loading…
Cancel
Save