From a67a563d214140d44da8c10ec0994f5c2202617c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Mon, 5 Feb 2024 08:44:47 +0100 Subject: [PATCH] Add podcastDescription() and language() methods to Id3Writer class --- src/Models/Id3Writer.php | 14 ++++++++++++++ tests/WriterTest.php | 9 +++++++++ 2 files changed, 23 insertions(+) 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);