[pidgin-musictracker] r463 committed - Ensure stale data from MRPIS player is not reported when track...

2 views
Skip to first unread message

pidgin-mu...@googlecode.com

unread,
Jul 21, 2010, 4:00:29 PM7/21/10
to pidgin-musict...@googlegroups.com
Revision: 463
Author: jon.t...@dronecode.org.uk
Date: Wed Jul 21 12:59:44 2010
Log: Ensure stale data from MRPIS player is not reported when track
metadata hashtable is missing one of the keys we look for

(issue 215)


http://code.google.com/p/pidgin-musictracker/source/detail?r=463

Modified:
/trunk/src/mpris.c

=======================================
--- /trunk/src/mpris.c Wed Mar 3 08:29:57 2010
+++ /trunk/src/mpris.c Wed Jul 21 12:59:44 2010
@@ -91,6 +91,12 @@
{
GValue *value;

+ // clear any previous data in case some keys are absent
+ g_strlcpy(ti->artist, "", STRLEN);
+ g_strlcpy(ti->album, "", STRLEN);
+ g_strlcpy(ti->track, "", STRLEN);
+ ti->totalSecs = 0;
+
/* fetch values from hash table */
value = (GValue *) g_hash_table_lookup(table, "artist");
if (value != NULL && G_VALUE_HOLDS_STRING(value)) {

Reply all
Reply to author
Forward
0 new messages