0002-Created-a-local-copy-of-playlist-entry-tuples-before.patch
| src/scrobbler/plugin.c | ||
|---|---|---|
| 69 | 69 | |
| 70 | 70 |
if (submit_tuple) |
| 71 | 71 |
tuple_unref (submit_tuple); |
| 72 |
submit_tuple = aud_playlist_entry_get_tuple (playlist, pos, FALSE); |
|
| 73 |
if (! submit_tuple) |
|
| 74 |
return; |
|
| 72 |
{
|
|
| 73 |
Tuple *temp_tuple = aud_playlist_entry_get_tuple (playlist, pos, FALSE); |
|
| 74 |
if (! temp_tuple) |
|
| 75 |
return; |
|
| 76 |
submit_tuple = tuple_copy (temp_tuple); |
|
| 77 |
tuple_unref (temp_tuple); |
|
| 78 |
} |
|
| 75 | 79 | |
| 76 | 80 |
if (is_http_source) |
| 77 | 81 |
{
|
| src/scrobbler/scrobbler.c | ||
|---|---|---|
| 305 | 305 |
gint playlist = aud_playlist_get_playing(); |
| 306 | 306 |
gint pos = aud_playlist_get_position(playlist); |
| 307 | 307 | |
| 308 |
Tuple *submit_tuple = aud_playlist_entry_get_tuple (playlist, pos, FALSE); |
|
| 309 |
if (! submit_tuple) |
|
| 310 |
return TRUE; |
|
| 308 |
Tuple *submit_tuple = NULL; |
|
| 309 |
{
|
|
| 310 |
Tuple *temp_tuple = aud_playlist_entry_get_tuple (playlist, pos, FALSE); |
|
| 311 |
if (! temp_tuple) |
|
| 312 |
return TRUE; |
|
| 313 |
submit_tuple = tuple_copy (temp_tuple); |
|
| 314 |
tuple_unref (temp_tuple); |
|
| 315 |
} |
|
| 311 | 316 |
|
| 312 | 317 |
item_t* current_item = create_item(submit_tuple, tuple_get_int(submit_tuple, FIELD_LENGTH, NULL) / 1000); |
| 313 | 318 |
if (! current_item) |
| ... | ... | |
| 344 | 349 |
{
|
| 345 | 350 |
q_item_free(current_item); |
| 346 | 351 | |
| 347 |
AUDDBG("mue_test: timeplayed: %d, len: %d\n", np_item->timeplayed, np_item->len);
|
|
| 348 | ||
| 349 | 352 |
if (np_item->timeplayed > np_item->len) |
| 350 | 353 |
{
|
| 351 |
AUDDBG("mue_test: entered!\n");
|
|
| 352 | ||
| 353 | 354 |
/* Make sure that the track stays on now playing. */ |
| 354 | 355 |
tuple_set_int(submit_tuple, FIELD_LENGTH, NULL, np_item->len * 1000); |
| 355 | 356 |
sc_submit_np(submit_tuple); |
| 356 |
- |
|
