diff --git a/arn/AnimeAPI.go b/arn/AnimeAPI.go index 16bbf59a..4b740515 100644 --- a/arn/AnimeAPI.go +++ b/arn/AnimeAPI.go @@ -111,7 +111,13 @@ func (anime *Anime) Delete() error { DB.Delete("AnimeRelations", anime.ID) // Delete anime episodes - DB.Delete("AnimeEpisodes", anime.ID) + for _, episode := range anime.Episodes() { + err := episode.Delete() + + if err != nil { + return err + } + } // Delete anime list items for animeList := range StreamAnimeLists() {