Skip to content

Commit

Permalink
app: SyncUtils: Fix liked albums sync
Browse files Browse the repository at this point in the history
  • Loading branch information
DD3Boh committed May 9, 2024
1 parent 8e3950b commit ee64cf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/com/dd3boh/outertune/utils/SyncUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class SyncUtils @Inject constructor(
YouTube.library("FEmusic_liked_albums").completedLibraryPage().onSuccess { page ->
val albums = page.items.filterIsInstance<AlbumItem>().reversed()

database.albumsByNameAsc().first()
database.albumsLikedByNameAsc().first()
.filterNot { it.id in albums.map(AlbumItem::id) }
.forEach { database.update(it.album.localToggleLike()) }

Expand Down

0 comments on commit ee64cf0

Please sign in to comment.