[Xfce4-commits] <parole:master> Fix OpenUri to append the track to the playlist and play
Sean Davis
noreply at xfce.org
Thu Dec 12 00:18:36 CET 2013
Updating branch refs/heads/master
to 20f5473559b4c560985a211c1741ec9bc4e97fdf (commit)
from d42144f794328c30c1662a40f950a10bd5e9446e (commit)
commit 20f5473559b4c560985a211c1741ec9bc4e97fdf
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Dec 8 17:21:33 2013 -0500
Fix OpenUri to append the track to the playlist and play
src/parole-medialist.c | 16 +++++++++++-----
src/parole-medialist.h | 3 +++
src/parole-plugin-player.c | 9 +++++----
3 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/src/parole-medialist.c b/src/parole-medialist.c
index 7cd1653..0501e29 100644
--- a/src/parole-medialist.c
+++ b/src/parole-medialist.c
@@ -437,23 +437,29 @@ parole_media_list_files_opened_cb (ParoleMediaChooser *chooser,
parole_media_list_files_open (list, files, FALSE, play);
}
-static void
-parole_media_list_location_opened_cb (ParoleOpenLocation *obj, const gchar *location, ParoleMediaList *list)
+void
+parole_media_list_open_uri (ParoleMediaList *list, const gchar *uri)
{
ParoleFile *file;
- if ( parole_is_uri_disc (location) )
+ if ( parole_is_uri_disc (uri) )
{
- g_signal_emit (G_OBJECT (list), signals [URI_OPENED], 0, location);
+ g_signal_emit (G_OBJECT (list), signals [URI_OPENED], 0, uri);
}
else
{
- file = parole_file_new (location);
+ file = parole_file_new (uri);
parole_media_list_add (list, file, FALSE, TRUE, TRUE);
}
}
static void
+parole_media_list_location_opened_cb (ParoleOpenLocation *obj, const gchar *location, ParoleMediaList *list)
+{
+ parole_media_list_open_uri(list, location);
+}
+
+static void
parole_media_list_iso_opened_cb (ParoleMediaChooser *chooser,
gchar *filename,
ParoleMediaList *list)
diff --git a/src/parole-medialist.h b/src/parole-medialist.h
index 649d4f6..548b986 100644
--- a/src/parole-medialist.h
+++ b/src/parole-medialist.h
@@ -156,6 +156,9 @@ void parole_media_list_open (ParoleMediaList *list);
void parole_media_list_open_location (ParoleMediaList *list);
+void parole_media_list_open_uri (ParoleMediaList *list,
+ const gchar *uri);
+
gboolean parole_media_list_add_files (ParoleMediaList *list,
gchar **filenames,
gboolean enqueue);
diff --git a/src/parole-plugin-player.c b/src/parole-plugin-player.c
index ba5634f..3f22619 100644
--- a/src/parole-plugin-player.c
+++ b/src/parole-plugin-player.c
@@ -125,11 +125,12 @@ parole_plugin_player_get_stream (ParoleProviderPlayer *provider)
static gboolean
parole_plugin_player_play_uri (ParoleProviderPlayer *provider, const gchar *uri)
{
- ParolePluginPlayer *player;
-
- player = PAROLE_PLUGIN_PLAYER (provider);
+ ParoleMediaList *list;
+
+ list = PAROLE_MEDIA_LIST (parole_media_list_get ());
+ parole_media_list_open_uri (list, uri);
- parole_gst_play_uri (PAROLE_GST (player->priv->gst), uri, NULL);
+ g_object_unref (list);
return TRUE;
}
More information about the Xfce4-commits
mailing list