comparison libpurple/protocols/jabber/usertune.c @ 17590:60c8535afc33

Fixed embarrassing typos. Maybe I shouldn't code while half asleep.
author Andreas Monitzer <pidgin@monitzer.com>
date Mon, 18 Jun 2007 02:57:22 +0000
parents 84638e3af1bc
children 759cd72bd2ff
comparison
equal deleted inserted replaced
17589:248d2d0c606e 17590:60c8535afc33
51 if (!tune) 51 if (!tune)
52 return; 52 return;
53 for (tuneinfo = tune->child; tuneinfo; tuneinfo = tuneinfo->next) { 53 for (tuneinfo = tune->child; tuneinfo; tuneinfo = tuneinfo->next) {
54 if (tuneinfo->type == XMLNODE_TYPE_TAG) { 54 if (tuneinfo->type == XMLNODE_TYPE_TAG) {
55 if (!strcmp(tuneinfo->name, "artist")) { 55 if (!strcmp(tuneinfo->name, "artist")) {
56 if (tuneinfodata.artist[0] != '\0') /* only pick the first one */ 56 if (tuneinfodata.artist[0] == '\0') /* only pick the first one */
57 tuneinfodata.artist = xmlnode_get_data(tuneinfo); 57 tuneinfodata.artist = xmlnode_get_data(tuneinfo);
58 } else if (!strcmp(tuneinfo->name, "length")) { 58 } else if (!strcmp(tuneinfo->name, "length")) {
59 if (tuneinfodata.time == -1) { 59 if (tuneinfodata.time == -1) {
60 char *length = xmlnode_get_data(tuneinfo); 60 char *length = xmlnode_get_data(tuneinfo);
61 if (length) 61 if (length)
62 tuneinfodata.time = strtol(length, NULL, 10); 62 tuneinfodata.time = strtol(length, NULL, 10);
63 } 63 }
64 } else if (!strcmp(tuneinfo->name, "source")) { 64 } else if (!strcmp(tuneinfo->name, "source")) {
65 if (tuneinfodata.album[0] != '\0') /* only pick the first one */ 65 if (tuneinfodata.album[0] == '\0') /* only pick the first one */
66 tuneinfodata.album = xmlnode_get_data(tuneinfo); 66 tuneinfodata.album = xmlnode_get_data(tuneinfo);
67 } else if (!strcmp(tuneinfo->name, "title")) { 67 } else if (!strcmp(tuneinfo->name, "title")) {
68 if (tuneinfodata.title[0] != '\0') /* only pick the first one */ 68 if (tuneinfodata.title[0] == '\0') /* only pick the first one */
69 tuneinfodata.title = xmlnode_get_data(tuneinfo); 69 tuneinfodata.title = xmlnode_get_data(tuneinfo);
70 } else if (!strcmp(tuneinfo->name, "track")) { 70 } else if (!strcmp(tuneinfo->name, "track")) {
71 if (tuneinfodata.track[0] != '\0') /* only pick the first one */ 71 if (tuneinfodata.track[0] == '\0') /* only pick the first one */
72 tuneinfodata.track = xmlnode_get_data(tuneinfo); 72 tuneinfodata.track = xmlnode_get_data(tuneinfo);
73 } else if (!strcmp(tuneinfo->name, "uri")) { 73 } else if (!strcmp(tuneinfo->name, "uri")) {
74 if (tuneinfodata.url[0] != '\0') /* only pick the first one */ 74 if (tuneinfodata.url[0] == '\0') /* only pick the first one */
75 tuneinfodata.url = xmlnode_get_data(tuneinfo); 75 tuneinfodata.url = xmlnode_get_data(tuneinfo);
76 } 76 }
77 } 77 }
78 } 78 }
79 JabberBuddyResource *resource = jabber_buddy_find_resource(buddy, NULL); 79 JabberBuddyResource *resource = jabber_buddy_find_resource(buddy, NULL);