[rhythmbox] audiocd: set the track number as well as the device



commit c4931555a29b102d4cba6dcb02123fd50ced9a8d
Author: Jonathan Matthew <jonathan d14n org>
Date:   Fri Sep 18 08:58:13 2009 +1000

    audiocd: set the track number as well as the device
    
    This is a temporary workaround for problems caused by changes to the
    cdda:// URI format in gst-plugins-base 0.10.25.  We'll switch to the new
    cdda://device#track format soon.

 plugins/audiocd/rb-audiocd-plugin.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/audiocd/rb-audiocd-plugin.c b/plugins/audiocd/rb-audiocd-plugin.c
index 14f60f2..4366745 100644
--- a/plugins/audiocd/rb-audiocd-plugin.c
+++ b/plugins/audiocd/rb-audiocd-plugin.c
@@ -135,8 +135,11 @@ set_source_properties (GstElement *source, const char *uri, gboolean playback_mo
 
 	device = g_utf8_strrchr (uri, -1, '#');
 	if (device != NULL) {
+		int track;
+
 		device++;	/* skip the # */
-		g_object_set (source, "device", device, NULL);
+		track = strtoul (uri + 7, NULL, 0);
+		g_object_set (source, "device", device, "track", track, NULL);
 
 		if (playback_mode) {
 			/* disable paranoia (if using cdparanoiasrc) and set read speed to 1 */



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