fix offline mode and layout bugs
🏗️ Build and Test JellyTau / Run Tests (push) Successful in 4m32s
Traceability Validation / Check Requirement Traces (push) Successful in 22s
Build & Release / Run Tests (push) Successful in 5m21s
🏗️ Build and Test JellyTau / Android Compile Check (push) Successful in 4m25s
Build & Release / Build Linux (push) Successful in 17m31s
Build & Release / Build Android (push) Successful in 22m5s
Build & Release / Create Release (push) Successful in 16s
🏗️ Build and Test JellyTau / Run Tests (push) Successful in 4m32s
Traceability Validation / Check Requirement Traces (push) Successful in 22s
Build & Release / Run Tests (push) Successful in 5m21s
🏗️ Build and Test JellyTau / Android Compile Check (push) Successful in 4m25s
Build & Release / Build Linux (push) Successful in 17m31s
Build & Release / Build Android (push) Successful in 22m5s
Build & Release / Create Release (push) Successful in 16s
This commit is contained in:
@@ -806,6 +806,38 @@ async enqueueDownload(downloadId: number, streamUrl: string, targetDir: string)
|
||||
async enqueueVideoDownloads(handle: string, downloadIds: number[], targetDir: string) : Promise<null> {
|
||||
return await TAURI_INVOKE("enqueue_video_downloads", { handle, downloadIds, targetDir });
|
||||
},
|
||||
/**
|
||||
* Walk every library on the server and persist all items to the offline cache
|
||||
* so the full catalog is browsable offline (greyed out when not downloaded).
|
||||
*
|
||||
* Best-effort: a library that fails to fetch is counted and skipped rather than
|
||||
* aborting the whole sync. Runs libraries sequentially to avoid hammering the
|
||||
* server. Uses `Recursive=true` so a single request per library returns the
|
||||
* containers and their playable children.
|
||||
*/
|
||||
async syncFullCatalog(handle: string) : Promise<CatalogSyncResult> {
|
||||
return await TAURI_INVOKE("sync_full_catalog", { handle });
|
||||
},
|
||||
/**
|
||||
* Report the last-synced timestamp so the UI can show a hint / decide whether
|
||||
* to trigger a fresh sync.
|
||||
*/
|
||||
async catalogSyncStatus() : Promise<CatalogSyncStatus> {
|
||||
return await TAURI_INVOKE("catalog_sync_status");
|
||||
},
|
||||
/**
|
||||
* Resolve the stream URL for every download row that was queued while offline
|
||||
* (`status = 'pending' AND stream_url IS NULL`), then pump the queue so they
|
||||
* start. Call this on reconnect.
|
||||
*
|
||||
* Audio rows resolve via `get_audio_stream_url`; video rows (media_type =
|
||||
* 'video') via the pure `get_video_download_url` builder using the row's stored
|
||||
* `quality_preset` — mirroring `enqueue_video_downloads`. Rows whose URL can't
|
||||
* be resolved are left pending (they retry on the next reconnect).
|
||||
*/
|
||||
async resumeQueuedDownloads(handle: string) : Promise<ResumeQueuedResult> {
|
||||
return await TAURI_INVOKE("resume_queued_downloads", { handle });
|
||||
},
|
||||
/**
|
||||
* Get download manager statistics
|
||||
*/
|
||||
@@ -1505,6 +1537,20 @@ export type CachedLibrary = { id: string; serverId: string; name: string; collec
|
||||
* Cached person info returned to frontend
|
||||
*/
|
||||
export type CachedPerson = { id: string; serverId: string; name: string; overview: string | null; primaryImageTag: string | null; premiereDate: string | null; endDate: string | null }
|
||||
export type CatalogSyncResult = {
|
||||
/**
|
||||
* Total items persisted to the offline cache across all libraries.
|
||||
*/
|
||||
itemsCached: number;
|
||||
/**
|
||||
* Libraries that failed to sync (e.g. server hiccup); best-effort.
|
||||
*/
|
||||
librariesFailed: number }
|
||||
export type CatalogSyncStatus = {
|
||||
/**
|
||||
* RFC-3339 timestamp of the last successful sync, if any.
|
||||
*/
|
||||
lastSyncedAt: string | null }
|
||||
/**
|
||||
* Connectivity status
|
||||
*/
|
||||
@@ -2066,6 +2112,15 @@ export type RemoteSessionStatus = { position: number; duration: number | null; i
|
||||
* TRACES: UR-005 | DR-005
|
||||
*/
|
||||
export type RepeatMode = "off" | "all" | "one"
|
||||
export type ResumeQueuedResult = {
|
||||
/**
|
||||
* Rows whose stream URL was resolved and are now pump-eligible.
|
||||
*/
|
||||
resolved: number;
|
||||
/**
|
||||
* Rows that couldn't be resolved (item metadata / URL lookup failed).
|
||||
*/
|
||||
failed: number }
|
||||
/**
|
||||
* Options for search queries
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user