v3.1 - Only cache artist once every 7 days, improved logging
This commit is contained in:
parent
e0ae9e3379
commit
b702d9e251
1 changed files with 16 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
scriptVersion="3.0"
|
scriptVersion="3.1"
|
||||||
scriptName="Video"
|
scriptName="Video"
|
||||||
|
|
||||||
### Import Settings
|
### Import Settings
|
||||||
|
@ -526,23 +526,32 @@ VideoProcess () {
|
||||||
artistImvdbSlug=$(basename "$artistImvdbUrl")
|
artistImvdbSlug=$(basename "$artistImvdbUrl")
|
||||||
|
|
||||||
if [ ! -z "$artistImvdbSlug" ]; then
|
if [ ! -z "$artistImvdbSlug" ]; then
|
||||||
log "${processCount}/${lidarrArtistIdsCount} :: $lidarrArtistName :: IMVDB Slug :: $artistImvdbSlug"
|
log "${processCount}/${lidarrArtistIdsCount} :: $lidarrArtistName :: IMVDB :: Slug :: $artistImvdbSlug"
|
||||||
else
|
else
|
||||||
log "${processCount}/${lidarrArtistIdsCount} :: $lidarrArtistName :: IMVDB Slug Not Found..."
|
log "${processCount}/${lidarrArtistIdsCount} :: $lidarrArtistName :: IMVDB :: ERROR :: Slug Not Found, skipping..."
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -d /config/extended/logs/video/complete ]; then
|
||||||
|
if [ -f "/config/extended/logs/video/complete/$lidarrArtistMusicbrainzId" ]; then
|
||||||
|
# Only update cache for artist if the completed log file is older than 7 days...
|
||||||
|
if [[ $(find "/config/extended/logs/video/complete/$lidarrArtistMusicbrainzId" -mtime +7 -print) ]]; then
|
||||||
ImvdbCache
|
ImvdbCache
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Always run cache process if completed log folder does not exist
|
||||||
|
ImvdbCache
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d /config/extended/logs/video/complete ]; then
|
if [ -d /config/extended/logs/video/complete ]; then
|
||||||
|
# If completed log file found for artist, end processing and skip...
|
||||||
if [ -f "/config/extended/logs/video/complete/$lidarrArtistMusicbrainzId" ]; then
|
if [ -f "/config/extended/logs/video/complete/$lidarrArtistMusicbrainzId" ]; then
|
||||||
log "${processCount}/${lidarrArtistIdsCount} :: $lidarrArtistName :: Music Videos previously downloaded, skipping..."
|
log "${processCount}/${lidarrArtistIdsCount} :: $lidarrArtistName :: Music Videos previously downloaded, skipping..."
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [ -z "$artistImvdbSlug" ]; then
|
if [ -z "$artistImvdbSlug" ]; then
|
||||||
log "${processCount}/${lidarrArtistIdsCount} :: $lidarrArtistName :: IMVDB :: No IMVDB artist link found, skipping..."
|
log "${processCount}/${lidarrArtistIdsCount} :: $lidarrArtistName :: IMVDB :: No IMVDB artist link found, skipping..."
|
||||||
# Create log of missing IMVDB url...
|
# Create log of missing IMVDB url...
|
||||||
|
|
Loading…
Reference in a new issue