Start to implement the save_all method.
This commit is contained in:
@@ -24,15 +24,13 @@ pub struct LibraryItemEntity {
|
||||
}
|
||||
|
||||
impl LibraryItemEntity {
|
||||
pub fn from_library_item(library_item: &LibraryItem) -> Result<Self, Error> {
|
||||
Ok(
|
||||
Self {
|
||||
id: library_item.id.clone(),
|
||||
name: library_item.name.clone(),
|
||||
r#type: Self::map_type_to_i8(library_item.r#type)?,
|
||||
parent_folder_id: None
|
||||
}
|
||||
)
|
||||
pub fn from_library_item(library_item: &LibraryItem) -> Self {
|
||||
Self {
|
||||
id: library_item.id.clone(),
|
||||
name: library_item.name.clone(),
|
||||
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> {
|
||||
|
||||
Reference in New Issue
Block a user