mirror of
https://github.com/owntone/owntone-server.git
synced 2025-05-04 16:56:45 -04:00
Ensure mfi->title is proper UTF-8 when set to mfi->fname
This commit is contained in:
parent
a116e2ad1f
commit
a981fa0a45
@ -257,7 +257,14 @@ fixup_tags(struct media_file_info *mfi)
|
|||||||
if (!mfi->genre)
|
if (!mfi->genre)
|
||||||
mfi->genre = strdup("Unknown genre");
|
mfi->genre = strdup("Unknown genre");
|
||||||
if (!mfi->title)
|
if (!mfi->title)
|
||||||
mfi->title = strdup(mfi->fname);
|
{
|
||||||
|
/* fname is left untouched by unicode_fixup_mfi() for
|
||||||
|
* obvious reasons, so ensure it is proper UTF-8
|
||||||
|
*/
|
||||||
|
mfi->title = unicode_fixup_string(mfi->fname);
|
||||||
|
if (mfi->title == mfi->fname)
|
||||||
|
mfi->title = strdup(mfi->fname);
|
||||||
|
}
|
||||||
|
|
||||||
/* Ensure sort tags are filled and normalized */
|
/* Ensure sort tags are filled and normalized */
|
||||||
normalize_fixup_tag(&mfi->artist_sort, mfi->artist);
|
normalize_fixup_tag(&mfi->artist_sort, mfi->artist);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user