diff --git a/app/src/main/kotlin/it/vfsfitvnm/vimusic/Database.kt b/app/src/main/kotlin/it/vfsfitvnm/vimusic/Database.kt index 0b4d559..1f12dce 100644 --- a/app/src/main/kotlin/it/vfsfitvnm/vimusic/Database.kt +++ b/app/src/main/kotlin/it/vfsfitvnm/vimusic/Database.kt @@ -40,7 +40,6 @@ import it.vfsfitvnm.vimusic.models.DetailedSong import it.vfsfitvnm.vimusic.models.DetailedSongWithContentLength import it.vfsfitvnm.vimusic.models.Event import it.vfsfitvnm.vimusic.models.Format -import it.vfsfitvnm.vimusic.models.PartialArtist import it.vfsfitvnm.vimusic.models.Playlist import it.vfsfitvnm.vimusic.models.PlaylistPreview import it.vfsfitvnm.vimusic.models.PlaylistWithSongs @@ -427,9 +426,6 @@ interface Database { @Upsert fun upsert(artist: Artist) - @Upsert(Artist::class) - fun upsert(artist: PartialArtist) - @Delete fun delete(searchQuery: SearchQuery) diff --git a/app/src/main/kotlin/it/vfsfitvnm/vimusic/models/PartialArtist.kt b/app/src/main/kotlin/it/vfsfitvnm/vimusic/models/PartialArtist.kt deleted file mode 100644 index 5e22657..0000000 --- a/app/src/main/kotlin/it/vfsfitvnm/vimusic/models/PartialArtist.kt +++ /dev/null @@ -1,9 +0,0 @@ -package it.vfsfitvnm.vimusic.models - -data class PartialArtist( - val id: String, - val name: String?, - val thumbnailUrl: String?, - val info: String?, - val timestamp: Long? = null, -) diff --git a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/album/AlbumScreen.kt b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/album/AlbumScreen.kt index f06c02a..03202df 100644 --- a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/album/AlbumScreen.kt +++ b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/album/AlbumScreen.kt @@ -104,7 +104,8 @@ fun AlbumScreen(browseId: String) { year = albumPage.year, authorsText = albumPage.authors?.joinToString("") { it.name ?: "" }, shareUrl = albumPage.url, - timestamp = System.currentTimeMillis() + timestamp = System.currentTimeMillis(), + bookmarkedAt = album?.bookmarkedAt ), albumPage .songsPage diff --git a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/artist/ArtistScreen.kt b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/artist/ArtistScreen.kt index 030504e..ab56d2c 100644 --- a/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/artist/ArtistScreen.kt +++ b/app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/artist/ArtistScreen.kt @@ -32,7 +32,7 @@ import it.vfsfitvnm.route.RouteHandler import it.vfsfitvnm.vimusic.Database import it.vfsfitvnm.vimusic.LocalPlayerServiceBinder import it.vfsfitvnm.vimusic.R -import it.vfsfitvnm.vimusic.models.PartialArtist +import it.vfsfitvnm.vimusic.models.Artist import it.vfsfitvnm.vimusic.query import it.vfsfitvnm.vimusic.savers.ArtistSaver import it.vfsfitvnm.vimusic.savers.InnertubeAlbumsPageSaver @@ -103,12 +103,13 @@ fun ArtistScreen(browseId: String) { query { Database.upsert( - PartialArtist( + Artist( id = browseId, name = artistPage.name, thumbnailUrl = artistPage.thumbnail?.url, info = artistPage.description, - timestamp = System.currentTimeMillis() + timestamp = System.currentTimeMillis(), + bookmarkedAt = artist?.bookmarkedAt ) ) }