mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-16 01:00:17 +01:00
library: reconcile artist credits with playback and downloads
Left-join albums in the artist queue queries so albumless credited songs can be played, downloaded and deleted. Add sortName to the starred index, persist a per-source stale-credit marker so an interrupted sync cannot strand artist counts or hide artists, and recompute artist play data in one grouped pass.
This commit is contained in:
@@ -29,6 +29,15 @@ interface SourcesDao {
|
||||
@Query("SELECT id FROM sources WHERE isActive = 1 LIMIT 1")
|
||||
suspend fun activeSourceIdOnce(): Long?
|
||||
|
||||
@Query("SELECT creditsStale FROM sources WHERE id = :sourceId")
|
||||
suspend fun creditsStale(sourceId: Long): Boolean?
|
||||
|
||||
@Query("UPDATE sources SET creditsStale = :stale WHERE id = :sourceId")
|
||||
suspend fun setCreditsStale(
|
||||
sourceId: Long,
|
||||
stale: Boolean,
|
||||
)
|
||||
|
||||
@Insert
|
||||
suspend fun insertSource(source: Source): Long
|
||||
|
||||
|
||||
Reference in New Issue
Block a user