mirror of
https://gitee.com/ledc/IYUUAutoReseed
synced 2025-06-13 12:18:56 +00:00
修复因城市下载种子时302,导致下载器添加失败的bug
This commit is contained in:
15
iyuu.cn.php
15
iyuu.cn.php
@ -238,7 +238,11 @@ class iyuuAutoReseed
|
||||
{
|
||||
try
|
||||
{
|
||||
$result = self::$links[$rpcKey]['rpc']->add( $torrent, $save_path, $extra_options ); // 种子URL添加下载任务
|
||||
if( (strpos($torrent,'http://')===0) || (strpos($torrent,'https://')===0) ){
|
||||
$result = self::$links[$rpcKey]['rpc']->add( $torrent, $save_path, $extra_options ); // 种子URL添加下载任务
|
||||
} else{
|
||||
$result = self::$links[$rpcKey]['rpc']->add_metainfo( $torrent, $save_path, $extra_options ); // 种子元数据添加下载任务
|
||||
}
|
||||
// 调试
|
||||
#p($result);
|
||||
// 下载服务器类型 判断
|
||||
@ -254,7 +258,9 @@ class iyuuAutoReseed
|
||||
$name = $result->arguments->torrent_added->name;
|
||||
}
|
||||
print "********RPC添加下载任务成功 [{$result->result}] (id=$id) \n";
|
||||
print "种子:".$torrent. "\n";
|
||||
if( (strpos($torrent,'http://')===0) || (strpos($torrent,'https://')===0) ){
|
||||
print "种子:".$torrent. "\n";
|
||||
}
|
||||
print "名字:".$name."\n\n";
|
||||
return true;
|
||||
}else{
|
||||
@ -393,7 +399,12 @@ class iyuuAutoReseed
|
||||
// case 'hdchina':
|
||||
// break;
|
||||
case 'hdcity':
|
||||
print "种子:".$_url. "\n";
|
||||
$url = $_url."&cuhash=". $configALL[$sites[$sitesID]['site']]['passkey'];
|
||||
$cookie = isset($configALL[$sites[$sitesID]['site']]['cookie']) ? $configALL[$sites[$sitesID]['site']]['cookie'] : '';
|
||||
$userAgent = $configALL['default']['userAgent'];
|
||||
// 城市下载种子时会302转向
|
||||
$url = download($url, $cookie, $userAgent);
|
||||
break;
|
||||
default:
|
||||
$url = $_url."&passkey=". $configALL[$sites[$sitesID]['site']]['passkey'];
|
||||
|
@ -40,6 +40,12 @@
|
||||
),
|
||||
```
|
||||
|
||||
#### 问:为何HDCITY站点配置了密钥,自动辅种一直提示失败?
|
||||
|
||||
答:安全设定里面的key密钥是上报Tracker专用;下载种子的密钥是cuhash参数,获取方法为:打开种子列表,在下载种子的图标上面,点击"右键" - "复制链接地址",粘贴到别处后,仅复制`cuhash=`后面的字符串即可;
|
||||
|
||||
例如:`https://xxx.xxx/download?id=38982&cuhash=0b00000000000000000000000c9`,仅复制`0b00000000000000000000000c9`。
|
||||
|
||||
#### 问:如何升级到最新版本?
|
||||
|
||||
答:从github或码云仓库,下载最新的源码,覆盖到本地即可。
|
||||
|
Reference in New Issue
Block a user