Lines 1458-1463
void audioscrobbler_encoded_entry_free (AudioscrobblerEncodedEntry *entry)
Link Here
|
1458 |
|
1458 |
|
1459 |
|
1459 |
|
1460 |
/* Queue functions: */ |
1460 |
/* Queue functions: */ |
|
|
1461 |
static char *rb_uri_decode (const char *uri) |
1462 |
{ |
1463 |
#if defined(HAVE_LIBSOUP_2_4) |
1464 |
return soup_uri_decode (uri); |
1465 |
#else |
1466 |
char *result; |
1467 |
result = g_strdup (uri); |
1468 |
soup_uri_decode (result); |
1469 |
return result; |
1470 |
#endif |
1471 |
} |
1461 |
|
1472 |
|
1462 |
static AudioscrobblerEntry* |
1473 |
static AudioscrobblerEntry* |
1463 |
rb_audioscrobbler_load_entry_from_string (const char *string) |
1474 |
rb_audioscrobbler_load_entry_from_string (const char *string) |
Lines 1477-1499
rb_audioscrobbler_load_entry_from_string (const char *string)
Link Here
|
1477 |
if (breaks2[0] != NULL && breaks2[1] != NULL) { |
1488 |
if (breaks2[0] != NULL && breaks2[1] != NULL) { |
1478 |
if (g_str_has_prefix (breaks2[0], "a")) { |
1489 |
if (g_str_has_prefix (breaks2[0], "a")) { |
1479 |
g_free (entry->artist); |
1490 |
g_free (entry->artist); |
1480 |
entry->artist = g_strdup (breaks2[1]); |
1491 |
entry->artist = rb_uri_decode (breaks2[1]); |
1481 |
soup_uri_decode (entry->artist); |
|
|
1482 |
} |
1492 |
} |
1483 |
if (g_str_has_prefix (breaks2[0], "t")) { |
1493 |
if (g_str_has_prefix (breaks2[0], "t")) { |
1484 |
g_free (entry->title); |
1494 |
g_free (entry->title); |
1485 |
entry->title = g_strdup (breaks2[1]); |
1495 |
entry->title = rb_uri_decode (breaks2[1]); |
1486 |
soup_uri_decode (entry->title); |
|
|
1487 |
} |
1496 |
} |
1488 |
if (g_str_has_prefix (breaks2[0], "b")) { |
1497 |
if (g_str_has_prefix (breaks2[0], "b")) { |
1489 |
g_free (entry->album); |
1498 |
g_free (entry->album); |
1490 |
entry->album = g_strdup (breaks2[1]); |
1499 |
entry->album = rb_uri_decode (breaks2[1]); |
1491 |
soup_uri_decode (entry->album); |
|
|
1492 |
} |
1500 |
} |
1493 |
if (g_str_has_prefix (breaks2[0], "m")) { |
1501 |
if (g_str_has_prefix (breaks2[0], "m")) { |
1494 |
g_free (entry->mbid); |
1502 |
g_free (entry->mbid); |
1495 |
entry->mbid = g_strdup (breaks2[1]); |
1503 |
entry->mbid = rb_uri_decode (breaks2[1]); |
1496 |
soup_uri_decode (entry->mbid); |
|
|
1497 |
} |
1504 |
} |
1498 |
if (g_str_has_prefix (breaks2[0], "l")) { |
1505 |
if (g_str_has_prefix (breaks2[0], "l")) { |
1499 |
entry->length = atoi (breaks2[1]); |
1506 |
entry->length = atoi (breaks2[1]); |