mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
metadata: Normalize all metadata to Unicode NFC form
* Standalone database tool * Simulator builds * Target firmware (Hosted and Native, for all >2MB targets) Change-Id: Ia7361affc2fc6a08e73c31ecc9ef3a4008c2415d
This commit is contained in:
parent
8768266d27
commit
81fcb10f8f
6 changed files with 68 additions and 5 deletions
|
|
@ -27,6 +27,10 @@
|
|||
#include "logf.h"
|
||||
#include "metadata.h"
|
||||
|
||||
#ifdef UTF8PROC_EXPORTS
|
||||
#include "rbunicode.h"
|
||||
#endif
|
||||
|
||||
#include "metadata_parsers.h"
|
||||
|
||||
/* For trailing tag stripping and base audio data types */
|
||||
|
|
@ -471,6 +475,22 @@ bool get_metadata_ex(struct mp3entry* id3, int fd, const char* trackname, int fl
|
|||
wipe_mp3entry(id3); /* ensure the mp3entry is clear */
|
||||
}
|
||||
|
||||
#ifdef UTF8PROC_EXPORTS
|
||||
if (success) {
|
||||
utf8_normalize(id3->title);
|
||||
utf8_normalize(id3->artist);
|
||||
utf8_normalize(id3->album);
|
||||
utf8_normalize(id3->genre_string);
|
||||
utf8_normalize(id3->disc_string);
|
||||
utf8_normalize(id3->track_string);
|
||||
utf8_normalize(id3->year_string);
|
||||
utf8_normalize(id3->composer);
|
||||
utf8_normalize(id3->comment);
|
||||
utf8_normalize(id3->albumartist);
|
||||
utf8_normalize(id3->grouping);
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((flags & METADATA_CLOSE_FD_ON_EXIT))
|
||||
close(fd);
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue