diff --git a/pages/anime/anime.go b/pages/anime/anime.go index e10bb0f1..41e1893d 100644 --- a/pages/anime/anime.go +++ b/pages/anime/anime.go @@ -19,5 +19,11 @@ func Get(ctx *aero.Context) string { return ctx.Error(http.StatusNotFound, "Anime not found", err) } - return ctx.HTML(components.Anime(anime, user)) + tracks, err := arn.GetSoundTracksByTag("anime:" + anime.ID) + + if err != nil { + return ctx.Error(http.StatusNotFound, "Error fetching soundtracks", err) + } + + return ctx.HTML(components.Anime(anime, tracks, user)) } diff --git a/pages/anime/anime.pixy b/pages/anime/anime.pixy index 0be1b18b..3df5117d 100644 --- a/pages/anime/anime.pixy +++ b/pages/anime/anime.pixy @@ -1,4 +1,4 @@ -component Anime(anime *arn.Anime, user *arn.User) +component Anime(anime *arn.Anime, tracks []*arn.SoundTrack, user *arn.User) .anime-header(data-id=anime.ID) if anime.Image.Small != "" .anime-image-container @@ -133,11 +133,14 @@ component Anime(anime *arn.Anime, user *arn.User) //- if providers.Nyaa && providers.Nyaa.episodes !== undefined //- span(class=providers.Nyaa.episodes === 0 ? "entry-error" : "entry-ok")= providers.Nyaa.episodes + " eps" - h3.anime-section-name Tracks - p Coming soon. + if len(tracks) > 0 + h3.anime-section-name Tracks + .sound-tracks + each track in tracks + SoundTrack(track) - h3.anime-section-name Reviews - p Coming soon. + //- h3.anime-section-name Reviews + //- p Coming soon. h3.anime-section-name Links .light-button-group