mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 15:45:56 -05:00
Check & fix UTF-8 strings before adding/updating files
This commit is contained in:
parent
35d6ac4cfa
commit
3b7a71527a
@ -284,6 +284,8 @@ process_media_file(char *file, time_t mtime, off_t size, int compilation)
|
||||
|
||||
fixup_tags(&mfi);
|
||||
|
||||
unicode_fixup_mfi(&mfi);
|
||||
|
||||
if (mfi.id == 0)
|
||||
db_file_add(&mfi);
|
||||
else
|
||||
|
@ -424,6 +424,7 @@ process_track_file(plist_t trk, char *base)
|
||||
}
|
||||
}
|
||||
|
||||
unicode_fixup_mfi(mfi);
|
||||
db_file_update(mfi);
|
||||
|
||||
free_mfi(mfi, 0);
|
||||
|
@ -667,6 +667,9 @@ dacp_propset_userrating(const char *value, struct evkeyvalq *query)
|
||||
|
||||
mfi->rating = rating;
|
||||
|
||||
/* We're not touching any string field in mfi, so it's safe to
|
||||
* skip unicode_fixup_mfi() before the update
|
||||
*/
|
||||
db_file_update(mfi);
|
||||
|
||||
free_mfi(mfi, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user