rhythmbox r5837 - in trunk: . remote/dbus



Author: jmatthew
Date: Tue Aug  5 11:18:22 2008
New Revision: 5837
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5837&view=rev

Log:
2008-08-05  Jonathan Matthew  <jonathan d14n org>

	patch by:  Raul Soriano  <GatoLoko gmail com>

	* remote/dbus/rb-client.c: (parse_pattern):
	Add '%tb' substitution parameter, giving the track bitrate.
	Fixes #545930.


Modified:
   trunk/ChangeLog
   trunk/remote/dbus/rb-client.c

Modified: trunk/remote/dbus/rb-client.c
==============================================================================
--- trunk/remote/dbus/rb-client.c	(original)
+++ trunk/remote/dbus/rb-client.c	Tue Aug  5 11:18:22 2008
@@ -170,6 +170,7 @@
  * %tS -- track artist sortname (lowercase)
  * %td -- track duration
  * %te -- track elapsed time
+ * %tb -- track bitrate
  * %st -- stream title
  */
 static char *
@@ -327,6 +328,13 @@
 				/* Track elapsed time */
 				string = rb_make_duration_string (elapsed);
 				break;
+			case 'b':
+				/* Track bitrate */
+				value = g_hash_table_lookup (properties, "bitrate");
+				if (value)
+					string = g_strdup_printf ("%u", g_value_get_uint (value));
+				break;
+
 			default:
 				string = g_strdup_printf ("%%t%c", *p);
  			}



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