diff options
| author | James Mills <prologic@shortcircuit.net.au> | 2020-03-31 19:04:21 +1000 |
|---|---|---|
| committer | James Mills <prologic@shortcircuit.net.au> | 2020-03-31 19:19:58 +1000 |
| commit | cd574192bf9438691ad07c09cb157de74cada5e1 (patch) | |
| tree | 31414fbf4431930b936ab3c1c2cf1bffeac2a875 /app/app.go | |
| parent | 7c919b5f9b85a9f1f708884565f12b83ad4038e0 (diff) | |
Allow transcoding to smaller sizes a configurable and optional feature
Diffstat (limited to 'app/app.go')
| -rw-r--r-- | app/app.go | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -28,15 +28,6 @@ import ( //go:generate rice embed-go -var ( - SizeMap = map[string]string{ - "hd720": "720p", - "hd480": "480p", - "nhd": "360p", - "film": "240p", - } -) - // App represents main application. type App struct { Config *Config @@ -327,7 +318,7 @@ func (a *App) uploadHandler(w http.ResponseWriter, r *http.Request) { // TODO: Make this a background job // Resize for lower quality options - for size, suffix := range SizeMap { + for size, suffix := range a.Config.Transcoder.Sizes { log. WithField("size", size). WithField("vf", filepath.Base(vf)). @@ -518,7 +509,7 @@ func (a *App) importHandler(w http.ResponseWriter, r *http.Request) { // TODO: Make this a background job // Resize for lower quality options - for size, suffix := range SizeMap { + for size, suffix := range a.Config.Transcoder.Sizes { log. WithField("size", size). WithField("vf", filepath.Base(vf)). |
