Compare commits

...

2 commits

Author SHA1 Message Date
2cd489658a
prefix 2022-10-08 22:52:23 +07:00
cb2fb07b24
ogg 2022-10-08 22:46:38 +07:00

View file

@ -36,7 +36,7 @@
[(eq? content-type #f) `""] [(eq? content-type #f) `""]
[(regexp-match? #rx"^image/" content-type) [(regexp-match? #rx"^image/" content-type)
`(img (@ (src ,(u-proxy-url image-url))))] `(img (@ (src ,(u-proxy-url image-url))))]
[(regexp-match? #rx"^audio/" content-type) [(regexp-match? #rx"^audio/|^application/ogg$" content-type)
`(audio (@ (src ,(u-proxy-url image-url)) (controls)))] `(audio (@ (src ,(u-proxy-url image-url)) (controls)))]
[(regexp-match? #rx"^video/" content-type) [(regexp-match? #rx"^video/" content-type)
`(video (@ (src ,(u-proxy-url image-url)) (controls)))] `(video (@ (src ,(u-proxy-url image-url)) (controls)))]
@ -118,7 +118,10 @@
(if (not (jp "/exists" media-detail #f)) (if (not (jp "/exists" media-detail #f))
(next-dispatcher) (next-dispatcher)
(response-handler (response-handler
(define title (jp "/fileTitle" media-detail)) (define title (jp "/fileTitle" media-detail ""))
(define title (if (non-empty-string? title)
(format "File:~a" title)
prefixed-title))
(define body (generate-results-page (define body (generate-results-page
#:source-url source-url #:source-url source-url
#:wikiname wikiname #:wikiname wikiname