From 00e0eb62f537486f678f45176a6767e7b329095e Mon Sep 17 00:00:00 2001 From: DariusIII Date: Mon, 29 Oct 2018 09:19:03 +0100 Subject: [PATCH] Fix mediainfo data check --- .../processing/post/ProcessAdditional.php | 8 +-- Changelog | 2 + composer.lock | 57 ++++++++++++------- 3 files changed, 44 insertions(+), 23 deletions(-) diff --git a/Blacklight/processing/post/ProcessAdditional.php b/Blacklight/processing/post/ProcessAdditional.php index 4673ce9c6..0134b5a3b 100755 --- a/Blacklight/processing/post/ProcessAdditional.php +++ b/Blacklight/processing/post/ProcessAdditional.php @@ -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. diff --git a/Changelog b/Changelog index f09d79f53..991dbbff8 100755 --- a/Changelog +++ b/Changelog @@ -1,3 +1,5 @@ +2018-10-29 DariusIII + * Fix: Fix mediainfo data check 2018-10-28 DariusIII * Chg: Update _getAudioInfo function to use mhor/php-mediainfo * Chg: Update PPA class diff --git a/composer.lock b/composer.lock index bb20c71d3..5413f4933 100644 --- a/composer.lock +++ b/composer.lock @@ -321,7 +321,8 @@ "Gemfile.lock", "*.md" ] - } + }, + "time": "2016-06-06T17:37:52+00:00" }, { "name": "bower-asset/autosize", @@ -350,7 +351,8 @@ "form", "textarea", "ui" - ] + ], + "time": "2017-05-19T15:36:30+00:00" }, { "name": "bower-asset/bootstrap", @@ -399,7 +401,8 @@ "mobile-first", "responsive", "web" - ] + ], + "time": "2016-07-25T15:51:55+00:00" }, { "name": "bower-asset/bootstrap-3.x", @@ -448,7 +451,8 @@ "mobile-first", "responsive", "web" - ] + ], + "time": "2016-07-25T15:51:55+00:00" }, { "name": "bower-asset/bootstrap-datepicker", @@ -477,7 +481,8 @@ }, "license": [ "Apache-2.0" - ] + ], + "time": "2016-08-05T09:50:13+00:00" }, { "name": "bower-asset/bootstrap-hover-dropdown", @@ -507,7 +512,8 @@ "dropdowns", "hover", "twitter" - ] + ], + "time": "2015-12-01T23:35:57+00:00" }, { "name": "bower-asset/bootstrap-progressbar", @@ -541,7 +547,8 @@ }, "license": [ "MIT" - ] + ], + "time": "2015-05-15T18:56:17+00:00" }, { "name": "bower-asset/colorbox", @@ -582,7 +589,8 @@ "modal", "popup", "ui" - ] + ], + "time": "2016-05-10T22:21:33+00:00" }, { "name": "bower-asset/datatables", @@ -697,7 +705,8 @@ "tests", "examples" ] - } + }, + "time": "2015-01-26T21:19:01+00:00" }, { "name": "bower-asset/flexboxgrid", @@ -733,7 +742,8 @@ "css", "flexbox", "grid" - ] + ], + "time": "2016-08-14T16:43:18+00:00" }, { "name": "bower-asset/font-awesome", @@ -778,7 +788,8 @@ "src", "build.xml" ] - } + }, + "time": "2015-07-20T20:04:00+00:00" }, { "name": "bower-asset/icheck", @@ -828,7 +839,8 @@ "replacement", "skins", "ui" - ] + ], + "time": "2014-03-03T17:36:28+00:00" }, { "name": "bower-asset/jquery", @@ -927,7 +939,8 @@ "scroll", "scrolltop", "scrolltotop" - ] + ], + "time": "2017-08-31T15:51:29+00:00" }, { "name": "bower-asset/jquery-migrate-3.0.x", @@ -946,7 +959,8 @@ "type": "bower-asset-library", "extra": { "bower-asset-main": "jquery-migrate.js" - } + }, + "time": "2016-06-10T14:28:59+00:00" }, { "name": "bower-asset/jquery.nicescroll", @@ -976,7 +990,8 @@ "demo", "package.json" ] - } + }, + "time": "2016-03-01T20:38:24+00:00" }, { "name": "bower-asset/pace", @@ -1022,7 +1037,8 @@ "progress", "progress", "spinner" - ] + ], + "time": "2014-11-06T16:31:34+00:00" }, { "name": "bower-asset/pnotify", @@ -1074,7 +1090,8 @@ "license": [ "Apache-2.0" ], - "description": "JavaScript notification plugin." + "description": "JavaScript notification plugin.", + "time": "2017-07-31T21:50:29+00:00" }, { "name": "bower-asset/respond", @@ -1098,7 +1115,8 @@ "test" ] }, - "description": "Fast and lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more)" + "description": "Fast and lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more)", + "time": "2013-12-19T04:44:31+00:00" }, { "name": "bower-asset/slimscroll", @@ -1139,7 +1157,8 @@ "scrolling", "slimscroll", "ui" - ] + ], + "time": "2016-06-11T09:19:14+00:00" }, { "name": "bower-asset/tinymce-dist",