Skip to content

Commit

Permalink
fix: re-add WEBTORRENT_ANNOUNCE which is used for adding websocket tr…
Browse files Browse the repository at this point in the history
…ackers to magnetURIs which do not already have them.
  • Loading branch information
SilentBot1 committed Jun 2, 2024
1 parent 7698287 commit 98ea11a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/global.js
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
import { announceList } from 'create-torrent'

globalThis.WEBTORRENT_ANNOUNCE = announceList
.map(arr => arr[0])
.filter(url => url.indexOf('wss://') === 0 || url.indexOf('ws://') === 0)

console.warn('webtorrent-hybrid: This package is deprecated as of WebTorrent >= 2.3.0 as native WebRTC support has been added to WebTorrent. Please switch to using the "webtorrent" package.')
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"deprecated": "This package is deprecated as of WebTorrent >= 2.3.0 as native WebRTC support has been added to WebTorrent. Please switch to using the \"webtorrent\" package.",
"dependencies": {
"create-torrent": "^6.0.17",
"webtorrent": "^2.3.0",
"webtorrent-cli": "^4.0.0"
},
Expand Down

0 comments on commit 98ea11a

Please sign in to comment.