Skip to content

Commit

Permalink
Merge tag 'v2.3.29' into develop
Browse files Browse the repository at this point in the history
v2.3.29
  • Loading branch information
ambroisemaupate committed Oct 10, 2024
2 parents 53302bb + cfbe1d8 commit ca17675
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to Roadiz will be documented in this file.

## [2.3.29](https://github.com/roadiz/core-bundle-dev-app/compare/v2.3.28...v2.3.29) - 2024-10-10

### Bug Fixes

- Allow duplicated documents when embedding audio embed covers, fix #19 - ([e61e2ee](https://github.com/roadiz/core-bundle-dev-app/commit/e61e2ee7f6caf12275a86519085e50d41917003b))
- Do not throw exception on bad page and itemPerPage argument, just use defaults fix #20 - ([e051822](https://github.com/roadiz/core-bundle-dev-app/commit/e05182222564e2a4dd59048cbac5d7771fc99d82))

## [2.3.28](https://github.com/roadiz/core-bundle-dev-app/compare/v2.3.27...v2.3.28) - 2024-09-24

### Bug Fixes
Expand Down
5 changes: 5 additions & 0 deletions lib/Documents/src/MediaFinders/AbstractDeezerEmbedFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,9 @@ public function getSource(array &$options = []): string
// https://widget.deezer.com/widget/dark/playlist/9313425622
return $baseUri . '?' . http_build_query($queryString);
}

protected function areDuplicatesAllowed(): bool
{
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,9 @@ public function getSource(array &$options = []): string

return 'https://www.mixcloud.com/widget/iframe/?' . http_build_query($queryString);
}

protected function areDuplicatesAllowed(): bool
{
return true;
}
}
7 changes: 6 additions & 1 deletion lib/Documents/src/MediaFinders/AbstractPodcastFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function createDocumentFromFeed(

if (null !== $file) {
$documentFactory->setFile($file);
$document = $documentFactory->getDocument();
$document = $documentFactory->getDocument(false, $this->areDuplicatesAllowed());
if (null !== $document) {
/*
* Create document metas
Expand Down Expand Up @@ -239,4 +239,9 @@ public function getThumbnailURL(): ?string
}
return null;
}

protected function areDuplicatesAllowed(): bool
{
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,9 @@ public function getSource(array &$options = []): string

return 'https://w.soundcloud.com/player/?' . http_build_query($queryString);
}

protected function areDuplicatesAllowed(): bool
{
return true;
}
}
5 changes: 5 additions & 0 deletions lib/Documents/src/MediaFinders/AbstractSpotifyEmbedFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,9 @@ public function getSource(array &$options = []): string

return $this->embedId;
}

protected function areDuplicatesAllowed(): bool
{
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ public function setDisplayingAllNodesStatuses(bool $displayAllNodesStatuses): se
*/
public function setPage(int $page): self
{
if ($page < 1) {
throw new \RuntimeException("Page cannot be lesser than 1.", 1);
}
$this->currentPage = (int) $page;
$this->currentPage = $page > 0 ? $page : 1;

return $this;
}
Expand Down Expand Up @@ -177,11 +174,7 @@ protected function getItemPerPage(): int
*/
public function setItemPerPage(int $itemPerPage): self
{
if ($itemPerPage < 1) {
throw new \RuntimeException("Item count per page cannot be lesser than 1.", 1);
}

$this->itemPerPage = (int) $itemPerPage;
$this->itemPerPage = $itemPerPage > 0 ? $itemPerPage : 1;

return $this;
}
Expand Down

0 comments on commit ca17675

Please sign in to comment.