aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-03-10 08:52:23 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2017-03-10 08:52:23 +0100
commit53640bbc47b456f542f3fa203a5f9d6df41bc601 (patch)
treea5ca70b6f76b8e47aa37106ba685c570d3ed113c
parentc38f87e799c93942c79dfe972b74fa3c2860793d (diff)
downloadnextcloud-server-53640bbc47b456f542f3fa203a5f9d6df41bc601.tar.gz
nextcloud-server-53640bbc47b456f542f3fa203a5f9d6df41bc601.zip
MP3 without cover don't get a preview
* Fixes #2739 It tries to create an image from an SVG file. Which we don't support. So this fails and prints an log line. Then we fall back anyways to the 404 and fetch the default icon. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r--lib/private/Preview/MP3.php20
1 files changed, 1 insertions, 19 deletions
diff --git a/lib/private/Preview/MP3.php b/lib/private/Preview/MP3.php
index 804ec7fbcd9..05cd7c0edb1 100644
--- a/lib/private/Preview/MP3.php
+++ b/lib/private/Preview/MP3.php
@@ -61,24 +61,6 @@ class MP3 extends Provider {
}
}
- return $this->getNoCoverThumbnail();
+ return false;
}
-
- /**
- * Generates a default image when the file has no cover
- *
- * @return bool|\OCP\IImage false if the default image is missing or invalid
- */
- private function getNoCoverThumbnail() {
- $icon = \OC::$SERVERROOT . '/core/img/filetypes/audio.svg';
-
- if(!file_exists($icon)) {
- return false;
- }
-
- $image = new \OC_Image();
- $image->loadFromFile($icon);
- return $image->valid() ? $image : false;
- }
-
}