Remove stub impl of ContentDirectoryBrowseProvider

This commit is contained in:
Igor Katson 2024-09-02 13:05:25 +01:00
parent 0cb34d9bf1
commit f96a9024e1
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
2 changed files with 22 additions and 14 deletions

View file

@ -147,6 +147,9 @@ pub mod browse {
</DIDL-Lite>"#,
items = envelope.items
);
// This COULD have been done with CDATA, but some Samsung TVs don't like that, they want
// escaped XML instead.
let items_encoded = quick_xml::escape::escape(items_encoded.as_ref());
format!(
@ -339,17 +342,6 @@ pub trait ContentDirectoryBrowseProvider: Send + Sync {
fn browse_metadata(&self, object_id: usize, http_hostname: &str) -> Vec<ItemOrContainer>;
}
impl ContentDirectoryBrowseProvider for Vec<ItemOrContainer> {
fn browse_direct_children(&self, _parent_id: usize, _http_host: &str) -> Vec<ItemOrContainer> {
self.clone()
}
fn browse_metadata(&self, _object_id: usize, _http_hostname: &str) -> Vec<ItemOrContainer> {
// TODO. Remove the vec provider from core code.
vec![]
}
}
#[cfg(test)]
mod tests {
#[test]