]> source.dussan.org Git - nextcloud-server.git/commitdiff
Don't call getLocalFile() until you know it actually is music
authorMichael Gapczynski <mtgap@owncloud.com>
Tue, 26 Jun 2012 18:48:51 +0000 (14:48 -0400)
committerMichael Gapczynski <mtgap@owncloud.com>
Tue, 26 Jun 2012 18:51:31 +0000 (14:51 -0400)
apps/media/lib_scanner.php

index a8218c3a4d04de2c8c57236834e815b28d87abbe..3c32879eeeb32561a4bcd29b46d413c3372b128e 100644 (file)
@@ -61,7 +61,6 @@ class OC_MEDIA_SCANNER{
         * @return boolean
         */
        public static function scanFile($path){
-               $file=OC_Filesystem::getLocalFile($path);
                if(!self::isMusic($path)){
                        return;
                }
@@ -69,6 +68,7 @@ class OC_MEDIA_SCANNER{
                        self::$getID3=@new getID3();
                        self::$getID3->encoding='UTF-8';
                }
+               $file=OC_Filesystem::getLocalFile($path);
                $data=@self::$getID3->analyze($file);
                getid3_lib::CopyTagsToComments($data);
                if(!isset($data['comments'])){