Merge pull request #165 from soulcramer/show_latest_anime_trailer
Display latest anime trailer on an anime page.
This commit is contained in:
commit
c4d2880fb3
@ -150,11 +150,14 @@ component AnimeGenres(anime *arn.Anime)
|
||||
span= genre
|
||||
|
||||
component AnimeTrailer(anime *arn.Anime)
|
||||
if len(anime.Trailers) > 0 && anime.Trailers[0].Service == "Youtube" && anime.Trailers[0].ServiceID != ""
|
||||
if len(anime.Trailers) > 0 && anime.Trailers[len(anime.Trailers) - 1].Service == "Youtube" && anime.Trailers[len(anime.Trailers) - 1].ServiceID != ""
|
||||
AnimeTrailerByIndex(anime, len(anime.Trailers)-1)
|
||||
|
||||
component AnimeTrailerByIndex(anime *arn.Anime, index int)
|
||||
section.anime-section.mountable(data-mountable-type="sidebar")
|
||||
h3.anime-section-name Trailer
|
||||
.anime-trailer.video-container
|
||||
iframe.video(src="https://www.youtube.com/embed/" + anime.Trailers[0].ServiceID + "?showinfo=0", allowfullscreen="allowfullscreen")
|
||||
iframe.video(src="https://www.youtube.com/embed/" + anime.Trailers[index].ServiceID + "?showinfo=0", allowfullscreen="allowfullscreen")
|
||||
|
||||
component AnimeFriends(friends []*arn.User, listItems map[*arn.User]*arn.AnimeListItem)
|
||||
if len(friends) > 0
|
||||
|
Loading…
Reference in New Issue
Block a user