Fixes #4079, Fixes #3841 -- Show all playlists in media manager even when in "view playlist contents" mode.
This commit is contained in:
parent
4cd4abe20e
commit
f5425e3987
|
@ -42,6 +42,9 @@ There have been no changes since the last stable release.
|
|||
|
||||
## Bug Fixes
|
||||
|
||||
- In the Media Manager, when listing media in a single playlist, the manager will show other playlists associated with
|
||||
the media (#4079, .
|
||||
|
||||
- Issues with Dropbox filesystems used as Storage Locations have been resolved (#4026, #4057).
|
||||
|
||||
- An issue preventing broadcast recordings from saving correctly has been identified and fixed (#4055).
|
||||
|
|
|
@ -120,8 +120,23 @@ class ListAction
|
|||
} elseif (str_starts_with($searchPhrase, 'playlist:')) {
|
||||
[, $playlistName] = explode(':', $searchPhrase, 2);
|
||||
|
||||
$mediaQueryBuilder->andWhere('sp.name = :playlist_name')
|
||||
->setParameter('playlist_name', $playlistName);
|
||||
$playlist = $em->getRepository(Entity\StationPlaylist::class)
|
||||
->findOneBy(
|
||||
[
|
||||
'station' => $station,
|
||||
'name' => $playlistName,
|
||||
]
|
||||
);
|
||||
|
||||
if (!$playlist instanceof Entity\StationPlaylist) {
|
||||
return $response->withStatus(400)
|
||||
->withJson(new Entity\Api\Error('Playlist not found.'));
|
||||
}
|
||||
|
||||
$mediaQueryBuilder->andWhere(
|
||||
'sm.id IN (SELECT spm2.media_id FROM App\Entity\StationPlaylistMedia spm2 '
|
||||
. 'WHERE spm2.playlist = :playlist)'
|
||||
)->setParameter('playlist', $playlist);
|
||||
} else {
|
||||
$mediaQueryBuilder->andWhere('(sm.title LIKE :query OR sm.artist LIKE :query)')
|
||||
->setParameter('query', '%' . $searchPhrase . '%');
|
||||
|
|
Loading…
Reference in New Issue