Mercurial > audlegacy-plugins
diff src/scrobbler/plugin.c @ 1443:f4d8082668c1
scrobbler: tuple API update
| author | William Pitcock <nenolod@atheme-project.org> |
|---|---|
| date | Fri, 10 Aug 2007 10:03:10 -0500 |
| parents | 761e17b23e0c |
| children | 16044c4a34d7 d158ce84fda7 |
line wrap: on
line diff
--- a/src/scrobbler/plugin.c Fri Aug 10 09:49:37 2007 -0500 +++ b/src/scrobbler/plugin.c Fri Aug 10 10:03:10 2007 -0500 @@ -215,7 +215,7 @@ int run = 1; while (run) { - TitleInput *tuple; + Tuple *tuple; GTimeVal sleeptime; /* Error catching */ @@ -243,16 +243,16 @@ if (tuple == NULL) continue; - if (ishttp(tuple->file_name)) + if (ishttp(tuple_get_string(tuple, "file-name"))) continue; - if(tuple->performer != NULL && tuple->track_name != NULL) + if(tuple_get_string(tuple, "artist") != NULL && tuple_get_string(tuple, "title") != NULL) { pdebug(fmt_vastr( "submitting artist: %s, title: %s", - tuple->performer, tuple->track_name), DEBUG); - sc_addentry(m_scrobbler, tuple, tuple->length / 1000); - gerpok_sc_addentry(m_scrobbler, tuple, tuple->length / 1000); + tuple_get_string(tuple, "artist"), tuple_get_string(tuple, "title")), DEBUG); + sc_addentry(m_scrobbler, tuple, tuple_get_int(tuple, "length") / 1000); + gerpok_sc_addentry(m_scrobbler, tuple, tuple_get_int(tuple, "length") / 1000); } else pdebug("tuple does not contain an artist or a title, not submitting.", DEBUG);
