Skip to content

Commit

Permalink
Add podcastDescription() and language() methods to Id3Writer class
Browse files Browse the repository at this point in the history
  • Loading branch information
ewilan-riviere committed Feb 5, 2024
1 parent ee52a08 commit a67a563
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Models/Id3Writer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 9 additions & 0 deletions tests/WriterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a67a563

Please sign in to comment.