mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-06 21:25:03 -05:00
FS#13497: '0' is sometimes a valid track number
Most notably for CD rips that use a track number of 0 for
the leadin.
Therefore change our "invalid track number" canary to -1 instead
of 0. Additionally don't try to parse an empty string.
In the process, get rid of redudant 'discnum = 0' as well.
NOTE: While not strictly necessary, we recommend rebuilding the
database to ensure files without track numbers are
updated with the new canary.
Change-Id: I543f98ca49cec7b5eeffa7c14c1eca57171f345a
This commit is contained in:
parent
481cc70fe0
commit
e94a96cdcf
15 changed files with 104 additions and 89 deletions
|
|
@ -263,7 +263,7 @@ const char *get_id3_token(struct wps_token *token, struct mp3entry *id3,
|
|||
case SKIN_TOKEN_METADATA_TRACK_NUMBER:
|
||||
if (id3->track_string)
|
||||
return id3->track_string;
|
||||
if (id3->tracknum) {
|
||||
if (id3->tracknum >= 0) {
|
||||
itoa_buf(buf, buf_size, id3->tracknum);
|
||||
return buf;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue