Mus 19 library sync completing with issues (#29)
* fix: Sync issues - AudioDB warmig + automatic sync skips * progress ui/ux + discovery and album fixes * artist fixes * several request level fixes and improvements * handle request fails + artist refresh + resilience fixes * fix format * fix stop sync fail + last.fn mbid issues + failures/validation reworks
This commit is contained in:
@@ -36,7 +36,7 @@ async def get_artist(
|
||||
)
|
||||
|
||||
try:
|
||||
result = await artist_service.get_artist_info(artist_id)
|
||||
result = await artist_service.get_artist_info_basic(artist_id)
|
||||
ctx = try_get_degradation_context()
|
||||
if ctx and ctx.has_degradation():
|
||||
result = msgspec.structs.replace(result, service_status=ctx.degraded_summary())
|
||||
|
||||
@@ -36,6 +36,17 @@ async def get_sync_status(
|
||||
)
|
||||
|
||||
|
||||
@router.post("/cancel")
|
||||
async def cancel_sync(
|
||||
status_service: CacheStatusService = Depends(get_cache_status_service),
|
||||
):
|
||||
from core.task_registry import TaskRegistry
|
||||
await status_service.cancel_current_sync()
|
||||
TaskRegistry.get_instance().cancel("precache-library")
|
||||
await status_service.wait_for_completion()
|
||||
return {"status": "cancelled"}
|
||||
|
||||
|
||||
@router.get("/stream")
|
||||
async def stream_sync_status(
|
||||
status_service: CacheStatusService = Depends(get_cache_status_service),
|
||||
|
||||
Reference in New Issue
Block a user