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:
parent
2cd3264878
commit
f0bfea6c8c
1 changed files with 6 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue