Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
💄 Show trailers from other source than only Youtube on anime page
Browse files Browse the repository at this point in the history
  • Loading branch information
soulcramer committed Sep 29, 2018
1 parent 1281574 commit 7c0dba9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pages/anime/anime.pixy
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,15 @@ component AnimeGenres(anime *arn.Anime)
span= genre

component AnimeTrailer(anime *arn.Anime)
if len(anime.Trailers) > 0 && anime.Trailers[len(anime.Trailers) - 1].Service == "Youtube" && anime.Trailers[len(anime.Trailers) - 1].ServiceID != ""
if len(anime.Trailers) > 0 && 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
h3.anime-section-name
a(href=anime.TrailersLink()) Trailer
.anime-trailer.video-container
iframe.video(src="https://www.youtube.com/embed/" + anime.Trailers[index].ServiceID + "?showinfo=0", allowfullscreen)
iframe.video.lazy(data-src=anime.Trailers[index].EmbedLink(), allowfullscreen)

component AnimeFriends(friends []*arn.User, listItems map[*arn.User]*arn.AnimeListItem)
if len(friends) > 0
Expand Down

0 comments on commit 7c0dba9

Please sign in to comment.