Implement the video adapter to retrieve the root folder content.

This commit is contained in:
Florian THIERRY
2026-07-14 21:35:55 +02:00
parent fc7eeb1d57
commit beb0134dfc
11 changed files with 90 additions and 29 deletions
+2 -2
View File
@@ -18,12 +18,12 @@ impl VideoService {
Self { video_port }
}
pub fn list_root_folder(self) -> Result<Vec<LibraryItem>, VideoError> {
pub fn list_root_folder(&self) -> Result<Vec<LibraryItem>, VideoError> {
let read_items_with_possibly_no_id = self.video_port.list_root_folder()?;
let items_with_id = read_items_with_possibly_no_id.iter()
.map(LibraryRawItem::map_to_library_item)
.collect();
self.video_port.save_all(items_with_id);
self.video_port.save_all(&items_with_id)?;
Ok(items_with_id)
}
}