1.0.2 - Add Extras.bash process, re-organize script

pull/24/head
RandomNinjaAtk 2 years ago committed by GitHub
parent 0ff6b5a019
commit a8c03a2380
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion="1.0.1"
scriptVersion="1.0.2"
arrEventType="$sonarr_eventtype"
# auto-clean up log file to reduce space usage
@ -21,6 +21,11 @@ if [ "$arrEventType" == "Test" ]; then
exit
fi
Extras () {
# Extras Script
bash /config/extended/scripts/Extras.bash "$sonarr_series_id"
}
NotifyPlex () {
# Process item with PlexNotify.bash if plexToken is configured
if [ ! -z "$plexToken" ]; then
@ -30,15 +35,19 @@ NotifyPlex () {
fi
}
log "Processing :: $sonarr_episodefile_path"
if python3 /usr/local/sma/manual.py --config "/config/extended/configs/sma.ini" -i "$sonarr_episodefile_path" -tvdb $sonarr_series_tvdbid -s $sonarr_episodefile_seasonnumber -e $sonarr_episodefile_episodenumbers -a; then
sleep 0.01
log "COMPLETE!"
rm /usr/local/sma/config/*log*
else
log "ERROR :: SMA Processing Error"
fi
ProcessWithSma () {
log "Processing :: $sonarr_episodefile_path"
if python3 /usr/local/sma/manual.py --config "/config/extended/configs/sma.ini" -i "$sonarr_episodefile_path" -tvdb $sonarr_series_tvdbid -s $sonarr_episodefile_seasonnumber -e $sonarr_episodefile_episodenumbers -a; then
sleep 0.01
log "COMPLETE!"
rm /usr/local/sma/config/*log*
else
log "ERROR :: SMA Processing Error"
fi
}
ProcessWithSma
Extras
NotifyPlex
exit

Loading…
Cancel
Save