Start to implement the save_all method.
This commit is contained in:
@@ -100,6 +100,11 @@ impl VideoPort for LibraryItemAdapter {
|
||||
}
|
||||
|
||||
fn save_all(&self, library_items: &Vec<LibraryItem>) -> Result<(), VideoError> {
|
||||
let entities = library_items.iter()
|
||||
.map(LibraryItemEntity::from_library_item)
|
||||
.collect::<Vec<LibraryItemEntity>>();
|
||||
|
||||
self.repository.save_all(entities)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user