File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
library/src/commonMain/kotlin/project/pipepipe/app/viewmodel Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -119,10 +119,12 @@ class PlaylistDetailViewModel : BaseViewModel<PlaylistUiState>(PlaylistUiState()
119119
120120 // Check if this remote playlist is bookmarked in database
121121 val playlistInfo = result.info as ? PlaylistInfo
122- val bookmarkedPlaylist = DatabaseOperations .getRemotePlaylistByUrl(playlistInfo!! .url)
122+ val bookmarkedPlaylist = if (playlistInfo?.serviceId != null ) {
123+ DatabaseOperations .getRemotePlaylistByUrl(playlistInfo.url)
124+ } else null
123125
124126 val finalPlaylistInfo = if (bookmarkedPlaylist != null ) {
125- playlistInfo.copy(
127+ playlistInfo? .copy(
126128 uid = bookmarkedPlaylist.uid,
127129 isPinned = bookmarkedPlaylist.is_pinned != 0L
128130 )
You can’t perform that action at this time.
0 commit comments