We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf04324 commit 3b1a676Copy full SHA for 3b1a676
lib/Model/Artist.hs
@@ -7,16 +7,20 @@ module Model.Artist
7
)
8
where
9
10
-import Model.Album qualified as Album
11
import Data.List.NonEmpty ((<|))
+import Data.Text qualified as Text
12
+import Model.Album qualified as Album
13
import Sound.HTagLib qualified as HTagLib
14
15
newtype Artist = Artist (NonEmpty Album.Album)
16
deriving (Eq, Show)
17
18
mkArtist :: NonEmpty Album.Album -> Maybe Artist
19
mkArtist albums'@(firstAlbum :| otherAlbums)
- | (allSameAlbumArtist && (firstAlbumArtist /= "Various Artists"))
20
+ | ( allSameAlbumArtist
21
+ && not (Text.null firstAlbumArtist)
22
+ && (firstAlbumArtist /= "Various Artists")
23
+ )
24
|| allSameArtist =
25
Just $ Artist albums'
26
| otherwise = Nothing
0 commit comments