pgdl 6.5 → 6.6
raw patch · 2 files changed
+15/−3 lines, 2 files
Files
- pgdl.cabal +10/−3
- src/PlayVid.hs +5/−0
pgdl.cabal view
@@ -1,6 +1,6 @@ name: pgdl-version: 6.5+version: 6.6 license: PublicDomain license-file: LICENSE author: sifmelcara@@ -9,8 +9,13 @@ build-type: Simple extra-source-files: README cabal-version: >=1.10-description: a terminal user interface program that downloads a video from html and plays immediately.-synopsis: pgdl+description: a terminal user interface program that downloads a video from html and plays immediately.(Calling vlc)+ .+ Only for Linux and MACOSX.+ .+ It parses a remote html file which has link tag & filename tag in the same line.+ .+synopsis: pgdownloader source-repository head type: git@@ -28,6 +33,8 @@ configurator >= 0.3.0.0, filepath, binary >= 0.7.0.0 ghc-options: -threaded -O2+ if !os(linux)+ CC-Options: "-D__MACOSX__" -- hs-source-dirs: default-language: Haskell2010
src/PlayVid.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE CPP #-} module PlayVid where @@ -29,7 +30,11 @@ runCommand $ "nohup curl " ++ addq url ++ " -o " ++ addq localloc ++ "&>/dev/null &" let checkFile = doesFileExist localloc >>= \ready -> unless ready checkFile checkFile+#if __MACOSX__+ runCommand $ "open " ++ addq localloc ++ " -a vlc"+#else runCommand $ "nohup vlc -f " ++ addq localloc ++ " &>/dev/null &"+#endif exitSuccess where vn = T.unpack . vidName $ vid vu = T.unpack . vidLink $ vid