Mercurial > audlegacy-plugins
diff src/adplug/adplug-xmms.cc @ 1687:d158ce84fda7
Modified for Tuplez/plugin API changes.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 05 Sep 2007 09:29:26 +0300 |
parents | 16b2bc9b9763 |
children | 62e89e392227 |
line wrap: on
line diff
--- a/src/adplug/adplug-xmms.cc Wed Sep 05 07:38:21 2007 +0300 +++ b/src/adplug/adplug-xmms.cc Wed Sep 05 09:29:26 2007 +0300 @@ -694,16 +694,16 @@ { Tuple *ti = tuple_new_from_filename(filename); if (! p->getauthor().empty()) - tuple_associate_string(ti, "artist", p->getauthor().c_str()); + tuple_associate_string(ti, FIELD_ARTIST, NULL, p->getauthor().c_str()); if (! p->gettitle().empty()) - tuple_associate_string(ti, "title", p->gettitle().c_str()); + tuple_associate_string(ti, FIELD_TITLE, NULL, p->gettitle().c_str()); else if (! p->getdesc().empty()) - tuple_associate_string(ti, "title", p->getdesc().c_str()); + tuple_associate_string(ti, FIELD_TITLE, NULL, p->getdesc().c_str()); else - tuple_associate_string(ti, "title", g_path_get_basename(filename)); - tuple_associate_string(ti, "codec", p->gettype().c_str()); - tuple_associate_string(ti, "quality", "sequenced"); - tuple_associate_int(ti, "length", p->songlength (plr.subsong)); + tuple_associate_string(ti, FIELD_TITLE, NULL, g_path_get_basename(filename)); + tuple_associate_string(ti, FIELD_CODEC, NULL, p->gettype().c_str()); + tuple_associate_string(ti, FIELD_QUALITY, NULL, "sequenced"); + tuple_associate_int(ti, FIELD_LENGTH, NULL, p->songlength (plr.subsong)); delete p; return ti; } @@ -715,7 +715,7 @@ { char* result = tuple_formatter_make_title_string(ti, get_gentitle_format()); if ( result ) - *length = tuple_get_int(ti, "length"); + *length = tuple_get_int(ti, FIELD_LENGTH, NULL); tuple_free((void *) ti); return result;