Socket
Socket
Sign inDemoInstall

list-fetch

Package Overview
Dependencies
Maintainers
1
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

list-fetch - npm Package Compare versions

Comparing version 28.0.4 to 28.0.5

24

index.js

@@ -145,4 +145,4 @@ module.exports = async function makeBTFetch (opts = {}) {

useHeaders['X-Downloaded'] = `${torrentData.downloaded}`
useHeaders['X-Link'] = `bt://${mid.mainHost}${mid.mainPath}`
useHeaders['Link'] = `<bt://${mid.mainHost}${mid.mainPath}>; rel="canonical"`
useHeaders['X-Link'] = `bt://${torrentData.address || torrentData.infohash}${mid.mainPath}`
useHeaders['Link'] = `<${useHeaders['X-Link']}>; rel="canonical"`

@@ -202,3 +202,3 @@ return sendTheData(signal, {status: 200, headers: useHeaders, body: ''})

if(torrentData.infoHash){
return sendTheData(signal, {status: 200, headers: {'X-Link': `bt://${mid.mainHost}${mid.mainPath}`, 'Link': `<bt://${mid.mainHost}${mid.mainPath}>; rel="canonical"`, 'Content-Type': mainRes, 'Content-Length': String(torrentData.length)}, body: mainReq ? `<html><head><title>${mid.mainLink}</title></head><body><div><h1>${torrentData.infohash}</h1>${torrentData.files.map(file => { return `<p><a href='${file.urlPath}'>${file.name}</a></p>` })}</div></body></html>` : JSON.stringify(torrentData.files.map(file => { return file.urlPath }))})
return sendTheData(signal, {status: 200, headers: {'X-Link': `bt://${torrentData.address || torrentData.infohash}${mid.mainPath}`, 'Link': `<bt://${torrentData.address || torrentData.infohash}${mid.mainPath}>; rel="canonical"`, 'Content-Type': mainRes, 'Content-Length': String(torrentData.length)}, body: mainReq ? `<html><head><title>${mid.mainLink}</title></head><body><div><h1>${torrentData.infohash}</h1>${torrentData.files.map(file => { return `<p><a href='${file.urlPath}'>${file.name}</a></p>` })}</div></body></html>` : JSON.stringify(torrentData.files.map(file => { return file.urlPath }))})
} else if (Array.isArray(torrentData)) {

@@ -260,6 +260,4 @@ let checkLength = 0

const useIden = torrentData.address || torrentData.infohash
const useName = `bt://${useIden}`
const useLink = `${useName}${torrentData.path}`
torrentData.saved.forEach((data, i) => {torrentData.saved[i] = path.join(useName, data).replace(/\\/g, '/')})
useHeaders['X-Link'] = useLink
torrentData.saved.forEach((data, i) => {torrentData.saved[i] = 'bt://' + path.join(useIden, data).replace(/\\/g, '/')})
useHeaders['X-Link'] = `bt://${useIden}${torrentData.path}`
useHeaders['Link'] = `<${useHeaders['X-Link']}>; rel="canonical"`

@@ -281,6 +279,4 @@ return sendTheData(signal, {status: 200, headers: {'Content-Length': String(torrentData.length), 'Content-Type': mainRes, ...useHeaders}, body: mainReq ? `<html><head><title>${useIden}</title></head><body><div>${JSON.stringify(torrentData.saved)}</div></body></html>` : JSON.stringify(torrentData.saved)})

const useIden = torrentData.address || torrentData.infohash
const useName = `bt://${useIden}`
const useLink = `${useName}${torrentData.path}`
torrentData.saved.forEach((data, i) => {torrentData.saved[i] = path.join(useName, data).replace(/\\/g, '/')})
useHeaders['X-Link'] = useLink
torrentData.saved.forEach((data, i) => {torrentData.saved[i] = 'bt://' + path.join(useIden, data).replace(/\\/g, '/')})
useHeaders['X-Link'] = `bt://${useIden}${torrentData.path}`
useHeaders['Link'] = `<${useHeaders['X-Link']}>; rel="canonical"`

@@ -316,4 +312,4 @@ return sendTheData(signal, { status: 200, headers: { 'Content-Length': String(torrentData.length), 'Content-Type': mainRes, ...useHeaders }, body: mainReq ? `<html><head><title>${useIden}</title></head><body><div>${JSON.stringify(torrentData.saved)}</div></body></html>` : JSON.stringify(torrentData.saved) })

const useIden = torrentData.address || torrentData.infohash || torrentData.id
const useLink = `bt://${useIden}${torrentData.path}`
useHead['X-Link'] = useLink
const useLink = `bt://${torrentData.id}${torrentData.path}`
useHead['X-Link'] = `bt://${useIden}${torrentData.path}`
useHead['Link'] = `<${useHead['X-Link']}>; rel="canonical"`

@@ -337,3 +333,3 @@

app.checkId.clear()
clearInterval(app.updateRoutine)
clearInterval(app.session)
resolve()

@@ -340,0 +336,0 @@ }

{
"name": "list-fetch",
"version": "28.0.4",
"version": "28.0.5",
"description": "coming soon",

@@ -24,3 +24,3 @@ "main": "index.js",

"range-parser": "^1.2.1",
"torrentz": "^10.0.1"
"torrentz": "^10.0.2"
},

@@ -27,0 +27,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc