Skip to content

Commit

Permalink
FTP: fix special char handling in artist & album
Browse files Browse the repository at this point in the history
Fixes #5
  • Loading branch information
xarantolus committed Aug 23, 2022
1 parent 2edd27b commit 43aee95
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ftp/musicfactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ func (m *musicDriverFactory) NewDriver() (server.Driver, error) {
}

art := store.CleanName(e.Artist())
if art == "" {
art = "Other Artist"
}
artistName, ok := normalizedArtists[strings.ToUpper(art)]
if !ok {
normalizedArtists[strings.ToUpper(e.Artist())] = art
Expand All @@ -47,6 +50,9 @@ func (m *musicDriverFactory) NewDriver() (server.Driver, error) {
}

aname := store.CleanName(e.AlbumName())
if aname == "" {
aname = "Other Album"
}
if a, ok := normalizedAlbums[strings.ToUpper(aname)]; !ok {
normalizedAlbums[strings.ToUpper(aname)] = aname
} else {
Expand Down

0 comments on commit 43aee95

Please sign in to comment.