From f0bfea6c8ca1baebeafff3d18ca81dd24c6041f9 Mon Sep 17 00:00:00 2001 From: Deelight Date: Tue, 1 Mar 2016 17:47:05 +0100 Subject: [PATCH] Only allow ID3 scanning for local catalog if "getID3" is declared in the metadata_order config parameter. --- lib/class/vainfo.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/class/vainfo.class.php b/lib/class/vainfo.class.php index eba5f7a2..36cc1952 100644 --- a/lib/class/vainfo.class.php +++ b/lib/class/vainfo.class.php @@ -76,7 +76,9 @@ class vainfo } $this->_pathinfo['extension'] = strtolower($this->_pathinfo['extension']); - if ($this->islocal) { + $enabled_sources = (array) $this->get_metadata_order(); + + if (in_array('getID3', $enabled_sources) && $this->islocal) { // Initialize getID3 engine $this->_getID3 = new getID3(); @@ -206,7 +208,9 @@ class vainfo return true; } - if ($this->islocal) { + $enabled_sources = (array) $this->get_metadata_order(); + + if (in_array('getID3', $enabled_sources) && $this->islocal) { try { $this->_raw = $this->_getID3->analyze(Core::conv_lc_file($this->filename)); } catch (Exception $error) { @@ -217,8 +221,6 @@ class vainfo /* Figure out what type of file we are dealing with */ $this->type = $this->_get_type(); - $enabled_sources = (array) $this->get_metadata_order(); - if (in_array('filename', $enabled_sources)) { $this->tags['filename'] = $this->_parse_filename($this->filename); }