snaus/exe/Main.hs
2024-03-04 12:29:41 +01:00

22 lines
617 B
Haskell

module Main where
import System.Posix.Directory ( getWorkingDirectory )
import System.Directory.Extra ( listContents )
import Control.Monad ( (<=<), filterM )
import System.Process ( ProcessHandle, spawnCommand )
fetchLocalAudio :: FilePath -> IO [FilePath]
fetchLocalAudio = filterM isAudioVideo <=< listContents
isAudioVideo :: FilePath -> IO Bool
isAudioVideo = undefined
-- Paths need to be escaped if containing certain characters
playHeadless :: FilePath -> IO ProcessHandle
playHeadless = spawnCommand . (++) "mpv --vid=no "
main :: IO ()
main =
getWorkingDirectory >>= \a ->
pure ()