summaryrefslogtreecommitdiffstats
path: root/lib/Db/Item.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Db/Item.php')
-rw-r--r--lib/Db/Item.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Db/Item.php b/lib/Db/Item.php
index 1a8d284a2..3a17dd2cb 100644
--- a/lib/Db/Item.php
+++ b/lib/Db/Item.php
@@ -491,4 +491,18 @@ class Item extends Entity implements IAPI, \JsonSerializable
$this->getEnclosureLink()
);
}
+
+ /**
+ * Check if a given mimetype is supported
+ *
+ * @param string $mime mimetype to check
+ *
+ * @return boolean
+ */
+ public function isSupportedMime($mime)
+ {
+ return (
+ stripos($mime, 'audio/') !== false ||
+ stripos($mime, 'video/') !== false);
+ }
}