Start to implement the save_all method.

This commit is contained in:
Florian THIERRY
2026-07-17 15:01:47 +02:00
parent ad44b181cb
commit 437314f304
4 changed files with 46 additions and 16 deletions
+7 -9
View File
@@ -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> {