Added tracks to anime pages
This commit is contained in:
parent
d5dcd9c909
commit
bfbce4c9a2
@ -19,5 +19,11 @@ func Get(ctx *aero.Context) string {
|
|||||||
return ctx.Error(http.StatusNotFound, "Anime not found", err)
|
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))
|
||||||
}
|
}
|
||||||
|
@ -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)
|
.anime-header(data-id=anime.ID)
|
||||||
if anime.Image.Small != ""
|
if anime.Image.Small != ""
|
||||||
.anime-image-container
|
.anime-image-container
|
||||||
@ -133,11 +133,14 @@ component Anime(anime *arn.Anime, user *arn.User)
|
|||||||
//- if providers.Nyaa && providers.Nyaa.episodes !== undefined
|
//- if providers.Nyaa && providers.Nyaa.episodes !== undefined
|
||||||
//- span(class=providers.Nyaa.episodes === 0 ? "entry-error" : "entry-ok")= providers.Nyaa.episodes + " eps"
|
//- span(class=providers.Nyaa.episodes === 0 ? "entry-error" : "entry-ok")= providers.Nyaa.episodes + " eps"
|
||||||
|
|
||||||
h3.anime-section-name Tracks
|
if len(tracks) > 0
|
||||||
p Coming soon.
|
h3.anime-section-name Tracks
|
||||||
|
.sound-tracks
|
||||||
|
each track in tracks
|
||||||
|
SoundTrack(track)
|
||||||
|
|
||||||
h3.anime-section-name Reviews
|
//- h3.anime-section-name Reviews
|
||||||
p Coming soon.
|
//- p Coming soon.
|
||||||
|
|
||||||
h3.anime-section-name Links
|
h3.anime-section-name Links
|
||||||
.light-button-group
|
.light-button-group
|
||||||
|
Loading…
Reference in New Issue
Block a user