23 lines
399 B
Haskell
23 lines
399 B
Haskell
module Main where
|
|
|
|
import qualified Data.Text as T
|
|
|
|
import qualified JSONTypes as J
|
|
import Request
|
|
import Torrent
|
|
import UI
|
|
|
|
import System.Environment
|
|
|
|
main :: IO ()
|
|
main = do
|
|
args <- getArgs
|
|
case args of
|
|
([]) -> runApp >> pure ()
|
|
(x:_) -> do
|
|
movies <- queryMovies (T.pack x)
|
|
|
|
case movies of
|
|
(Left m) -> print m
|
|
(Right d) -> mapM_ printMagnets (J.movies d)
|