summaryrefslogtreecommitdiffstats
path: root/lib/preview
diff options
context:
space:
mode:
authorGeorg Ehrke <georg@ownCloud.com>2013-06-19 10:21:55 +0200
committerGeorg Ehrke <georg@ownCloud.com>2013-06-19 10:21:55 +0200
commit1fcbf8dd7ac69bfce888cc61084a72919503fd05 (patch)
tree2594386ae067179823fd383c5f9ed6ad66abf11c /lib/preview
parentcc478d2f489fee7b29ad8ed6466246902ba0b1e0 (diff)
downloadnextcloud-server-1fcbf8dd7ac69bfce888cc61084a72919503fd05.tar.gz
nextcloud-server-1fcbf8dd7ac69bfce888cc61084a72919503fd05.zip
implemenet getNoCoverThumbnail
Diffstat (limited to 'lib/preview')
-rw-r--r--lib/preview/mp3.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/preview/mp3.php b/lib/preview/mp3.php
index 60dfb5ff461..835ff529000 100644
--- a/lib/preview/mp3.php
+++ b/lib/preview/mp3.php
@@ -20,7 +20,6 @@ class MP3 extends Provider {
$tmppath = $fileview->toTmpFile($path);
- //Todo - add stream support
$tags = $getID3->analyze($tmppath);
\getid3_lib::CopyTagsToComments($tags);
$picture = @$tags['id3v2']['APIC'][0]['data'];
@@ -32,8 +31,14 @@ class MP3 extends Provider {
}
public function getNoCoverThumbnail($maxX, $maxY) {
- $image = new \OC_Image();
- return $image;
+ $icon = \OC::$SERVERROOT . '/core/img/filetypes/audio.png';
+
+ if(!file_exists($icon)) {
+ return false;
+ }
+
+ $image = new \OC_Image($icon);
+ return $image->valid() ? $image : false;
}
}