Implement parent_id=-1
This commit is contained in:
parent
8ab3d4d428
commit
79a8451519
3 changed files with 10 additions and 10 deletions
|
|
@ -70,7 +70,7 @@ pub mod browse {
|
|||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Item {
|
||||
pub id: usize,
|
||||
pub parent_id: Option<isize>,
|
||||
pub parent_id: usize,
|
||||
pub title: String,
|
||||
pub mime_type: Option<mime_guess::Mime>,
|
||||
pub url: String,
|
||||
|
|
@ -97,7 +97,7 @@ pub mod browse {
|
|||
"../resources/templates/content_directory/control/browse/item.tmpl.xml"
|
||||
),
|
||||
id = item.id,
|
||||
parent_id = item.parent_id.unwrap_or(-1),
|
||||
parent_id = item.parent_id,
|
||||
mime_type = mime,
|
||||
url = item.url,
|
||||
upnp_class = upnp_class,
|
||||
|
|
@ -115,7 +115,7 @@ pub mod browse {
|
|||
"../resources/templates/content_directory/control/browse/container.tmpl.xml"
|
||||
),
|
||||
id = item.id,
|
||||
parent_id = item.parent_id.unwrap_or(0),
|
||||
parent_id = item.parent_id.map(|p| p as isize).unwrap_or(-1),
|
||||
title = item.title,
|
||||
childCountTag = child_count_tag
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue