library: Strip whitespace from genre and tracks
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This commit is contained in:
parent
98f97b723a
commit
e0f28cb366
|
@ -102,7 +102,7 @@ library :: Genre :: Genre()
|
|||
}
|
||||
|
||||
library :: Genre :: Genre(TagLib :: Tag *tag)
|
||||
: name(tag->genre().to8Bit(true))
|
||||
: name(tag->genre().stripWhiteSpace().to8Bit(true))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -188,7 +188,7 @@ library :: Track :: Track(TagLib :: Tag *tag, TagLib :: AudioProperties *audio,
|
|||
: library_id(lib), artist_id(artist), album_id(album), genre_id(genre),
|
||||
track(tag->track()), last_year(0), last_month(0), last_day(0),
|
||||
play_count(0), length(audio->length()), banned(false),
|
||||
title(tag->title().to8Bit(true))
|
||||
title(tag->title().stripWhiteSpace().to8Bit(true))
|
||||
{
|
||||
filepath = path.substr(library_db[library_id].root_path.size() + 1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue