[totem/gnome-3-6] grilo: Add sanity check before resolving URLs



commit 9bf4e239a613bb8d4dce8792c48221c14230f0af
Author: Marco Piazza <mpiazza gmail com>
Date:   Fri Oct 12 16:05:14 2012 +0200

    grilo: Add sanity check before resolving URLs
    
    Make sure that we only try to resolve a URL when the source supports
    it, otherwise fallback to the media itself, or a simple warning.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686003

 src/plugins/grilo/totem-grilo.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/grilo/totem-grilo.c b/src/plugins/grilo/totem-grilo.c
index 2fca321..753a98b 100644
--- a/src/plugins/grilo/totem-grilo.c
+++ b/src/plugins/grilo/totem-grilo.c
@@ -570,7 +570,8 @@ play (TotemGriloPlugin *self,
 	}
 
 	/* If url is a slow key, then we need to full resolve it */
-	if (resolve_url) {
+	if (resolve_url &&
+	    grl_source_supported_operations (source) & GRL_OP_RESOLVE) {
 		const GList *slow_keys;
 		GList *url_keys;
 		slow_keys = grl_source_slow_keys (source);
@@ -580,6 +581,10 @@ play (TotemGriloPlugin *self,
 			g_list_free (url_keys);
 			return;
 		}
+	} else if (resolve_url) {
+		/* If source does not support resolve() operation, then use the current media */
+		resolve_url_cb (source, 0, media, NULL, NULL);
+		return;
 	}
 
 	g_warning ("Current element has no URL to play");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]