~cairo-dock-team/cairo-dock-plug-ins/plug-ins

« back to all changes in this revision

Viewing changes to musicPlayer/src/applet-mpris2.c

  • Committer: Matthieu Baerts
  • Date: 2012-09-17 21:53:59 UTC
  • Revision ID: matttbe@gmail.com-20120917215359-1u8oudmnxxwu8ov9
musicPlayer: mpris2: some players doesn't support (well) the trackid (Audacious or Pithos)
 Even if this is not our problem, it can be interesting to also check if the title has changed in order to update the icon with the new info

Show diffs side-by-side

added added

removed removed

Lines of Context:
330
330
                        myData.cAlbum = g_strdup (str);
331
331
        }
332
332
        cd_message ("  cAlbum <- %s", myData.cAlbum);
333
 
        
334
 
        g_free (myData.cTitle);
 
333
 
 
334
        gchar *cOldTitle = myData.cTitle;
335
335
        myData.cTitle = NULL;
336
336
        v = (GValue *) g_hash_table_lookup(pMetadata, "xesam:title");
337
337
        if (v != NULL && G_VALUE_HOLDS_STRING(v))
341
341
                        myData.cTitle = g_strdup (str);
342
342
        }
343
343
        cd_message ("  cTitle <- %s", myData.cTitle);
 
344
 
 
345
        /* some players doesn't support (well) the trackid. Even if this is not our
 
346
         * problem, it can be interesting to also check if the title has changed.
 
347
         */
 
348
        if (! bTrackHasChanged && cairo_dock_strings_differ (myData.cTitle, cOldTitle))
 
349
                bTrackHasChanged = TRUE;
 
350
        g_free (cOldTitle);
344
351
        
345
352
        g_free (myData.cPlayingUri);
346
353
        myData.cPlayingUri = NULL;