mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-16 01:00:17 +01:00
library: fix credited fallback and stale marker writes
Restore the both-tables-empty fallback in the credit recompute, skip redundant marker writes, append albumless tracks after album tracks, and make the paged artist query observe sources. Add tests for an interrupted sync and the partial-relation migration guard.
This commit is contained in:
@@ -32,12 +32,19 @@ interface SourcesDao {
|
||||
@Query("SELECT creditsStale FROM sources WHERE id = :sourceId")
|
||||
suspend fun creditsStale(sourceId: Long): Boolean?
|
||||
|
||||
@Query("UPDATE sources SET creditsStale = :stale WHERE id = :sourceId")
|
||||
@Query("UPDATE sources SET creditsStale = :stale WHERE id = :sourceId AND creditsStale != :stale")
|
||||
suspend fun setCreditsStale(
|
||||
sourceId: Long,
|
||||
stale: Boolean,
|
||||
)
|
||||
|
||||
@Query("UPDATE sources SET name = :name, address = :address WHERE id = :sourceId")
|
||||
suspend fun updateSourceDetails(
|
||||
sourceId: Long,
|
||||
name: String,
|
||||
address: String,
|
||||
)
|
||||
|
||||
@Insert
|
||||
suspend fun insertSource(source: Source): Long
|
||||
|
||||
|
||||
Reference in New Issue
Block a user