Implement the save_all method.

This commit is contained in:
Florian THIERRY
2026-07-17 15:54:10 +02:00
parent 437314f304
commit 8e04be8ece
4 changed files with 33 additions and 33 deletions
+4 -4
View File
@@ -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
}
}