| @@ 137-149 (lines=13) @@ | ||
| 134 | // copy attachments to 'comments' array if nesesary |
|
| 135 | if (isset($info['flac']['PICTURE']) && ($this->getid3->option_save_attachments !== getID3::ATTACHMENTS_NONE)) { |
|
| 136 | foreach ($info['flac']['PICTURE'] as $entry) { |
|
| 137 | if (!empty($entry['data'])) { |
|
| 138 | if (!isset($info['flac']['comments']['picture'])) { |
|
| 139 | $info['flac']['comments']['picture'] = array(); |
|
| 140 | } |
|
| 141 | $comments_picture_data = array(); |
|
| 142 | foreach (array('data', 'image_mime', 'image_width', 'image_height', 'imagetype', 'picturetype', 'description', 'datalength') as $picture_key) { |
|
| 143 | if (isset($entry[$picture_key])) { |
|
| 144 | $comments_picture_data[$picture_key] = $entry[$picture_key]; |
|
| 145 | } |
|
| 146 | } |
|
| 147 | $info['flac']['comments']['picture'][] = $comments_picture_data; |
|
| 148 | unset($comments_picture_data); |
|
| 149 | } |
|
| 150 | } |
|
| 151 | } |
|
| 152 | ||
| @@ 1452-1466 (lines=15) @@ | ||
| 1449 | } |
|
| 1450 | $parsedFrame['data_filename'] = $destination_filename; |
|
| 1451 | unset($parsedFrame['data']); |
|
| 1452 | } else { |
|
| 1453 | if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) { |
|
| 1454 | if (!isset($info['id3v2']['comments']['picture'])) { |
|
| 1455 | $info['id3v2']['comments']['picture'] = array(); |
|
| 1456 | } |
|
| 1457 | $comments_picture_data = array(); |
|
| 1458 | foreach (array('data', 'image_mime', 'image_width', 'image_height', 'imagetype', 'picturetype', 'description', 'datalength') as $picture_key) { |
|
| 1459 | if (isset($parsedFrame[$picture_key])) { |
|
| 1460 | $comments_picture_data[$picture_key] = $parsedFrame[$picture_key]; |
|
| 1461 | } |
|
| 1462 | } |
|
| 1463 | $info['id3v2']['comments']['picture'][] = $comments_picture_data; |
|
| 1464 | unset($comments_picture_data); |
|
| 1465 | } |
|
| 1466 | } |
|
| 1467 | } while (false); |
|
| 1468 | } |
|
| 1469 | ||