watched_hooks: Update season to watching when held or dropped too

This commit is contained in:
IRHM
2024-06-09 17:25:08 +01:00
parent 1a3c9e0880
commit dc984fae1f
+2 -1
View File
@@ -73,7 +73,8 @@ func hookEpisodeStatusChanged(db *gorm.DB, userId uint, watchedId uint, seasonNu
}
hookResponse.AddedActivities = append(hookResponse.AddedActivities, resp.AddedActivity)
}
} else if watchedSeason.Status == "" || watchedSeason.Status == PLANNED || watchedSeason.Status == HOLD || watchedSeason.Status == DROPPED {
} else if watchedSeason.Status == "" || watchedSeason.Status == PLANNED ||
((newEpisodeStatus == FINISHED || newEpisodeStatus == WATCHING) && (watchedSeason.Status == HOLD || watchedSeason.Status == DROPPED)) {
reasonStr := fmt.Sprintf("Episode %d was set to %s while the season had ", episodeNum, newEpisodeStatus)
if watchedSeason.Status == "" {
reasonStr += "no status."