rhythmbox r5598 - in trunk: . shell



Author: jmatthew
Date: Sat Feb 23 14:55:12 2008
New Revision: 5598
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5598&view=rev

Log:
2008-02-24  Jonathan Matthew  <jonathan d14n org>

	* shell/rb-shell-player.c: (rb_shell_player_open_location):
	When switching to a new entry, always clear out the playlist URL
	queue, and create a new one if appropriate.  From #490122.


Modified:
   trunk/ChangeLog
   trunk/shell/rb-shell-player.c

Modified: trunk/shell/rb-shell-player.c
==============================================================================
--- trunk/shell/rb-shell-player.c	(original)
+++ trunk/shell/rb-shell-player.c	Sat Feb 23 14:55:12 2008
@@ -1383,6 +1383,18 @@
 	gboolean was_playing;
 	gboolean ret = TRUE;
 
+	/* dispose of any existing playlist urls */
+	if (player->priv->playlist_urls) {
+		g_queue_foreach (player->priv->playlist_urls,
+				 (GFunc) g_free,
+				 NULL);
+		g_queue_free (player->priv->playlist_urls);
+		player->priv->playlist_urls = NULL;
+	}
+	if (rb_source_try_playlist (player->priv->source)) {
+		player->priv->playlist_urls = g_queue_new ();
+	}
+
 	location = rhythmdb_entry_get_playback_uri (entry);
 	if (location == NULL) {
 		return FALSE;
@@ -1398,16 +1410,6 @@
 		data->play_type = play_type;
 		data->entry = entry;
 
-		/* dispose of any existing playlist urls */
-		if (player->priv->playlist_urls) {
-			g_queue_foreach (player->priv->playlist_urls,
-					 (GFunc) g_free,
-					 NULL);
-			g_queue_free (player->priv->playlist_urls);
-			player->priv->playlist_urls = NULL;
-		}
-		player->priv->playlist_urls = g_queue_new ();
-
 		/* add http:// as a prefix, if it doesn't have a URI scheme */
 		if (strstr (location, "://"))
 			data->location = g_strdup (location);



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