218
218
static void cd_banshee_getCoverPath (void)
220
cd_debug ("%s ()\n", __func__);
220
cd_debug ("MP - %s ()\n", __func__);
221
221
GHashTable *data_list = NULL;
223
223
GError *erreur = NULL;
238
238
value = (GValue *) g_hash_table_lookup(data_list, "artwork-id");
239
239
if (value != NULL && G_VALUE_HOLDS_STRING(value))
240
240
cString = g_value_get_string(value);
241
cd_debug (" => got cover path from Banshee : '%s'\n", cString);
241
cd_debug ("MP - => got cover path from Banshee : '%s'\n", cString);
242
242
gchar *cCoverPath = g_strdup_printf ("%s/.cache/album-art/300/%s.jpg", g_getenv ("HOME"), cString);
243
243
if (! g_file_test (cCoverPath, G_FILE_TEST_EXISTS))
245
245
g_free (cCoverPath);
246
246
cCoverPath = g_strdup_printf ("%s/.cache/album-art/%s.jpg", g_getenv ("HOME"), cString);
247
if (! g_file_test (cCoverPath, G_FILE_TEST_EXISTS)) // path has changed :-/
247
if (! g_file_test (cCoverPath, G_FILE_TEST_EXISTS)) // path has changed :-/
250
cCoverPath = g_strdup_printf ("%s/.cache/media-art/300/%s.jpg", g_getenv ("HOME"), cString);
251
if (! g_file_test (cCoverPath, G_FILE_TEST_EXISTS))
249
253
g_free (cCoverPath);
250
cCoverPath = g_strdup_printf ("%s/.cache/media-art/300/%s.jpg", g_getenv ("HOME"), cString);
251
if (! g_file_test (cCoverPath, G_FILE_TEST_EXISTS))
254
cCoverPath = g_strdup_printf ("%s/.cache/media-art/%s.jpg", g_getenv ("HOME"), cString);
254
cCoverPath = g_strdup_printf ("%s/.cache/media-art/%s.jpg", g_getenv ("HOME"), cString);
258
258
cd_musicplayer_get_cover_path (cString, TRUE); // TRUE <=> on cherche nous-meme si aucune fournie.
259
259
g_free (cCoverPath);
273
273
cd_banshee_getSongInfos ();
274
274
else if (strcmp (cMessage, "trackinfoupdated") == 0)
276
cd_debug (" trackinfoupdated\n");
276
cd_debug ("MP - trackinfoupdated\n");
277
277
if (myData.cCoverPath == NULL)
279
cd_debug (" aucune pochette, on regarde si Banshee a mieux a nous proposer\n");
279
cd_debug ("MP - aucune pochette, on regarde si Banshee a mieux a nous proposer\n");
280
280
cd_banshee_getCoverPath ();
282
282
else if (!myData.cover_exist) // le lecteur nous avait deja refile l'adresse en avance, on regarde si le fichier est desormais present.
284
284
cd_musiplayer_set_cover_if_present (FALSE);
285
285
CD_APPLET_LEAVE ();
324
325
gpointer invocation_hint,
325
326
gpointer marshal_data)
327
cd_debug ("%s ()\n", __func__);
328
cd_debug ("MP - %s ()\n", __func__);
328
329
const GValue *value;
329
330
const gchar *cEvent = NULL;
330
331
const gchar *cMessage = NULL;
331
double fBufferingPercent;
332
double fBufferingPercent=0.;
333
334
value = ¶m_values[0];
334
335
if (value != NULL && G_VALUE_HOLDS_STRING (value))
454
455
case PLAYER_SHUFFLE :
456
457
gboolean bShuffle = cairo_dock_dbus_get_integer (myData.dbus_proxy_shell, "GetShuffleMode");
457
cd_debug ("bShuffle : %d\n", bShuffle);
458
cd_debug ("MP - bShuffle : %d\n", bShuffle);
458
459
dbus_g_proxy_call_no_reply (myData.dbus_proxy_shell, "SetShuffleMode",
459
460
G_TYPE_INT, ! bShuffle,
465
466
case PLAYER_REPEAT :
467
468
int iRepeat = cairo_dock_dbus_get_integer (myData.dbus_proxy_shell, "GetRepeatMode");
468
cd_debug ("iRepeat : %d\n", iRepeat);
469
cd_debug ("MP - iRepeat : %d\n", iRepeat);
469
470
dbus_g_proxy_call_no_reply (myData.dbus_proxy_shell, "SetRepeatMode",
470
471
G_TYPE_INT, (iRepeat+1)%3,
498
499
myData.iCurrentTime = 0;
499
500
if (myData.iPlayingStatus == PLAYER_STOPPED && myData.pPreviousPlayingStatus != PLAYER_STOPPED) /// utile ?...
501
cd_debug ("LECTEUR STOPPE\n");
502
cd_debug ("MP - LECTEUR STOPPE\n");
502
503
myData.pPreviousPlayingStatus = PLAYER_STOPPED;
503
504
//cd_musicplayer_dbus_detect_player (); // ca fait redemarrer le lecteur ?!
504
505
//if (! myData.bIsRunning)
534
535
cd_musicplayer_dbus_detect_player (); // on teste la presence de BA sur le bus <=> s'il est ouvert ou pas.
535
536
if(myData.bIsRunning) // player en cours d'execution, on recupere son etat.
537
cd_debug ("MP : BA is running\n");
538
cd_message ("MP : BA is running\n");
538
539
_banshee_getPlaying();
539
540
cd_banshee_getSongInfos ();
540
541
cd_musicplayer_update_icon (TRUE);