diff --git a/README.md b/README.md index 49a5866..2951778 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,8 @@ $audio->getCreationDate(); // `?string` to get creation date (audiobook) $audio->getCopyright(); // `?string` to get copyright (audiobook) $audio->getEncoding(); // `?string` to get encoding $audio->getDescription(); // `?string` to get description (audiobook) +$audio->getPodcastDescription(); // `?string` to get podcast description (audiobook) +$audio->getLanguage(); // `?string` to get language $audio->getLyrics(); // `?string` (audiobook) $audio->getStik(); // `?string` (audiobook) $audio->getDuration(); // `?float` to get duration in seconds diff --git a/composer.json b/composer.json index 7d41efa..20ace07 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "kiwilan/php-audio", "description": "PHP package to parse and update audio files metadata, with `JamesHeinrich/getID3`.", - "version": "3.0.06", + "version": "3.0.07", "keywords": [ "audio", "php", diff --git a/src/Models/Id3Writer.php b/src/Models/Id3Writer.php index e0882b9..5e56a82 100644 --- a/src/Models/Id3Writer.php +++ b/src/Models/Id3Writer.php @@ -201,6 +201,20 @@ public function description(?string $description): self return $this; } + public function podcastDescription(?string $podcastDescription): self + { + $this->core->setPodcastDescription($podcastDescription); + + return $this; + } + + public function language(?string $language): self + { + $this->core->setLanguage($language); + + return $this; + } + public function lyrics(?string $lyrics): self { $this->core->setLyrics($lyrics); diff --git a/tests/WriterTest.php b/tests/WriterTest.php index 4005019..a1c3c60 100644 --- a/tests/WriterTest.php +++ b/tests/WriterTest.php @@ -275,6 +275,15 @@ expect($tag->getCore()->getCover()->data())->toBe(base64_encode($content)); })->with([MP3_WRITER]); +// it('can change podcast description and language', function () { +// $audio = Audio::get(AUDIOBOOK); +// $tag = $audio->update() +// ->title('New Title') +// ->podcastDescription('New Podcast Description') +// ->language('New Language') +// ->save(); +// }); + // it('can not override tags', function (string $path) { // $audio = Audio::get($path);