diff options
author | Georg Ehrke <georg@ownCloud.com> | 2013-06-19 10:21:55 +0200 |
---|---|---|
committer | Georg Ehrke <georg@ownCloud.com> | 2013-06-19 10:21:55 +0200 |
commit | 1fcbf8dd7ac69bfce888cc61084a72919503fd05 (patch) | |
tree | 2594386ae067179823fd383c5f9ed6ad66abf11c /lib/preview | |
parent | cc478d2f489fee7b29ad8ed6466246902ba0b1e0 (diff) | |
download | nextcloud-server-1fcbf8dd7ac69bfce888cc61084a72919503fd05.tar.gz nextcloud-server-1fcbf8dd7ac69bfce888cc61084a72919503fd05.zip |
implemenet getNoCoverThumbnail
Diffstat (limited to 'lib/preview')
-rw-r--r-- | lib/preview/mp3.php | 11 |
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; } } |