aboutsummaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-02-24 16:48:00 +0530
committerBobby <[email protected]>2026-02-24 16:48:00 +0530
commitd3507ae5b9d88a250b444c0e996fa07f84f6e3c5 (patch)
tree64680e5ba7c9b4aa2e412c5bb9611df0e940d971 /services
parentc6ff27b989047cf0af8d6cf2aa86c8e80547cf10 (diff)
downloadmetachan-d3507ae5b9d88a250b444c0e996fa07f84f6e3c5.tar.xz
metachan-d3507ae5b9d88a250b444c0e996fa07f84f6e3c5.zip
feat: Refactor anime and character handling
- Removed old GetAnimeEpisodes and GetAnimeEpisodesByMALID functions, replaced with a new implementation in episodes.go. - Added GetAnimeCharacters and GetAnimeCharacter functions to handle character retrieval. - Introduced CharacterAnimeAppearance entity to track character appearances in anime. - Updated repositories to manage character data and enrich character details. - Implemented enriched_at timestamp for both anime and characters to track data updates. - Added CharacterSync task to periodically enrich character data from the Jikan API. - Updated router to include new character-related endpoints.
Diffstat (limited to 'services')
-rw-r--r--services/anime.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/anime.go b/services/anime.go
index ec2b99c..a53f725 100644
--- a/services/anime.go
+++ b/services/anime.go
@@ -773,5 +773,8 @@ func saveAnime(anime *entities.Anime, skipTimeMap map[string][]entities.EpisodeS
}
logger.Successf("AnimeService", "Saved anime with %d episodes, %d characters, %d skip time entries", len(anime.Episodes), len(anime.Characters), len(skipTimeMap))
+ if err := repositories.SetAnimeEnriched(anime.MALID); err != nil {
+ logger.Warnf("AnimeService", "Failed to stamp enriched_at for anime %d: %v", anime.MALID, err)
+ }
return nil
}