Implement the save_all method.
This commit is contained in:
@@ -28,15 +28,15 @@ impl LibraryItemEntity {
|
||||
Self {
|
||||
id: library_item.id.clone(),
|
||||
name: library_item.name.clone(),
|
||||
r#type: Self::map_type_to_i8(library_item.r#type)?,
|
||||
r#type: Self::map_type_to_i8(library_item.r#type),
|
||||
parent_folder_id: None
|
||||
}
|
||||
}
|
||||
|
||||
fn map_type_to_i8(item_type: LibraryItemType) -> Result<i8, Error> {
|
||||
fn map_type_to_i8(item_type: LibraryItemType) -> i8 {
|
||||
match item_type {
|
||||
LibraryItemType::VIDEO => Ok(0),
|
||||
LibraryItemType::FOLDER => Ok(1)
|
||||
LibraryItemType::VIDEO => 0,
|
||||
LibraryItemType::FOLDER => 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user