mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-31 02:08:57 +00:00
Fix mediainfo data check
This commit is contained in:
@@ -1720,16 +1720,16 @@ class ProcessAdditional
|
||||
|
||||
if ($xmlArray !== null) {
|
||||
foreach ($xmlArray->getAudios() as $track) {
|
||||
if (isset($track['album'], $track['performer'])) {
|
||||
if (isset($track->get('album'), $track->get('performer'))) {
|
||||
if ((int) $this->_release->predb_id === 0 && config('nntmux.rename_music_mediainfo')) {
|
||||
// Make the extension upper case.
|
||||
$ext = strtoupper($fileExtension);
|
||||
|
||||
// Form a new search name.
|
||||
if (! empty($track['recorded_date']) && preg_match('/(?:19|20)\d\d/', $track['recorded_date'], $Year)) {
|
||||
$newName = $track['performer'].' - '.$track['album'].' ('.$Year[0].') '.$ext;
|
||||
if (! empty($track->get('recorded_date')) && preg_match('/(?:19|20)\d\d/', $track->get('recorded_date'), $Year)) {
|
||||
$newName = $track->get('performer').' - '.$track->get('album').' ('.$Year[0].') '.$ext;
|
||||
} else {
|
||||
$newName = $track['performer'].' - '.$track['album'].' '.$ext;
|
||||
$newName = $track->get('performer').' - '.$track->get('album').' '.$ext;
|
||||
}
|
||||
|
||||
// Get the category or try to determine it.
|
||||
|
||||
Reference in New Issue
Block a user