summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2014-12-17 15:34:38 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2014-12-17 15:34:38 -0400
commit590ce84fb3c20a2ddebcd72308aee004107589f0 (patch)
tree380333813df46e1aff78567ae2bb897e90fc0436
parentdc973c549e28004252b309e603b944b51302a2d6 (diff)
-rw-r--r--Remote/BitTorrent.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Remote/BitTorrent.hs b/Remote/BitTorrent.hs
index 902af1079..082fa9394 100644
--- a/Remote/BitTorrent.hs
+++ b/Remote/BitTorrent.hs
@@ -305,6 +305,9 @@ parseAriaProgress totalsize = go [] . reverse . split ['\r']
frompercent p = toBytesProcessed $ totalsize * p `div` 100
+{- It would be better to use http://hackage.haskell.org/package/torrent,
+ - but that package won't currently build. I sent a patch fixing it
+ - to its author and plan to upload in Jan 2015 if I don't hear back. -}
btshowmetainfo :: FilePath -> String -> IO [String]
btshowmetainfo torrent field =
findfield [] . lines <$> readProcess "btshowmetainfo" [torrent]