Disable video player based on subscription

This commit is contained in:
2021-10-18 16:08:45 +02:00
parent c0a45ed818
commit fc8a9fe9d1
7 changed files with 99 additions and 69 deletions

View File

@@ -140,6 +140,7 @@ func (tm *TemplateManager) ParseTemplates(silent bool) {
"div": tm.div,
"formatData": tm.formatData,
"formatSC": tm.formatSC,
"noescape": tm.noEscape,
})
// Parse dynamic templates
@@ -295,6 +296,9 @@ func (tm *TemplateManager) formatSC(amt float64) string {
}
return fmtSize(amt/1e-24, "H")
}
func (tm *TemplateManager) noEscape(t string) template.HTML {
return template.HTML(t)
}
func detectInt(i interface{}) int {
switch v := i.(type) {