summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/gui/skin_engine/skin_parser.c13
-rw-r--r--lib/rbcodec/metadata/asf.c19
-rw-r--r--lib/rbcodec/metadata/id3tags.c3
-rw-r--r--lib/rbcodec/metadata/metadata_common.c28
4 files changed, 38 insertions, 25 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index a9b1ef4706..ee32c06ace 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -1051,12 +1051,15 @@ static int parse_progressbar_tag(struct skin_element* element,
1051 enum 1051 enum
1052 { 1052 {
1053 eINVERT = 0, eNOFILL, eNOBORDER, eNOBAR, eSLIDER, eIMAGE, 1053 eINVERT = 0, eNOFILL, eNOBORDER, eNOBAR, eSLIDER, eIMAGE,
1054 eBACKDROP, eVERTICAL, eHORIZONTAL, eNOTOUCH, eSETTING 1054 eBACKDROP, eVERTICAL, eHORIZONTAL, eNOTOUCH, eSETTING,
1055 e_PB_TAG_COUNT
1055 }; 1056 };
1056 1057
1057 static const char *pb_options[] = {"invert", "nofill", "noborder, nobar", "slider", 1058 static const char *pb_options[e_PB_TAG_COUNT + 1] = {[eINVERT] = "invert",
1058 "image", "backdrop", "vertical", "horizontal", 1059 [eNOFILL] = "nofill", [eNOBORDER] = "noborder", [eNOBAR] = "nobar",
1059 "notouch", "setting", NULL}; 1060 [eSLIDER] = "slider", [eIMAGE] = "image", [eBACKDROP] = "backdrop",
1061 [eVERTICAL] = "vertical", [eHORIZONTAL] = "horizontal",
1062 [eNOTOUCH] = "notouch", [eSETTING] = "setting", [e_PB_TAG_COUNT] = NULL};
1060 int pb_op; 1063 int pb_op;
1061 1064
1062 while (curr_param < element->params_count) 1065 while (curr_param < element->params_count)
@@ -1409,7 +1412,7 @@ static int parse_skinvar( struct skin_element *element,
1409 1412
1410 if (!isdefault(get_param(element, 2))) 1413 if (!isdefault(get_param(element, 2)))
1411 data->newval = get_param(element, 2)->data.number; 1414 data->newval = get_param(element, 2)->data.number;
1412 else if (sv_op == 0) /*touch*/ 1415 else if (sv_op != 0) /*!touch*/
1413 return WPS_ERROR_INVALID_PARAM; 1416 return WPS_ERROR_INVALID_PARAM;
1414 data->max = 0; 1417 data->max = 0;
1415 if (sv_op == 1) /*set*/ 1418 if (sv_op == 1) /*set*/
diff --git a/lib/rbcodec/metadata/asf.c b/lib/rbcodec/metadata/asf.c
index 82873a43a6..b578746658 100644
--- a/lib/rbcodec/metadata/asf.c
+++ b/lib/rbcodec/metadata/asf.c
@@ -441,13 +441,20 @@ static int asf_parse_header(int fd, struct mp3entry* id3,
441 { 441 {
442 eWM_TrackNumber, eWM_Genre, eWM_AlbumTitle, 442 eWM_TrackNumber, eWM_Genre, eWM_AlbumTitle,
443 eWM_AlbumArtist, eWM_Composer, eWM_Year, 443 eWM_AlbumArtist, eWM_Composer, eWM_Year,
444 eWM_MusicBrainz_Track_Id, eWM_Picture 444 eWM_MusicBrainz_Track_Id, eWM_Picture,
445 eWM_COUNT_TAG_COUNT
445 }; 446 };
446 447
447 static const char *tagops[] = 448 static const char *tagops[eWM_COUNT_TAG_COUNT + 1] =
448 { "WM/TrackNumber", "WM/Genre", "WM/AlbumTitle", 449 { [eWM_TrackNumber] = "WM/TrackNumber",
449 "WM/AlbumArtist", "WM/Composer", "WM/Year", 450 [eWM_Genre] = "WM/Genre",
450 "MusicBrainz/Track Id", "WM/Picture", NULL 451 [eWM_AlbumTitle] = "WM/AlbumTitle",
452 [eWM_AlbumArtist] = "WM/AlbumArtist",
453 [eWM_Composer] = "WM/Composer",
454 [eWM_Year] = "WM/Year",
455 [eWM_MusicBrainz_Track_Id]"MusicBrainz/Track Id",
456 [eWM_Picture]"WM/Picture",
457 [eWM_COUNT_TAG_COUNT] = NULL
451 }; 458 };
452 459
453 for (i=0; i < count; i++) { 460 for (i=0; i < count; i++) {
diff --git a/lib/rbcodec/metadata/id3tags.c b/lib/rbcodec/metadata/id3tags.c
index 18258c73ac..ba7695d569 100644
--- a/lib/rbcodec/metadata/id3tags.c
+++ b/lib/rbcodec/metadata/id3tags.c
@@ -312,9 +312,10 @@ static int parsealbumart( struct mp3entry* entry, char* tag, int bufferpos )
312 312
313 if (memcmp(tag, "image/", 6) == 0) 313 if (memcmp(tag, "image/", 6) == 0)
314 { 314 {
315 int tg_op = string_option(tag, img_options, false);
316 /* ID3 v2.3+ */ 315 /* ID3 v2.3+ */
317 tag += 6; 316 tag += 6;
317 int tg_op = string_option(tag, img_options, false);
318
318 if (tg_op == 0) /*jpeg*/ 319 if (tg_op == 0) /*jpeg*/
319 { 320 {
320 entry->albumart.type = AA_TYPE_JPG; 321 entry->albumart.type = AA_TYPE_JPG;
diff --git a/lib/rbcodec/metadata/metadata_common.c b/lib/rbcodec/metadata/metadata_common.c
index 59c2f01840..e38b9e4d9a 100644
--- a/lib/rbcodec/metadata/metadata_common.c
+++ b/lib/rbcodec/metadata/metadata_common.c
@@ -288,15 +288,21 @@ long parse_tag(const char* name, char* value, struct mp3entry* id3,
288 eYEAR, eDATE, eTITLE, eARTIST, eALBUM, eGENRE, 288 eYEAR, eDATE, eTITLE, eARTIST, eALBUM, eGENRE,
289 eCOMPOSER, eCOMMENT, eALBUMARTIST, eALBUM_ARTIST, 289 eCOMPOSER, eCOMMENT, eALBUMARTIST, eALBUM_ARTIST,
290 eENSEMBLE, eGROUPING, eCONTENTGROUP, eCONTENT_GROUP, 290 eENSEMBLE, eGROUPING, eCONTENTGROUP, eCONTENT_GROUP,
291 eMUSICBRAINZ1, eMUSICBRAINZ2 291 eMUSICBRAINZ1, eMUSICBRAINZ2, e_COUNT_TAG_COUNT
292 }; 292 };
293 293
294 static const char *tagops[] = 294 static const char *tagops[e_COUNT_TAG_COUNT + 1] =
295 { "track", "tracknumber", "discnumber", "disc", 295 { [eTRACK] = "track", [eTRACKNUMBER] = "tracknumber",
296 "year","date","title", "artist", "album", "genre" 296 [eDISCNUMBER] = "discnumber", [eDISC] = "disc",
297 "composer","comment","albumartist","album artist", 297 [eYEAR] = "year", [eDATE] = "date", [eTITLE] = "title",
298 "ensemble","grouping","contentgroup","content group", 298 [eARTIST] = "artist", [eALBUM] = "album", [eGENRE] = "genre"
299 "musicbrainz_trackid", "http://musicbrainz.org", NULL 299 [eCOMPOSER] = "composer", [eCOMMENT] = "comment",
300 [eALBUMARTIST] = "albumartist", [eALBUM_ARTIST] ="album artist",
301 [eENSEMBLE] = "ensemble", [eGROUPING] = "grouping",
302 [eCONTENTGROUP] = "contentgroup", [eCONTENT_GROUP] = "content group",
303 [eMUSICBRAINZ1] = "musicbrainz_trackid",
304 [eMUSICBRAINZ2] = "http://musicbrainz.org",
305 [e_COUNT_TAG_COUNT] = NULL;
300 }; 306 };
301 307
302 int item = string_option(name, tagops, true); 308 int item = string_option(name, tagops, true);
@@ -351,11 +357,7 @@ long parse_tag(const char* name, char* value, struct mp3entry* id3,
351 { 357 {
352 p = &(id3->comment); 358 p = &(id3->comment);
353 } 359 }
354 else if (item == eALBUMARTIST || item == eALBUM_ARTIST) 360 else if (item == eALBUMARTIST || item == eALBUM_ARTIST || item == eENSEMBLE)
355 {
356 p = &(id3->albumartist);
357 }
358 else if (item == eENSEMBLE)
359 { 361 {
360 p = &(id3->albumartist); 362 p = &(id3->albumartist);
361 } 363 }