1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-06 03:49:56 +02:00

Only allow ID3 scanning for local catalog if "getID3" is declared in the metadata_order config parameter.

This commit is contained in:
Deelight 2016-03-01 17:47:05 +01:00
parent 2cd3264878
commit f0bfea6c8c

View file

@ -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);
}