mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-19 07:32:05 +00:00
fix: force add trackers
fix: only preload http torrent files fix: include OTF fonts
This commit is contained in:
parent
5f73799ce4
commit
e5abb02a7d
3 changed files with 4 additions and 3 deletions
|
|
@ -111,7 +111,8 @@ class TorrentClient extends WebTorrent {
|
|||
'wss://tracker.openwebtorrent.com',
|
||||
'wss://tracker.webtorrent.dev',
|
||||
'wss://tracker.files.fm:7073/announce',
|
||||
'wss://tracker.btorrent.xyz/'
|
||||
'wss://tracker.btorrent.xyz/',
|
||||
atob('aHR0cDovL255YWEudHJhY2tlci53Zjo3Nzc3L2Fubm91bmNl')
|
||||
]
|
||||
})
|
||||
break
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ export default class Parser {
|
|||
})
|
||||
parser.on('file', file => {
|
||||
if (this.destroyed) return
|
||||
if (file.mimetype.toLowerCase().includes('font') || file.filename.toLowerCase().endsWith('.ttf')) {
|
||||
if (file.mimetype.toLowerCase().includes('font') || file.filename.toLowerCase().endsWith('.otf')) {
|
||||
const data = new Uint8Array(file.data)
|
||||
this.client.dispatch('file', { mimetype: file.mimetype, data }, [data.buffer])
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ export async function add (torrentID, hide) {
|
|||
console.info('Torrent: adding torrent', { torrentID })
|
||||
files.set([])
|
||||
if (!hide) page.set('player')
|
||||
if (typeof torrentID === 'string' && !torrentID.startsWith('magnet:')) {
|
||||
if (typeof torrentID === 'string' && torrentID.startsWith('http')) {
|
||||
// IMPORTANT, this is because node's get bypasses proxies, wut????
|
||||
const res = await fetch(torrentID)
|
||||
torrentID = new Uint8Array(await res.arrayBuffer())
|
||||
|
|
|
|||
Loading…
Reference in a new issue