// Code generated by qtc from "view.qtpl". DO NOT EDIT. // See https://github.com/valyala/quicktemplate for details. //line mycoopts/view.qtpl:1 package mycoopts //line mycoopts/view.qtpl:1 import "path/filepath" //line mycoopts/view.qtpl:3 import "github.com/bouncepaw/mycorrhiza/hyphae" //line mycoopts/view.qtpl:4 import "github.com/bouncepaw/mycorrhiza/l18n" //line mycoopts/view.qtpl:6 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) //line mycoopts/view.qtpl:6 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) //line mycoopts/view.qtpl:6 func streammediaRaw(qw422016 *qt422016.Writer, h *hyphae.MediaHypha) { //line mycoopts/view.qtpl:6 StreamMedia(qw422016, h, l18n.New("en", "en")) //line mycoopts/view.qtpl:6 } //line mycoopts/view.qtpl:6 func writemediaRaw(qq422016 qtio422016.Writer, h *hyphae.MediaHypha) { //line mycoopts/view.qtpl:6 qw422016 := qt422016.AcquireWriter(qq422016) //line mycoopts/view.qtpl:6 streammediaRaw(qw422016, h) //line mycoopts/view.qtpl:6 qt422016.ReleaseWriter(qw422016) //line mycoopts/view.qtpl:6 } //line mycoopts/view.qtpl:6 func mediaRaw(h *hyphae.MediaHypha) string { //line mycoopts/view.qtpl:6 qb422016 := qt422016.AcquireByteBuffer() //line mycoopts/view.qtpl:6 writemediaRaw(qb422016, h) //line mycoopts/view.qtpl:6 qs422016 := string(qb422016.B) //line mycoopts/view.qtpl:6 qt422016.ReleaseByteBuffer(qb422016) //line mycoopts/view.qtpl:6 return qs422016 //line mycoopts/view.qtpl:6 } //line mycoopts/view.qtpl:8 func StreamMedia(qw422016 *qt422016.Writer, h *hyphae.MediaHypha, lc *l18n.Localizer) { //line mycoopts/view.qtpl:8 qw422016.N().S(` `) //line mycoopts/view.qtpl:9 switch filepath.Ext(h.MediaFilePath()) { //line mycoopts/view.qtpl:11 case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico": //line mycoopts/view.qtpl:11 qw422016.N().S(`
`) //line mycoopts/view.qtpl:16 case ".ogg", ".webm", ".mp4": //line mycoopts/view.qtpl:16 qw422016.N().S(`
`) //line mycoopts/view.qtpl:24 case ".mp3": //line mycoopts/view.qtpl:24 qw422016.N().S(`
`) //line mycoopts/view.qtpl:32 default: //line mycoopts/view.qtpl:32 qw422016.N().S(`

`) //line mycoopts/view.qtpl:34 qw422016.E().S(lc.Get("ui.media_download")) //line mycoopts/view.qtpl:34 qw422016.N().S(`

`) //line mycoopts/view.qtpl:36 } //line mycoopts/view.qtpl:36 qw422016.N().S(` `) //line mycoopts/view.qtpl:37 } //line mycoopts/view.qtpl:37 func WriteMedia(qq422016 qtio422016.Writer, h *hyphae.MediaHypha, lc *l18n.Localizer) { //line mycoopts/view.qtpl:37 qw422016 := qt422016.AcquireWriter(qq422016) //line mycoopts/view.qtpl:37 StreamMedia(qw422016, h, lc) //line mycoopts/view.qtpl:37 qt422016.ReleaseWriter(qw422016) //line mycoopts/view.qtpl:37 } //line mycoopts/view.qtpl:37 func Media(h *hyphae.MediaHypha, lc *l18n.Localizer) string { //line mycoopts/view.qtpl:37 qb422016 := qt422016.AcquireByteBuffer() //line mycoopts/view.qtpl:37 WriteMedia(qb422016, h, lc) //line mycoopts/view.qtpl:37 qs422016 := string(qb422016.B) //line mycoopts/view.qtpl:37 qt422016.ReleaseByteBuffer(qb422016) //line mycoopts/view.qtpl:37 return qs422016 //line mycoopts/view.qtpl:37 }