aboutsummaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-11-29 17:05:27 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-11-29 17:30:02 -0400
commit09d49fd8ace467463a83ecaf775cbed24f8fa0bd (patch)
tree496e4cc1c903b7ac7678ffe60e31c682985f6009 /Annex
parent3b3f7512f6d0b91de21f6fcc4aba8897174bc4a8 (diff)
convert importfeed to youtube-dl
Fully working, including --fast/--relaxed. Note that, while git-annex addurl --relaxed is not going to check youtube-dl, I kept git annex importfeed --relaxed checking it. Thinking is that, let's not break people's importfeed cron jobs, and importfeed does not typically have to check a large number of new items, so it's ok if it's a little bit slower when used with youtube playlist feeds. importfeed's behavior is also improved (?) when a feed has links in it to non-media files. Before, those were skipped. Now, the content of the link is downloaded. This had to be done, because trying to use youtube-dl is slow, and if those were skipped, it would have to check every time importfeed was run. While this behavior change may not be desirable for some feeds, that intersperse links to web pages with enclosures, it will be desirable for other feeds, that have non-enclosure directy links to media files. Remove old quvi modules. This commit was sponsored by Øyvind Andersen Holm.
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Quvi.hs33
1 files changed, 0 insertions, 33 deletions
diff --git a/Annex/Quvi.hs b/Annex/Quvi.hs
deleted file mode 100644
index 79b9ee6fa..000000000
--- a/Annex/Quvi.hs
+++ /dev/null
@@ -1,33 +0,0 @@
-{- quvi options for git-annex
- -
- - Copyright 2013 Joey Hess <id@joeyh.name>
- -
- - Licensed under the GNU GPL version 3 or higher.
- -}
-
-{-# LANGUAGE Rank2Types #-}
-
-module Annex.Quvi where
-
-import Annex.Common
-import qualified Annex
-import Utility.Quvi
-import Utility.Url
-
-withQuviOptions :: forall a. Query a -> [QuviParams] -> URLString -> Annex a
-withQuviOptions a ps url = do
- v <- quviVersion
- opts <- return []
- liftIO $ a v (concatMap (\mkp -> mkp v) ps ++ opts) url
-
-quviSupported :: URLString -> Annex Bool
-quviSupported u = liftIO . flip supported u =<< quviVersion
-
-quviVersion :: Annex QuviVersion
-quviVersion = go =<< Annex.getState Annex.quviversion
- where
- go (Just v) = return v
- go Nothing = do
- v <- liftIO probeVersion
- Annex.changeState $ \s -> s { Annex.quviversion = Just v }
- return v