Added AMV video details

This commit is contained in:
Eduard Urbach 2018-10-28 12:24:26 +09:00
parent 6201818d3b
commit 342948dbb3
3 changed files with 29 additions and 0 deletions

View File

@ -51,6 +51,11 @@ component AMVPage(amv *arn.AMV, user *arn.User)
.tags.mountable
each tag in amv.Tags
.tag.mountable= tag
if amv.File != "" && amv.Info.Video.Width > 0
.footer.amv-details.mountable
p= fmt.Sprintf("Video: %dx%d | %.0f FPS | %s", amv.Info.Video.Width, amv.Info.Video.Height, amv.Info.Video.FPS, amv.Info.Video.Codec)
p= fmt.Sprintf("Audio: %.0f Hz | %d bits | %s", amv.Info.Audio.SamplingFrequency, amv.Info.Audio.BitDepth, amv.Info.Audio.Codec)
component AnimeGridSmall(animes []*arn.Anime, user *arn.User)
each anime in animes

View File

@ -52,6 +52,12 @@ const amv-large-width = 854px
.amv-link
//
.amv-details
margin-top content-padding
p
margin 0
> 500px
.amvs
horizontal-wrap

View File

@ -0,0 +1,18 @@
package main
import (
"github.com/animenotifier/arn"
"github.com/fatih/color"
)
func main() {
color.Yellow("Deleting all AMV tags")
defer color.Green("Finished.")
defer arn.Node.Close()
for amv := range arn.StreamAMVs() {
amv.Tags = []string{}
amv.Save()
}
}