]> source.dussan.org Git - nextcloud-server.git/commitdiff
dont throw error when the collection scanner cant detect the length of an audio file
authorRobin Appelman <icewind1991@gmail.com>
Thu, 28 Jul 2011 21:06:20 +0000 (23:06 +0200)
committerRobin Appelman <icewind1991@gmail.com>
Thu, 28 Jul 2011 21:06:20 +0000 (23:06 +0200)
apps/media/lib_scanner.php

index 296acbdbaa9666218e276777930e6da7b325e22f..6ad04e7a1bec81141400aab55332b95ef549e053 100644 (file)
@@ -139,7 +139,7 @@ class OC_MEDIA_SCANNER{
                        }
                        $size=$data['filesize'];
                        $track=(isset($data['comments']['track']))?$data['comments']['track'][0]:0;
-                       $length=round($data['playtime_seconds']);
+                       $length=isset($data['playtime_seconds'])?round($data['playtime_seconds']):0;
                }
                if(!isset(self::$artists[$artist])){
                        $artistId=OC_MEDIA_COLLECTION::addArtist($artist);