Implement the video adapter to retrieve the root folder content.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user