Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sonarr-DailySeriesEpisodeTrimmer.bash
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ DailySeriesTrimmerProcess () {

# If non-daily series, set maximum episode count to match latest season total episode count
if [ $seriesType != "daily" ]; then
maximumDailyEpisodes=$(echo "$seriesData" | jq -r ".seasons | sort_by(.seasonNumber) | reverse | .[].statistics.totalEpisodeCount" | head -n1)
maximumDailyEpisodes=$(echo "$seriesData" | jq -r ".seasons | map(select(.seasonNumber > 0 and .statistics.totalEpisodeCount > 1)) | sort_by(.seasonNumber) | reverse | .[].statistics.totalEpisodeCount" | head -n1)
fi

# Skip processing if less than the maximumDailyEpisodes setting were found to be downloaded
Expand Down