]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/tracker.ts
Ensure to install supported plugins
[github/Chocobozzz/PeerTube.git] / server / controllers / tracker.ts
index c962fada5250564cb45d31d2d2585f9886d6ab8f..915981f6754285a1cc4eb3a3a51323b2497cc161 100644 (file)
@@ -22,7 +22,6 @@ const trackerServer = new TrackerServer({
   http: false,
   udp: false,
   ws: false,
-  dht: false,
   filter: async function (infoHash, params, cb) {
     if (CONFIG.TRACKER.ENABLED === false) {
       return cb(new Error('Tracker is disabled on this instance.'))
@@ -31,7 +30,7 @@ const trackerServer = new TrackerServer({
     let ip: string
 
     if (params.type === 'ws') {
-      ip = params.socket.ip
+      ip = params.ip
     } else {
       ip = params.httpReq.ip
     }
@@ -51,7 +50,7 @@ const trackerServer = new TrackerServer({
       const videoFileExists = await VideoFileModel.doesInfohashExistCached(infoHash)
       if (videoFileExists === true) return cb()
 
-      const playlistExists = await VideoStreamingPlaylistModel.doesInfohashExist(infoHash)
+      const playlistExists = await VideoStreamingPlaylistModel.doesInfohashExistCached(infoHash)
       if (playlistExists === true) return cb()
 
       cb(new Error(`Unknown infoHash ${infoHash} requested by ip ${ip}`))