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:
@@ -79,6 +79,26 @@ impl HybridRepository {
|
||||
.await
|
||||
}
|
||||
|
||||
/// Fetch a folder's items from the live server and persist them to the
|
||||
/// offline cache synchronously (unlike `get_items`, which saves in a
|
||||
/// fire-and-forget background task after a 100ms cache race).
|
||||
///
|
||||
/// Used by the full-catalog pre-sync (`sync_full_catalog`) to deterministically
|
||||
/// walk every library while online so the whole catalog is browsable — greyed
|
||||
/// out — offline. Returns the items fetched so the caller can recurse into
|
||||
/// containers. Server-only: errors if unreachable.
|
||||
pub async fn cache_items_from_server(
|
||||
&self,
|
||||
parent_id: &str,
|
||||
options: Option<GetItemsOptions>,
|
||||
) -> Result<Vec<MediaItem>, RepoError> {
|
||||
let result = self.online.get_items(parent_id, options).await?;
|
||||
if !result.items.is_empty() {
|
||||
self.offline.save_to_cache(parent_id, &result.items).await?;
|
||||
}
|
||||
Ok(result.items)
|
||||
}
|
||||
|
||||
/// Search only the live Jellyfin server (full library).
|
||||
pub async fn search_server_only(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user