Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaCollectionsTileService throws on empty playlist #1110

Open
fstanis opened this issue Mar 15, 2023 · 2 comments
Open

MediaCollectionsTileService throws on empty playlist #1110

fstanis opened this issue Mar 15, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@fstanis
Copy link
Collaborator

fstanis commented Mar 15, 2023

These lines rely on a few things being non-empty:

val playlists = playlistRepository.getAll()
.first()
val firstPlaylist = playlists.first()
val firstSong = firstPlaylist.mediaList.first()
val lastPlaylist = playlists.last()

If that's not true, the tile throws Caused by: java.util.NoSuchElementException: List is empty.

We need to add a default "empty playlist" tile.

@fstanis fstanis added the bug Something isn't working label Mar 15, 2023
@yschimke
Copy link
Collaborator

If we are changing this, we might want to consider adding an empty sign-in state also. Once you signin or mark guest mode, we serve the content.

@yschimke
Copy link
Collaborator

cc @kul3r4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants