summaryrefslogtreecommitdiffstats
path: root/routers/repo/view.go
diff options
context:
space:
mode:
authorJonas Bröms <9416498+cez81@users.noreply.github.com>2018-10-30 03:17:26 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2018-10-30 10:17:26 +0800
commitdb30d6d7911b2fe458b5ccb5c6f6ad73381c9a70 (patch)
treeff374ccef3f61a5f17c3367472d068c6fca96185 /routers/repo/view.go
parent735b12eaf03613ed6986b3828a2e5715ed24484b (diff)
downloadgitea-db30d6d7911b2fe458b5ccb5c6f6ad73381c9a70.tar.gz
gitea-db30d6d7911b2fe458b5ccb5c6f6ad73381c9a70.zip
Serve audio files using HTML5 audio tag (#5221)
* Serve audio files using HTML5 audio tag * Correct copy paste error
Diffstat (limited to 'routers/repo/view.go')
-rw-r--r--routers/repo/view.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go
index 210eb9fe5f..657fe315a2 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -264,6 +264,8 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
ctx.Data["IsPDFFile"] = true
case base.IsVideoFile(buf):
ctx.Data["IsVideoFile"] = true
+ case base.IsAudioFile(buf):
+ ctx.Data["IsAudioFile"] = true
case base.IsImageFile(buf):
ctx.Data["IsImageFile"] = true
}