summaryrefslogtreecommitdiffstats
path: root/lib/private/preview/mp3.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/preview/mp3.php')
-rw-r--r--lib/private/preview/mp3.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/private/preview/mp3.php b/lib/private/preview/mp3.php
index bb4d3dfce86..f1a50d99e13 100644
--- a/lib/private/preview/mp3.php
+++ b/lib/private/preview/mp3.php
@@ -8,11 +8,16 @@
namespace OC\Preview;
class MP3 extends Provider {
-
+ /**
+ * {@inheritDoc}
+ */
public function getMimeType() {
return '/audio\/mpeg/';
}
+ /**
+ * {@inheritDoc}
+ */
public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {
$getID3 = new \getID3();
@@ -31,6 +36,12 @@ class MP3 extends Provider {
return $this->getNoCoverThumbnail();
}
+ /**
+ * Generates a default image when the file has no cover
+ *
+ * @return false|\OC_Image False if the default image is missing or invalid,
+ * otherwise the image is returned as \OC_Image
+ */
private function getNoCoverThumbnail() {
$icon = \OC::$SERVERROOT . '/core/img/filetypes/audio.png';
@@ -44,5 +55,3 @@ class MP3 extends Provider {
}
}
-
-\OC\Preview::registerProvider('OC\Preview\MP3');