MediaItem item)
throws Error {
if (!this.http_uri_present (item)) {
- // Create the HTTP proxy URI
- var uri = this.create_uri_for_item (item, -1, null);
- item.add_resource (didl_item, uri, this.get_protocol ());
+ this.add_proxy_resource (didl_item, item);
}
base.add_resources (didl_item, item);
}
}
+ internal void add_proxy_resource (DIDLLiteItem didl_item,
+ MediaItem item)
+ throws Error {
+ var uri = this.create_uri_for_item (item, -1, null);
+
+ item.add_resource (didl_item,
+ uri.to_string (),
+ this.get_protocol (),
+ uri.to_string ());
+ }
+
private bool http_uri_present (MediaItem item) {
bool present = false;
internal DIDLLiteResource add_resource (DIDLLiteItem didl_item,
string? uri,
- string protocol)
+ string protocol,
+ string? import_uri = null)
throws Error {
var res = didl_item.add_resource ();
res.uri = uri;
}
+ if (import_uri != null) {
+ res.import_uri = import_uri;
+ }
+
res.size = this.size;
res.duration = this.duration;
res.bitrate = this.bitrate;