fixed slingit

This commit is contained in:
Ulf Gebhardt 2017-05-29 14:16:16 +02:00
parent 7d2140dc22
commit 818aa466fd
2 changed files with 10 additions and 4 deletions

3
.htaccess Normal file
View File

@ -0,0 +1,3 @@
RewriteEngine On
RewriteRule ^files/([^/]+)/([^/]+)$ api.php?call=files&cat=$1&id=$2 [L]
RewriteRule ^cache/([^/]+)/([^/]+)$ api.php?call=cache&id=$1&ident=$2 [L]

View File

@ -1,6 +1,6 @@
var client = new WebTorrent({
tracker: {rtcConfig: { iceServers: [ {url: "stun:23.21.150.121"},
{url: "stun:stun.1.google.com:19302"}]}}
tracker: {rtcConfig: { iceServers: [ {urls: "stun:23.21.150.121"},
{urls: "stun:stun.1.google.com:19302"}]}}
});
function init_start(){
@ -196,7 +196,10 @@ function onTorrent (torrent) {
function slingit_download(client,hash){
log_initialize();
var magnetUri = 'magnet:?xt=urn:btih:' + hash + '&tr=wss://tracker.webtorrent.io';
var magnetUri = 'magnet:?xt=urn:btih:' + hash + '&tr=wss://tracker.openwebtorrent.com';
console.log(magnetUri);
client.add(magnetUri, onTorrent);
client.add(magnetUri, {announce: [
'wss://tracker.openwebtorrent.com',
'wss://tracker.btorrent.xyz'
]},onTorrent);
}