From c72953df05259b20a7fc87117aefbbe284a376a1 Mon Sep 17 00:00:00 2001 From: Carlos Sosa Date: Sat, 18 Apr 2020 20:08:00 -0700 Subject: Initial commit v0.1.0 --- src/Sound/MusicDirTrans/Type.hs | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 src/Sound/MusicDirTrans/Type.hs (limited to 'src/Sound/MusicDirTrans/Type.hs') diff --git a/src/Sound/MusicDirTrans/Type.hs b/src/Sound/MusicDirTrans/Type.hs new file mode 100755 index 0000000..463cd96 --- /dev/null +++ b/src/Sound/MusicDirTrans/Type.hs @@ -0,0 +1,35 @@ +{-# LANGUAGE OverloadedStrings #-} +module Sound.MusicDirTrans.Type + ( AudioTrack(..) + , Metadata(..) + , ArtistPath(..) + , newPath + ) +where + + +import Sound.HTagLib ( Artist + , Album + , Year + , FileType + ) + +data AudioTrack = AudioTrack + { currentPath :: FilePath } + deriving (Show, Eq) + +data Metadata = Metadata + { mArtist :: Artist + , mAlbum :: Album + , mYear :: Maybe Year } + deriving (Show, Eq) + +data ArtistPath = ArtistPath + { rootPath :: FilePath + , parentPath :: FilePath + , childPath :: FilePath } + deriving (Show, Eq) + +newPath :: ArtistPath -> FilePath +newPath (ArtistPath _ p c) = p ++ "/" ++ c ++ "/" + -- cgit v1.3-2-g0d8e