summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Tracker/Session.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Tracker/Session.hs')
-rw-r--r--src/Network/BitTorrent/Tracker/Session.hs12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/Network/BitTorrent/Tracker/Session.hs b/src/Network/BitTorrent/Tracker/Session.hs
index 5aa9c0eb..560acf84 100644
--- a/src/Network/BitTorrent/Tracker/Session.hs
+++ b/src/Network/BitTorrent/Tracker/Session.hs
@@ -47,8 +47,6 @@ import Control.Exception
47import Control.Concurrent 47import Control.Concurrent
48import Control.Concurrent.Chan.Split as CS 48import Control.Concurrent.Chan.Split as CS
49import Control.Monad 49import Control.Monad
50import Data.Aeson
51import Data.Aeson.TH
52import Data.Default 50import Data.Default
53import Data.Fixed 51import Data.Fixed
54import Data.Foldable as F 52import Data.Foldable as F
@@ -60,7 +58,6 @@ import Data.Traversable
60import Network.URI 58import Network.URI
61 59
62import Data.Torrent.InfoHash 60import Data.Torrent.InfoHash
63import Data.Torrent.JSON
64import Network.BitTorrent.Core 61import Network.BitTorrent.Core
65import Network.BitTorrent.Internal.Cache 62import Network.BitTorrent.Internal.Cache
66import Network.BitTorrent.Internal.Types 63import Network.BitTorrent.Internal.Types
@@ -95,8 +92,6 @@ data LastScrape = LastScrape
95 , scrapeSeeders :: Maybe Int 92 , scrapeSeeders :: Maybe Int
96 } deriving (Show, Eq) 93 } deriving (Show, Eq)
97 94
98$(deriveJSON omitRecordPrefix ''LastScrape)
99
100-- | Single tracker session. 95-- | Single tracker session.
101data TrackerSession = TrackerSession 96data TrackerSession = TrackerSession
102 { -- | Used to notify 'Stopped' and 'Completed' events. 97 { -- | Used to notify 'Stopped' and 'Completed' events.
@@ -109,13 +104,6 @@ data TrackerSession = TrackerSession
109 , trackerScrape :: Cached LastScrape 104 , trackerScrape :: Cached LastScrape
110 } 105 }
111 106
112instance ToJSON (TierEntry TrackerSession) where
113 toJSON (uri, TrackerSession {..}) = object
114 [ "uri" .= uri
115 , "peers" .= trackerPeers
116 , "scrape" .= trackerScrape
117 ]
118
119-- | Not contacted. 107-- | Not contacted.
120instance Default TrackerSession where 108instance Default TrackerSession where
121 def = TrackerSession Nothing def def 109 def = TrackerSession Nothing def def