[rygel] server: Make it possbile to remove a container
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] server: Make it possbile to remove a container
- Date: Fri, 12 Apr 2013 11:28:51 +0000 (UTC)
commit f29c1663dbc8abdc1815578370fa984dbc84e44f
Author: Jens Georg <jensg openismus com>
Date: Fri Apr 12 11:35:24 2013 +0200
server: Make it possbile to remove a container
src/librygel-server/rygel-item-destroyer.vala | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/librygel-server/rygel-item-destroyer.vala b/src/librygel-server/rygel-item-destroyer.vala
index 90203cb..3c960a6 100644
--- a/src/librygel-server/rygel-item-destroyer.vala
+++ b/src/librygel-server/rygel-item-destroyer.vala
@@ -75,9 +75,9 @@ internal class Rygel.ItemDestroyer: GLib.Object, Rygel.StateMachine {
private async void remove_object () throws Error {
var media_object = yield this.fetch_object ();
+ var parent = media_object.parent as WritableContainer;
if (media_object is MediaItem ) {
- var parent = media_object.parent as WritableContainer;
yield parent.remove_item (this.object_id, this.cancellable);
if (!(media_object as MediaItem).place_holder) {
@@ -88,6 +88,8 @@ internal class Rygel.ItemDestroyer: GLib.Object, Rygel.StateMachine {
}
}
}
+ } else {
+ yield parent.remove_container (this.object_id, this.cancellable);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]