feat: add Qobuz playlist caching with versioning and infinite scroll UI
- Add qobuz_debug to .gitignore - Bump PMOMusic version to 0.3.26 - Add .cargo/ copy in Dockerfile for registry config - Implement infinite scroll in ServerDrawer.vue with IntersectionObserver and sentinel element - Add source/source_version fields to playlists for cache invalidation - Update pmocache and pmoplaylist DB schemas with versioning (SCHEMA_VERSION) - Add Qobuz API metadata fetching and pagination for playlist tracks - Implement album/playlist cache invalidation based on released_at/updated_at timestamps - Refactor adapt_playlist_items_to_qobuz → adapt_items_to_qobuz with cleaner logic - Add debug mode to save Qobuz API responses when QOBUZ_DEBUG_DIR is set
This commit is contained in:
@@ -2234,8 +2234,19 @@ fn fetch_playback_items(
|
||||
let object_metadata = server.browse_object(object_id)?;
|
||||
|
||||
let entries = if object_metadata.is_container {
|
||||
// For containers, browse children to get all items
|
||||
server.browse_children(object_id, 0, BROWSE_DEFAULT_LIMIT)?
|
||||
// For containers, browse all children with pagination
|
||||
let mut all_entries = Vec::new();
|
||||
let mut offset = 0u32;
|
||||
loop {
|
||||
let page = server.browse_children(object_id, offset, BROWSE_DEFAULT_LIMIT)?;
|
||||
let fetched = page.len() as u32;
|
||||
all_entries.extend(page);
|
||||
if fetched < BROWSE_DEFAULT_LIMIT {
|
||||
break;
|
||||
}
|
||||
offset += fetched;
|
||||
}
|
||||
all_entries
|
||||
} else {
|
||||
// For items, use the object itself
|
||||
vec![object_metadata]
|
||||
|
||||
Reference in New Issue
Block a user