mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-16 01:00:17 +01:00
library: skip queue resets for missing songs
This commit is contained in:
@@ -542,7 +542,7 @@ interface LibraryDao {
|
||||
sourceId: Long,
|
||||
id: String,
|
||||
starred: Long?,
|
||||
)
|
||||
): Int
|
||||
|
||||
@Query("SELECT id FROM artists WHERE sourceId = :sourceId")
|
||||
suspend fun artistIds(sourceId: Long): List<String>
|
||||
|
||||
@@ -459,8 +459,9 @@ class LibraryRepository(
|
||||
val previous = song(sourceId, id).first()?.starred
|
||||
if (previous == starred) return
|
||||
val point = queueRepository.captureResetPoint()
|
||||
dao.setSongStar(sourceId, id, starred)
|
||||
queueRepository.resetChangedOrigins(setOf(QueueOrigin(QueueKind.Starred, sourceId, "")), point)
|
||||
if (dao.setSongStar(sourceId, id, starred) > 0) {
|
||||
queueRepository.resetChangedOrigins(setOf(QueueOrigin(QueueKind.Starred, sourceId, "")), point)
|
||||
}
|
||||
} else {
|
||||
when (type) {
|
||||
StarType.Album -> dao.setAlbumStar(sourceId, id, starred)
|
||||
|
||||
Reference in New Issue
Block a user