1.0.2 - New Setting maximumDailyEpisodes

#37
main
RandomNinjaAtk 1 year ago committed by GitHub
parent cc4bd47220
commit d594bec511
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.1" scriptVersion="1.0.2"
if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then if [ -z "$arrUrl" ] || [ -z "$arrApiKey" ]; then
arrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" arrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
@ -49,7 +49,7 @@ if [ $seriesType != "daily" ]; then
fi fi
# Skip processing if less than 14 episodes were found to be downloaded # Skip processing if less than 14 episodes were found to be downloaded
if [ $seriesEpisodeIdsCount -lt 14 ]; then if [ $seriesEpisodeIdsCount -lt $maximumDailyEpisodes ]; then
log "$seriesTitle (ID:$seriesId) :: TYPE :: $seriesType :: ERROR :: Series has not exceeded 14 downloaded episodes ($seriesEpisodeIdsCount files found), skipping..." log "$seriesTitle (ID:$seriesId) :: TYPE :: $seriesType :: ERROR :: Series has not exceeded 14 downloaded episodes ($seriesEpisodeIdsCount files found), skipping..."
exit exit
fi fi
@ -62,7 +62,7 @@ if [ $seriesType == daily ]; then
seriesRefreshRequired=false seriesRefreshRequired=false
for id in $seriesEpisodeIds; do for id in $seriesEpisodeIds; do
processId=$(( $processId + 1 )) processId=$(( $processId + 1 ))
if [ $processId -gt 14 ]; then if [ $processId -gt $maximumDailyEpisodes ]; then
episodeData=$(curl -s "http://localhost:8989/api/v3/episode/$id?apikey=$arrApiKey") episodeData=$(curl -s "http://localhost:8989/api/v3/episode/$id?apikey=$arrApiKey")
episodeSeriesId=$(echo "$episodeData" | jq -r ".seriesId") episodeSeriesId=$(echo "$episodeData" | jq -r ".seriesId")
episodeTitle=$(echo "$episodeData" | jq -r ".title") episodeTitle=$(echo "$episodeData" | jq -r ".title")

Loading…
Cancel
Save