mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-29 08:07:59 +01:00
T357: Gracefully handle missing tags in M4A and OGG files.
This commit is contained in:
parent
5f69cdda5b
commit
9b9f25dc51
1 changed files with 14 additions and 2 deletions
|
@ -451,7 +451,13 @@ class ImportMLPMA extends Command {
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function getAtomTags($rawTags) {
|
protected function getAtomTags($rawTags) {
|
||||||
|
|
||||||
|
if (array_key_exists('tags', $rawTags) &&
|
||||||
|
array_key_exists('quicktime', $rawTags['tags'])) {
|
||||||
$tags = $rawTags['tags']['quicktime'];
|
$tags = $rawTags['tags']['quicktime'];
|
||||||
|
} else {
|
||||||
|
$tags = [];
|
||||||
|
}
|
||||||
|
|
||||||
$trackNumber = null;
|
$trackNumber = null;
|
||||||
if (isset($tags['track_number'])) {
|
if (isset($tags['track_number'])) {
|
||||||
|
@ -480,7 +486,13 @@ class ImportMLPMA extends Command {
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function getVorbisTags($rawTags) {
|
protected function getVorbisTags($rawTags) {
|
||||||
|
if (array_key_exists('tags', $rawTags) &&
|
||||||
|
array_key_exists('vorbiscomment', $rawTags['tags'])
|
||||||
|
) {
|
||||||
$tags = $rawTags['tags']['vorbiscomment'];
|
$tags = $rawTags['tags']['vorbiscomment'];
|
||||||
|
} else {
|
||||||
|
$tags = [];
|
||||||
|
}
|
||||||
|
|
||||||
$trackNumber = null;
|
$trackNumber = null;
|
||||||
if (isset($tags['track_number'])) {
|
if (isset($tags['track_number'])) {
|
||||||
|
|
Loading…
Reference in a new issue