{-# LANGUAGE OverloadedStrings #-}
module Network.MPD.Commands.Database
( count
, find
, findAdd
, list
, listAll
, listAllInfo
, lsInfo
, readComments
, search
, searchAdd
, searchAddPl
, update
, rescan
) where
import qualified Network.MPD.Applicative.Internal as A
import qualified Network.MPD.Applicative.Database as A
import Network.MPD.Commands.Query
import Network.MPD.Commands.Types
import Network.MPD.Core
count :: MonadMPD m => Query -> m Count
count :: Query -> m Count
count = Command Count -> m Count
forall (m :: * -> *) a. MonadMPD m => Command a -> m a
A.runCommand (Command Count -> m Count)
-> (Query -> Command Count) -> Query -> m Count
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Query -> Command Count
A.count
find :: MonadMPD m => Query -> m [Song]
find :: Query -> m [Song]
find = Command [Song] -> m [Song]
forall (m :: * -> *) a. MonadMPD m => Command a -> m a
A.runCommand (Command [Song] -> m [Song])
-> (Query -> Command [Song]) -> Query -> m [Song]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Query -> Command [Song]
A.find
findAdd :: MonadMPD m => Query -> m ()
findAdd :: Query -> m ()
findAdd = Command () -> m ()
forall (m :: * -> *) a. MonadMPD m => Command a -> m a
A.runCommand (Command () -> m ()) -> (Query -> Command ()) -> Query -> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Query -> Command ()
A.findAdd
list :: MonadMPD m
=> Metadata
-> Query -> m [Value]
list :: Metadata -> Query -> m [Value]
list Metadata
m = Command [Value] -> m [Value]
forall (m :: * -> *) a. MonadMPD m => Command a -> m a
A.runCommand (Command [Value] -> m [Value])
-> (Query -> Command [Value]) -> Query -> m [Value]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Metadata -> Query -> Command [Value]
A.list Metadata
m
listAll :: MonadMPD m => Path -> m [Path]
listAll :: Path -> m [Path]
listAll = Command [Path] -> m [Path]
forall (m :: * -> *) a. MonadMPD m => Command a -> m a
A.runCommand (Command [Path] -> m [Path])
-> (Path -> Command [Path]) -> Path -> m [Path]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Path -> Command [Path]
A.listAll
listAllInfo :: MonadMPD m => Path -> m [LsResult]
listAllInfo :: Path -> m [LsResult]
listAllInfo = Command [LsResult] -> m [LsResult]
forall (m :: * -> *) a. MonadMPD m => Command a -> m a
A.runCommand (Command [LsResult] -> m [LsResult])
-> (Path -> Command [LsResult]) -> Path -> m [LsResult]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Path -> Command [LsResult]
A.listAllInfo
lsInfo :: MonadMPD m => Path -> m [LsResult]
lsInfo :: Path -> m [LsResult]
lsInfo = Command [LsResult] -> m [LsResult]
forall (m :: * -> *) a. MonadMPD m => Command a -> m a
A.runCommand (Command [LsResult] -> m [LsResult])
-> (Path -> Command [LsResult]) -> Path -> m [LsResult]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Path -> Command [LsResult]
A.lsInfo
readComments :: MonadMPD m => Path -> m [(String, String)]
= Command [(String, String)] -> m [(String, String)]
forall (m :: * -> *) a. MonadMPD m => Command a -> m a
A.runCommand (Command [(String, String)] -> m [(String, String)])
-> (Path -> Command [(String, String)])
-> Path
-> m [(String, String)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Path -> Command [(String, String)]
A.readComments
search :: MonadMPD m => Query -> m [Song]
search :: Query -> m [Song]
search = Command [Song] -> m [Song]
forall (m :: * -> *) a. MonadMPD m => Command a -> m a
A.runCommand (Command [Song] -> m [Song])
-> (Query -> Command [Song]) -> Query -> m [Song]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Query -> Command [Song]
A.search
searchAdd :: MonadMPD m => Query -> m ()
searchAdd :: Query -> m ()
searchAdd = Command () -> m ()
forall (m :: * -> *) a. MonadMPD m => Command a -> m a
A.runCommand (Command () -> m ()) -> (Query -> Command ()) -> Query -> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Query -> Command ()
A.searchAdd
searchAddPl :: MonadMPD m => PlaylistName -> Query -> m ()
searchAddPl :: PlaylistName -> Query -> m ()
searchAddPl PlaylistName
pl = Command () -> m ()
forall (m :: * -> *) a. MonadMPD m => Command a -> m a
A.runCommand (Command () -> m ()) -> (Query -> Command ()) -> Query -> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PlaylistName -> Query -> Command ()
A.searchAddPl PlaylistName
pl
update :: MonadMPD m => Maybe Path -> m Integer
update :: Maybe Path -> m Integer
update = Command Integer -> m Integer
forall (m :: * -> *) a. MonadMPD m => Command a -> m a
A.runCommand (Command Integer -> m Integer)
-> (Maybe Path -> Command Integer) -> Maybe Path -> m Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Maybe Path -> Command Integer
A.update
rescan :: MonadMPD m => Maybe Path -> m Integer
rescan :: Maybe Path -> m Integer
rescan = Command Integer -> m Integer
forall (m :: * -> *) a. MonadMPD m => Command a -> m a
A.runCommand (Command Integer -> m Integer)
-> (Maybe Path -> Command Integer) -> Maybe Path -> m Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Maybe Path -> Command Integer
A.rescan