diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-05-08 13:39:00 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-05-08 13:39:00 -0400 |
commit | 88ee184494c8c51d2c00d5c1e195eebc9f472b7d (patch) | |
tree | f2e4280a23adbfe01a5e66047440a6f24a2d7448 /Command | |
parent | ddb66a7f8d1bd2ce626522d1d2af97e1ae5cde12 (diff) |
Improve quvi 0.4 output parsing to handle cases wher there is no known filename extension. This is currently the case when using quvi with youtube. In this case, the extension ".m" will be used.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/AddUrl.hs | 2 | ||||
-rw-r--r-- | Command/ImportFeed.hs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs index 5defc52d9..6474f2614 100644 --- a/Command/AddUrl.hs +++ b/Command/AddUrl.hs @@ -178,7 +178,7 @@ startWeb relaxed optfile pathdepth s = go $ fromMaybe bad $ parseURI urlstring pathmax <- liftIO $ fileNameLengthLimit "." let file = flip fromMaybe optfile $ truncateFilePath pathmax $ sanitizeFilePath $ - Quvi.pageTitle page ++ "." ++ Quvi.linkSuffix link + Quvi.pageTitle page ++ "." ++ fromMaybe "m" (Quvi.linkSuffix link) showStart "addurl" file next $ performQuvi relaxed urlstring (Quvi.linkUrl link) file #else diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs index 2a278dea1..379350c80 100644 --- a/Command/ImportFeed.hs +++ b/Command/ImportFeed.hs @@ -196,7 +196,7 @@ performDownload opts cache todownload = case location todownload of Just link -> do let videourl = Quvi.linkUrl link checkknown videourl $ - rundownload videourl ("." ++ Quvi.linkSuffix link) $ \f -> + rundownload videourl ("." ++ fromMaybe "m" (Quvi.linkSuffix link)) $ \f -> maybeToList <$> addUrlFileQuvi (relaxedOpt opts) quviurl videourl f #else return False |