Skip to content

Commit

Permalink
Check for array before inserting audio data from mediainfo
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusIII committed Sep 3, 2018
1 parent fd66348 commit 52fa047
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Blacklight/ReleaseExtra.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,15 +458,15 @@ private function addAudio($releaseID, $audioID, $audioFormat, $audioMode, $audio
AudioData::query()->insert([
'releases_id' => $releaseID,
'audioid' => $audioID,
'audioformat' => ! empty($audioFormat) ? $audioFormat : '',
'audiomode' => ! empty($audioMode) ? $audioMode : '',
'audiobitratemode' => ! empty($audioBitRateMode) ? $audioBitRateMode : '',
'audiobitrate' => ! empty($audioBitRate) ? $audioBitRate : '',
'audiochannels' => ! empty($audioChannels) ? $audioChannels : '',
'audiosamplerate' => ! empty($audioSampleRate) ? $audioSampleRate : '',
'audiolibrary' => ! empty($audioLibrary) ? $audioLibrary : '',
'audiolanguage' => ! empty($audioLanguage) ? $audioLanguage : '',
'audiotitle' => ! empty($audioTitle) ? $audioTitle : '',
'audioformat' => \is_array($audioFormat) ? implode($audioFormat) : $audioFormat,
'audiomode' => \is_array($audioMode) ? implode($audioMode) : $audioMode,
'audiobitratemode' => \is_array($audioBitRateMode) ? implode($audioBitRateMode) : $audioBitRateMode,
'audiobitrate' => \is_array($audioBitRate) ? implode($audioBitRate) : $audioBitRate,
'audiochannels' => \is_array($audioChannels) ? implode($audioChannels) : $audioChannels,
'audiosamplerate' => \is_array($audioSampleRate) ? implode($audioSampleRate) : $audioSampleRate,
'audiolibrary' => \is_array($audioLibrary) ? implode($audioLibrary) : $audioLibrary,
'audiolanguage' => \is_array($audioLanguage) ? implode($audioLanguage) : $audioLanguage,
'audiotitle' => \is_array($audioTitle) ? implode($audioTitle) : $audioTitle,
]);
}
}
Expand Down
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
2018-09-03 DariusIII
* Chg: Check for array before inserting audio data from mediainfo
* Chg: Add checks before inserting audio data from mediainfo
* Chg: Update handling of allAsMgr tables
2018-09-02 DariusIII
Expand Down

0 comments on commit 52fa047

Please sign in to comment.