Refacto get_root_folder_read_library_items method.

This commit is contained in:
Florian THIERRY
2026-07-14 22:16:37 +02:00
parent beb0134dfc
commit 6c105ac757
2 changed files with 28 additions and 33 deletions
@@ -21,6 +21,10 @@ pub struct LibraryRawItem {
pub r#type: LibraryItemType,
}
impl LibraryRawItem {
pub fn new(id: Option<Uuid>, name: String, r#type: LibraryItemType) -> Self {
Self { id, name, r#type }
}
pub fn map_to_library_item(&self) -> LibraryItem {
LibraryItem {
id: self.id.unwrap_or(Uuid::new_v4()),