Mercurial > audlegacy-plugins
comparison src/scrobbler/plugin.c @ 1687:d158ce84fda7
Modified for Tuplez/plugin API changes.
| author | Matti Hamalainen <ccr@tnsp.org> |
|---|---|
| date | Wed, 05 Sep 2007 09:29:26 +0300 |
| parents | f4d8082668c1 |
| children | 62e89e392227 |
comparison
equal
deleted
inserted
replaced
| 1600:49fe2225d236 | 1687:d158ce84fda7 |
|---|---|
| 241 tuple = playlist_get_tuple(playlist, playlist_get_position(playlist)); | 241 tuple = playlist_get_tuple(playlist, playlist_get_position(playlist)); |
| 242 | 242 |
| 243 if (tuple == NULL) | 243 if (tuple == NULL) |
| 244 continue; | 244 continue; |
| 245 | 245 |
| 246 if (ishttp(tuple_get_string(tuple, "file-name"))) | 246 if (ishttp(tuple_get_string(tuple, FIELD_FILE_NAME, NULL))) |
| 247 continue; | 247 continue; |
| 248 | 248 |
| 249 if(tuple_get_string(tuple, "artist") != NULL && tuple_get_string(tuple, "title") != NULL) | 249 if (tuple_get_string(tuple, FIELD_ARTIST, NULL) != NULL && |
| 250 tuple_get_string(tuple, FIELD_TITLE, NULL) != NULL) | |
| 250 { | 251 { |
| 251 pdebug(fmt_vastr( | 252 pdebug(fmt_vastr( |
| 252 "submitting artist: %s, title: %s", | 253 "submitting artist: %s, title: %s", |
| 253 tuple_get_string(tuple, "artist"), tuple_get_string(tuple, "title")), DEBUG); | 254 tuple_get_string(tuple, FIELD_ARTIST, NULL), |
| 254 sc_addentry(m_scrobbler, tuple, tuple_get_int(tuple, "length") / 1000); | 255 tuple_get_string(tuple, FIELD_TITLE, NULL)), DEBUG); |
| 255 gerpok_sc_addentry(m_scrobbler, tuple, tuple_get_int(tuple, "length") / 1000); | 256 |
| 257 sc_addentry(m_scrobbler, tuple, tuple_get_int(tuple, FIELD_LENGTH, NULL) / 1000); | |
| 258 gerpok_sc_addentry(m_scrobbler, tuple, tuple_get_int(tuple, FIELD_LENGTH, NULL) / 1000); | |
| 256 } | 259 } |
| 257 else | 260 else |
| 258 pdebug("tuple does not contain an artist or a title, not submitting.", DEBUG); | 261 pdebug("tuple does not contain an artist or a title, not submitting.", DEBUG); |
| 259 | 262 |
| 260 submit = FALSE; | 263 submit = FALSE; |
