mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-13 11:37:46 +02:00
fix: remove heavy image cover data from audio file metadata
This commit is contained in:
parent
e98ec8c950
commit
f74403bd7a
1 changed files with 4 additions and 0 deletions
|
|
@ -41,6 +41,10 @@ class Audio extends BaseMedia
|
||||||
$getID3 = new GetID3();
|
$getID3 = new GetID3();
|
||||||
$audioMetadata = $getID3->analyze(media_path($this->file_path));
|
$audioMetadata = $getID3->analyze(media_path($this->file_path));
|
||||||
|
|
||||||
|
// remove heavy image data from metadata
|
||||||
|
unset($audioMetadata['comments']['picture']);
|
||||||
|
unset($audioMetadata['id3v2']['APIC']);
|
||||||
|
|
||||||
$this->attributes['file_mimetype'] = $audioMetadata['mime_type'];
|
$this->attributes['file_mimetype'] = $audioMetadata['mime_type'];
|
||||||
$this->attributes['file_size'] = $audioMetadata['filesize'];
|
$this->attributes['file_size'] = $audioMetadata['filesize'];
|
||||||
$this->attributes['description'] = @$audioMetadata['id3v2']['comments']['comment'][0];
|
$this->attributes['description'] = @$audioMetadata['id3v2']['comments']['comment'][0];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue