mirror of
				https://gitee.com/ledc/IYUUAutoReseed
				synced 2025-11-04 10:49:48 +00:00 
			
		
		
		
	提高对旧配置的兼容性
This commit is contained in:
		@@ -13,7 +13,7 @@ use IYUU\Library\Table;
 | 
				
			|||||||
class AutoReseed
 | 
					class AutoReseed
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    // 版本号
 | 
					    // 版本号
 | 
				
			||||||
    const VER = '1.9.2';
 | 
					    const VER = '1.9.3';
 | 
				
			||||||
    // RPC连接
 | 
					    // RPC连接
 | 
				
			||||||
    private static $links = [];
 | 
					    private static $links = [];
 | 
				
			||||||
    // 客户端配置
 | 
					    // 客户端配置
 | 
				
			||||||
@@ -474,6 +474,7 @@ class AutoReseed
 | 
				
			|||||||
                            if ($offset === false) {
 | 
					                            if ($offset === false) {
 | 
				
			||||||
                                ff($siteName. '站点,cookie已过期,请更新后重新辅种!');
 | 
					                                ff($siteName. '站点,cookie已过期,请更新后重新辅种!');
 | 
				
			||||||
                                echo 'cookie已过期,请更新后重新辅种!'.PHP_EOL;
 | 
					                                echo 'cookie已过期,请更新后重新辅种!'.PHP_EOL;
 | 
				
			||||||
 | 
					                                $configALL[$siteName]['cookie'] = '';
 | 
				
			||||||
                                $reseedPass = true;
 | 
					                                $reseedPass = true;
 | 
				
			||||||
                                break;
 | 
					                                break;
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
@@ -524,6 +525,7 @@ class AutoReseed
 | 
				
			|||||||
                                if ($offset === false) {
 | 
					                                if ($offset === false) {
 | 
				
			||||||
                                    ff($siteName. '站点,cookie已过期,请更新后重新辅种!');
 | 
					                                    ff($siteName. '站点,cookie已过期,请更新后重新辅种!');
 | 
				
			||||||
                                    echo 'cookie已过期,请更新后重新辅种!'.PHP_EOL;
 | 
					                                    echo 'cookie已过期,请更新后重新辅种!'.PHP_EOL;
 | 
				
			||||||
 | 
					                                    $configALL[$siteName]['cookie'] = '';
 | 
				
			||||||
                                    $reseedPass = true;
 | 
					                                    $reseedPass = true;
 | 
				
			||||||
                                    break;
 | 
					                                    break;
 | 
				
			||||||
                                }
 | 
					                                }
 | 
				
			||||||
@@ -820,18 +822,18 @@ class AutoReseed
 | 
				
			|||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 获取站点种子的URL
 | 
					     * 获取站点种子的URL
 | 
				
			||||||
     * @param string $site
 | 
					     * @param string $site
 | 
				
			||||||
     * @param string $_url
 | 
					     * @param string $url
 | 
				
			||||||
     * @return string
 | 
					     * @return string
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private static function getTorrentUrl($site = '', $_url = '')
 | 
					    private static function getTorrentUrl($site = '', $url = '')
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        global $configALL;
 | 
					        global $configALL;
 | 
				
			||||||
        // 兼容旧配置
 | 
					        // 兼容旧配置
 | 
				
			||||||
        if (isset($configALL[$site]['passkey']) && $configALL[$site]['passkey']) {
 | 
					        if (isset($configALL[$site]['passkey']) && $configALL[$site]['passkey']) {
 | 
				
			||||||
            if (!isset($configALL[$site]['url_replace'])) {
 | 
					            if (empty($configALL[$site]['url_replace'])) {
 | 
				
			||||||
                $configALL[$site]['url_replace'] = array('{passkey}' => $configALL[$site]['passkey']);
 | 
					                $configALL[$site]['url_replace'] = array('{passkey}' => $configALL[$site]['passkey']);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if (!isset($configALL[$site]['url_join'])) {
 | 
					            if (empty($configALL[$site]['url_join'])) {
 | 
				
			||||||
                $configALL[$site]['url_join'] = array();
 | 
					                $configALL[$site]['url_join'] = array();
 | 
				
			||||||
                if (in_array($site, array('m-team','mocat','hdbd'))) {
 | 
					                if (in_array($site, array('m-team','mocat','hdbd'))) {
 | 
				
			||||||
                    if (isset($configALL[$site]['ip_type'])) {
 | 
					                    if (isset($configALL[$site]['ip_type'])) {
 | 
				
			||||||
@@ -843,7 +845,7 @@ class AutoReseed
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        // 通用操作:替换
 | 
					        // 通用操作:替换
 | 
				
			||||||
        if (isset($configALL[$site]['url_replace']) && $configALL[$site]['url_replace']) {
 | 
					        if (isset($configALL[$site]['url_replace']) && $configALL[$site]['url_replace']) {
 | 
				
			||||||
            $url = strtr($_url, $configALL[$site]['url_replace']);
 | 
					            $url = strtr($url, $configALL[$site]['url_replace']);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        // 通用操作:拼接
 | 
					        // 通用操作:拼接
 | 
				
			||||||
        if (isset($configALL[$site]['url_join']) && $configALL[$site]['url_join']) {
 | 
					        if (isset($configALL[$site]['url_join']) && $configALL[$site]['url_join']) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user