Skip to content

Commit

Permalink
Merge pull request #31 from kiwilan/develop
Browse files Browse the repository at this point in the history
v3.0.07
  • Loading branch information
ewilan-riviere committed Jun 4, 2024
2 parents ae11bb6 + 2223c55 commit 21df578
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
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 21df578

Please sign in to comment.