|
Rockbox mail archiveSubject: Re: Announce: id3v2 patch 706111 updatedRe: Announce: id3v2 patch 706111 updated
From: TP Diffenbach <rockbox_at_diffenbach.org>
Date: Fri, 23 May 2003 10:40:52 -0400 Good catch Henrik, and thanks. However, I should note that with my patch, tracknum always has a value if track_string has a value (namely, atoi( track_string) ), and year always has a value if year_string does (again, atoi( year_string) ), UNLESS atoi gives up on it. Your code uses tracknum preferentially to track_string and year preferentially to year_string, so those else branches will exedcute only when there is no id3 tag, or atoi fails to convert it. So the question is simple: should we display the ints, or the strings? Potentially, the strings have more information, as in cases like (track) "11/12" or (year) "1814 (composed), 1982 (recorded)". --Tom Quoting Henrik Backe <backe_at_swipnet.se>: > > "TP Diffenbach" wrote in message > I've updated patch 706111 with diffs to > cvs 2003-05-22, and corrected the diffs to not include unchanged portions of > the files diffed. > > > > Patch 706111 adds freeform genre, freeform year, freeform track number, > and composer to the Id3v2 information. > > > > I'm only missing one thing, the ID3 browser does not use your freeform tags. > Feel free to add the following to your patch. > > ../Henrik > > --- orig/apps/wps.c 2003-05-23 13:25:55.000000000 +0200 > +++ dev/apps/wps.c 2003-05-23 14:35:16.000000000 +0200 > _at__at_ -186,19 +186,17 _at__at_ > > case 3: > lcd_puts(0, 0, str(LANG_ID3_TRACKNUM)); > - > - if (id3->tracknum) { > - snprintf(scroll_text,sizeof(scroll_text), "%d", > - id3->tracknum); > - lcd_puts_scroll(0, 1, scroll_text); > - } > - else > - lcd_puts_scroll(0, 1, str(LANG_ID3_NO_TRACKNUM)); > + lcd_puts_scroll(0, 1, > + id3->track_string ? > + id3->track_string : > + (char*)str(LANG_ID3_NO_TRACKNUM)); > break; > > case 4: > lcd_puts(0, 0, str(LANG_ID3_GENRE)); > lcd_puts_scroll(0, 1, > + id3->genre_string ? > + id3->genre_string : > wps_get_genre(id3->genre) ? > wps_get_genre(id3->genre) : > (char*)str(LANG_ID3_NO_INFO)); > _at__at_ -206,13 +204,10 _at__at_ > > case 5: > lcd_puts(0, 0, str(LANG_ID3_YEAR)); > - if (id3->year) { > - snprintf(scroll_text,sizeof(scroll_text), "%d", > - id3->year); > - lcd_puts_scroll(0, 1, scroll_text); > - } > - else > - lcd_puts_scroll(0, 1, str(LANG_ID3_NO_INFO)); > + lcd_puts_scroll(0, 1, > + id3->year_string ? > + id3->year_string : > + (char*)str(LANG_ID3_NO_INFO)); > break; > > case 6: > > > > > -- Archos FM has a Rockbox!Received on 2003-05-23 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |