--- src/conky.c 2009-04-30 07:01:53.000000000 +0200 +++ src/conky.c 2009-04-30 07:17:05.000000000 +0200 @@ -765,6 +765,52 @@ info.xmms2.album = 0; } break; + /* BEGIN ashtophet's edition */ + + case OBJ_xmms2_performer: + if (info.xmms2.performer) { + free(info.xmms2.performer); + info.xmms2.performer = 0; + } + break; + + case OBJ_xmms2_conductor: + if (info.xmms2.conductor) { + free(info.xmms2.conductor); + info.xmms2.conductor = 0; + } + break; + + case OBJ_xmms2_composer: + if (info.xmms2.composer) { + free(info.xmms2.composer); + info.xmms2.composer = 0; + } + break; + + case OBJ_xmms2_opus: + if (info.xmms2.opus) { + free(info.xmms2.opus); + info.xmms2.opus = 0; + } + break; + + case OBJ_xmms2_part: + if (info.xmms2.part) { + free(info.xmms2.part); + info.xmms2.part = 0; + } + break; + + case OBJ_xmms2_originaldate: + if (info.xmms2.originaldate) { + free(info.xmms2.originaldate); + info.xmms2.originaldate = 0; + } + break; + + /* END ashtophet's edition */ + case OBJ_xmms2_title: if (info.xmms2.title) { free(info.xmms2.title); @@ -2399,6 +2445,14 @@ #ifdef XMMS2 END OBJ(xmms2_artist, INFO_XMMS2) END OBJ(xmms2_album, INFO_XMMS2) + /* BEGIN ashtophet's edition */ + END OBJ(xmms2_performer, INFO_XMMS2) + END OBJ(xmms2_conductor, INFO_XMMS2) + END OBJ(xmms2_composer, INFO_XMMS2) + END OBJ(xmms2_opus, INFO_XMMS2) + END OBJ(xmms2_part, INFO_XMMS2) + END OBJ(xmms2_originaldate, INFO_XMMS2) + /* END ashtophet's edition */ END OBJ(xmms2_title, INFO_XMMS2) END OBJ(xmms2_genre, INFO_XMMS2) END OBJ(xmms2_comment, INFO_XMMS2) @@ -4490,6 +4544,28 @@ OBJ(xmms2_album) { snprintf(p, p_max_size, "%s", cur->xmms2.album); } + + /* BEGIN ashtophet's edition */ + OBJ(xmms2_performer) { + snprintf(p, p_max_size, "%s", cur->xmms2.performer); + } + OBJ(xmms2_conductor) { + snprintf(p, p_max_size, "%s", cur->xmms2.conductor); + } + OBJ(xmms2_composer) { + snprintf(p, p_max_size, "%s", cur->xmms2.composer); + } + OBJ(xmms2_opus) { + snprintf(p, p_max_size, "%s", cur->xmms2.opus); + } + OBJ(xmms2_part) { + snprintf(p, p_max_size, "%s", cur->xmms2.part); + } + OBJ(xmms2_originaldate) { + snprintf(p, p_max_size, "%s", cur->xmms2.originaldate); + } + /* END ashtophet's edition */ + OBJ(xmms2_title) { snprintf(p, p_max_size, "%s", cur->xmms2.title); } @@ -6454,6 +6530,14 @@ #ifdef XMMS2 info.xmms2.artist = NULL; info.xmms2.album = NULL; + /* BEGIN ashtophet's edition */ + info.xmms2.performer = NULL; + info.xmms2.conductor = NULL; + info.xmms2.composer = NULL; + info.xmms2.opus = NULL; + info.xmms2.part = NULL; + info.xmms2.originaldate = NULL; + /* END ashtophet's edition */ info.xmms2.title = NULL; info.xmms2.genre = NULL; info.xmms2.comment = NULL; --- src/xmms2.c 2009-04-30 07:01:53.000000000 +0200 +++ src/xmms2.c 2009-04-30 07:31:05.000000000 +0200 @@ -45,6 +45,34 @@ ptr->xmms2.album = malloc(text_buffer_size); } + /* BEGIN added by ashtophet */ + + if (ptr->xmms2.performer == NULL) { + ptr->xmms2.performer = malloc(text_buffer_size); + } + + if (ptr->xmms2.conductor == NULL) { + ptr->xmms2.conductor = malloc(text_buffer_size); + } + + if (ptr->xmms2.composer == NULL) { + ptr->xmms2.composer = malloc(text_buffer_size); + } + + if (ptr->xmms2.opus == NULL) { + ptr->xmms2.opus = malloc(text_buffer_size); + } + + if (ptr->xmms2.part == NULL) { + ptr->xmms2.part = malloc(text_buffer_size); + } + + if (ptr->xmms2.originaldate == NULL) { + ptr->xmms2.originaldate = malloc(text_buffer_size); + } + + /* END ashtophet's crappy edition */ + if (ptr->xmms2.title == NULL) { ptr->xmms2.title = malloc(text_buffer_size); } @@ -67,6 +95,14 @@ ptr->xmms2.artist[0] = '\0'; ptr->xmms2.album[0] = '\0'; + /* BEGIN ashtophet's edition */ + ptr->xmms2.performer[0] = '\0'; + ptr->xmms2.conductor[0] = '\0'; + ptr->xmms2.composer[0] = '\0'; + ptr->xmms2.opus[0] = '\0'; + ptr->xmms2.part[0] = '\0'; + ptr->xmms2.originaldate[0] = '\0'; + /* END ashtophet's edition */ ptr->xmms2.title[0] = '\0'; ptr->xmms2.genre[0] = '\0'; ptr->xmms2.comment[0] = '\0'; @@ -140,6 +176,29 @@ if (xmmsv_dict_get(infos, "album", &dict_entry) && xmmsv_get_string(dict_entry, &charval)) strncpy(ptr->xmms2.album, charval, text_buffer_size - 1); + + /* BEGIN ashtophet's edition */ + + if (xmmsv_dict_get(infos, "performer", &dict_entry) && xmmsv_get_string(dict_entry, &charval)) + strncpy(ptr->xmms2.performer, charval, text_buffer_size - 1); + + if (xmmsv_dict_get(infos, "conductor", &dict_entry) && xmmsv_get_string(dict_entry, &charval)) + strncpy(ptr->xmms2.conductor, charval, text_buffer_size - 1); + + if (xmmsv_dict_get(infos, "composer", &dict_entry) && xmmsv_get_string(dict_entry, &charval)) + strncpy(ptr->xmms2.composer, charval, text_buffer_size - 1); + + if (xmmsv_dict_get(infos, "opus", &dict_entry) && xmmsv_get_string(dict_entry, &charval)) + strncpy(ptr->xmms2.opus, charval, text_buffer_size - 1); + + if (xmmsv_dict_get(infos, "part", &dict_entry) && xmmsv_get_string(dict_entry, &charval)) + strncpy(ptr->xmms2.part, charval, text_buffer_size - 1); + + if (xmmsv_dict_get(infos, "originaldate", &dict_entry) && xmmsv_get_string(dict_entry, &charval)) + strncpy(ptr->xmms2.originaldate, charval, text_buffer_size - 1); + + /* END ashtophet's edition */ + if (xmmsv_dict_get(infos, "genre", &dict_entry) && xmmsv_get_string(dict_entry, &charval)) strncpy(ptr->xmms2.genre, charval, text_buffer_size - 1); --- src/xmms2.h 2009-04-30 07:01:53.000000000 +0200 +++ src/xmms2.h 2009-04-30 07:33:01.000000000 +0200 @@ -32,6 +32,14 @@ struct xmms2_s { char *artist; char *album; + /* BEGIN ashtophet's edition */ + char *performer; + char *composer; + char *conductor; + char *opus; + char *part; + char *originaldate; + /* END ashtophet's edition */ char *title; char *genre; char *comment; --- src/text_object.h 2009-04-30 07:01:53.000000000 +0200 +++ src/text_object.h 2009-04-30 07:46:05.000000000 +0200 @@ -308,6 +308,14 @@ #ifdef XMMS2 OBJ_xmms2_artist, OBJ_xmms2_album, + /* BEGIN ashtophet's edition */ + OBJ_xmms2_performer, + OBJ_xmms2_composer, + OBJ_xmms2_conductor, + OBJ_xmms2_opus, + OBJ_xmms2_part, + OBJ_xmms2_originaldate, + /* END ashtophet's edition */ OBJ_xmms2_title, OBJ_xmms2_genre, OBJ_xmms2_comment,