[rygel] core: Apply Xbox hacks on search results as well
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Apply Xbox hacks on search results as well
- Date: Thu, 1 Apr 2010 22:55:09 +0000 (UTC)
commit 275b2820065fa06fbd747e266c3c48e1617eddf8
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Mar 24 03:15:37 2010 +0200
core: Apply Xbox hacks on search results as well
src/rygel/rygel-search.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/rygel/rygel-search.vala b/src/rygel/rygel-search.vala
index 4c6c366..9ef99fd 100644
--- a/src/rygel/rygel-search.vala
+++ b/src/rygel/rygel-search.vala
@@ -46,6 +46,7 @@ internal class Rygel.Search: GLib.Object, Rygel.StateMachine {
private uint32 system_update_id;
private ServiceAction action;
private Rygel.DIDLLiteWriter didl_writer;
+ private XBoxHacks xbox_hacks;
public Cancellable cancellable { get; set; }
@@ -58,6 +59,10 @@ internal class Rygel.Search: GLib.Object, Rygel.StateMachine {
this.didl_writer =
new Rygel.DIDLLiteWriter (content_dir.http_server);
+
+ try {
+ this.xbox_hacks = new XBoxHacks (action.get_message ());
+ } catch { /* This just means we are not dealing with Xbox, yay! */ }
}
public async void run () {
@@ -107,6 +112,10 @@ internal class Rygel.Search: GLib.Object, Rygel.StateMachine {
// Serialize results
foreach (var result in results) {
+ if (result is MediaItem && this.xbox_hacks != null) {
+ this.xbox_hacks.apply (result as MediaItem);
+ }
+
this.didl_writer.serialize (result);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]