Skip to content

Commit b23056f

Browse files
committed
Detect video types more reliably
Under macOS, GLib.ContentType.guess() may actually return something like public.avi (see https://en.wikipedia.org/wiki/Uniform_Type_Identifier#Apple_public_UTIs). get_mime_type() increases the chances of a proper identification.
1 parent 09574dc commit b23056f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/classes/action/movie.vala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ namespace pdfpc {
264264
}
265265
bool uncertain;
266266
string ctype = GLib.ContentType.guess(uri, null, out uncertain);
267-
if (!("video" in ctype)) {
267+
if (!("video" in ctype) ||
268+
!("video" in GLib.ContentType.get_mime_type(ctype))) {
268269
return null;
269270
}
270271

0 commit comments

Comments
 (0)