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),
|
||||
|
||||
@@ -62,8 +62,8 @@ class AdvancedSettings(AppStruct):
|
||||
delay_albums: float = 0.3
|
||||
artist_discovery_warm_interval: int = 14400
|
||||
artist_discovery_warm_delay: float = 0.5
|
||||
artist_discovery_precache_delay: float = 0.3
|
||||
artist_discovery_precache_concurrency: int = 3
|
||||
artist_discovery_precache_delay: float = 0.2
|
||||
artist_discovery_precache_concurrency: int = 5
|
||||
memory_cache_max_entries: int = 10000
|
||||
memory_cache_cleanup_interval: int = 300
|
||||
cover_memory_cache_max_entries: int = 128
|
||||
@@ -237,7 +237,7 @@ class AdvancedSettingsFrontend(AppStruct):
|
||||
delay_albums: float = 0.3
|
||||
artist_discovery_warm_interval: int = 240
|
||||
artist_discovery_warm_delay: float = 0.5
|
||||
artist_discovery_precache_delay: float = 0.3
|
||||
artist_discovery_precache_delay: float = 0.2
|
||||
memory_cache_max_entries: int = 10000
|
||||
memory_cache_cleanup_interval: int = 300
|
||||
cover_memory_cache_max_entries: int = 128
|
||||
@@ -285,7 +285,7 @@ class AdvancedSettingsFrontend(AppStruct):
|
||||
audiodb_prewarm_concurrency: int = 4
|
||||
audiodb_prewarm_delay: float = 0.3
|
||||
request_concurrency: int = 2
|
||||
artist_discovery_precache_concurrency: int = 3
|
||||
artist_discovery_precache_concurrency: int = 5
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
int_coerce_fields = [
|
||||
|
||||
Reference in New Issue
Block a user