Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jan 5, 2017
1 parent 643e881 commit 7cc64d6
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 24 deletions.
Empty file modified conf/access-swap.sh 100644 → 100755
Empty file.
7 changes: 3 additions & 4 deletions plugins/extsearch/engines/KinozalTV.php
Expand Up @@ -2,7 +2,7 @@

class KinozalTVEngine extends commonEngine
{
public $defaults = array( "public"=>false, "page_size"=>40, "cookies"=>"kinozal.me|uid=XXX;pass=XXX;" );
public $defaults = array( "public"=>false, "page_size"=>40, "cookies"=>"kinozal-tv.appspot.com|uid=XXX;pass=XXX;" );

public $categories = array( 'all'=>'0',
'Кино - Сериал'=>'5',
Expand Down Expand Up @@ -90,7 +90,7 @@ protected static function formatTime($time)
public function action($what,$cat,&$ret,$limit,$useGlobalCats)
{
$added = 0;
$url = 'http://kinozal.me';
$url = 'https://kinozal-tv.appspot.com';
if($useGlobalCats)
$categories = array( 'all'=>'0', 'tv'=>'5', 'games'=>'23', 'anime'=>'20', 'software'=>'32', 'pictures'=>'40', 'books'=>'41' );
else
Expand All @@ -110,13 +110,12 @@ public function action($what,$cat,&$ret,$limit,$useGlobalCats)
break;

$res = preg_match_all('|<tr class=bg><td class="bt"><img src=.* onclick="cat(?P<cat>.*);".*'.
'<a href="/details.php\?id=(?P<id>\d+)".*>(?P<name>.*)</a>.*'.
'<a href="/details.php\?.*id=(?P<id>\d+)".*>(?P<name>.*)</a>.*'.
'<td class=.*>\d+</td>.*'.
'<td class=.*>(?P<size>.*)</td>.*'.
'<td class=.*>(?P<leech>.*)</td>.*'.
'<td class=.*>(?P<seeds>.*)</td>.*'.
'<td class=.*>(?P<date>.*)</td>|siU', $cli->results, $matches);

if($res)
{
for($i=0; $i<$res; $i++)
Expand Down
2 changes: 1 addition & 1 deletion plugins/extsearch/engines/NNMClub.php
Expand Up @@ -3,7 +3,7 @@
class NNMClubEngine extends commonEngine
{
public $defaults = array( "public"=>false, "page_size"=>50, "auth"=>1 );
public $url = 'http://nnmclub.to';
public $url = 'https://nnmclub.to';
public $categories = array( 'all'=>"&f[]=-1" );

protected function parseTList($results,&$added,&$ret,$limit)
Expand Down
6 changes: 3 additions & 3 deletions plugins/extsearch/engines/RUTracker.php
Expand Up @@ -27,14 +27,14 @@ protected function parseTList($results,&$added,&$ret,$limit)
{
$item = $this->getNewEntry();
$item["cat"] = self::toUTF(self::removeTags($matches["cat"][$i],"CP1251"),"CP1251");
$item["desc"] = "http://rutracker.cr/forum/viewtopic.php?t=".$matches["id"][$i];
$item["desc"] = "https://rutracker.cr/forum/viewtopic.php?t=".$matches["id"][$i];
$item["name"] = self::toUTF(self::removeTags($matches["name"][$i],"CP1251"),"CP1251");
$item["size"] = floatval($matches["size"][$i]);
$item["time"] = floatval($matches["date"][$i]);
$item["seeds"] = intval(self::removeTags($matches["seeds"][$i]));
$item["peers"] = intval(self::removeTags($matches["leech"][$i]));
if (substr($link, 0, 2) === 'dl') {
$link = 'http://rutracker.cr/forum/'.$link;
$link = 'https://rutracker.cr/forum/'.$link;
}
$ret[$link] = $item;
$added++;
Expand All @@ -51,7 +51,7 @@ protected function parseTList($results,&$added,&$ret,$limit)
public function action($what,$cat,&$ret,$limit,$useGlobalCats)
{
$added = 0;
$url = 'http://rutracker.cr';
$url = 'https://rutracker.cr';
if($useGlobalCats)
$categories = array( 'all'=>'&f[]=-1',
'games'=>'&f[]=5&f[]=635&f[]=139&f[]=959&f[]=127&f[]=53&f[]=1008&f[]=51&f[]=961&f[]=962&f[]=54&f[]=55&f[]=52&f[]=900&f[]=246&f[]=278&f[]=128&f[]=2115&f[]=2116&f[]=2117&f[]=2118&f[]=2119&f[]=50&f[]=2142&f[]=2143&f[]=2145&f[]=2146&f[]=637&f[]=642&f[]=643&f[]=644&f[]=645&f[]=646&f[]=647&f[]=649&f[]=1098&f[]=650&f[]=548&f[]=129&f[]=908&f[]=357&f[]=510&f[]=887&f[]=1116&f[]=973&f[]=773&f[]=774&f[]=968&f[]=546',
Expand Down
4 changes: 2 additions & 2 deletions plugins/loginmgr/accounts/KinozalTV.php
Expand Up @@ -2,7 +2,7 @@

class KinozalTVAccount extends commonAccount
{
public $url = "http://kinozal.me";
public $url = "https://kinozal-tv.appspot.com";

protected function isOK($client)
{
Expand All @@ -26,6 +26,6 @@ protected function login($client,$login,$password,&$url,&$method,&$content_type,
}
public function test($url)
{
return(preg_match( "/(\.|\/)kinozal.(tv|me)\//si", $url ));
return(preg_match( "/(\.|\/)(kinozal|kinozal-tv.appspot).(tv|me|com)\//si", $url ));
}
}
2 changes: 1 addition & 1 deletion plugins/loginmgr/accounts/NNMClub.php
Expand Up @@ -2,7 +2,7 @@

class NNMClubAccount extends commonAccount
{
public $url = "http://nnmclub.to";
public $url = "https://nnmclub.to";

protected function isOK($client)
{
Expand Down
10 changes: 5 additions & 5 deletions plugins/loginmgr/accounts/RUTracker.php
Expand Up @@ -2,7 +2,7 @@

class ruTrackerAccount extends commonAccount
{
public $url = "http://login.rutracker.cr";
public $url = "https://rutracker.cr";

protected function isOK($client)
{
Expand All @@ -13,7 +13,7 @@ protected function updateCached($client,&$url,&$method,&$content_type,&$body)
$id = $this->getDownloadId($url);
if($id!==false)
{
$client->referer = "http://rutracker.cr/forum/viewtopic.php?t=".$id;
$client->referer = "https://rutracker.cr/forum/viewtopic.php?t=".$id;
$client->cookies["bb_dl"]=$id;
$method = "POST";
$content_type = "application/x-www-form-urlencoded";
Expand All @@ -34,13 +34,13 @@ protected function login($client,$login,$password,&$url,&$method,&$content_type,
if($id===false)
{
$redirect = $url;
$referer = "http://rutracker.cr/forum/index.php";
$referer = "https://rutracker.cr/forum/index.php";
$is_result_fetched = true;
}
else
{
$redirect = "http://rutracker.cr/forum/viewtopic.php?t=".$id;
$referer = "http://rutracker.cr/forum/viewtopic.php?t=".$id;
$redirect = "https://rutracker.cr/forum/viewtopic.php?t=".$id;
$referer = "https://rutracker.cr/forum/viewtopic.php?t=".$id;
}
if($client->fetch( $this->url."/forum/login.php","POST","application/x-www-form-urlencoded",
"redirect=".rawurlencode($redirect)."&login_username=".rawurlencode($login)."&login_password=".rawurlencode($password)."&login=%C2%F5%EE%E4" ))
Expand Down
9 changes: 4 additions & 5 deletions plugins/rutracker_check/trackers/kinozal.php
Expand Up @@ -4,22 +4,21 @@ class KinozalCheckImpl
{
static public function download_torrent($url, $hash, $old_torrent)
{
if (preg_match('`^http://(?P<tracker>kinozal)\.(tv|me)/details\.php\?id=(?P<id>\d+)$`', $url, $matches)) {
$topic_id = $matches["id"];
$client = ruTrackerChecker::makeClient("http://kinozal.me/get_srv_details.php?action=2&id=".$topic_id);
if (preg_match('`^http://kinozal\.(tv|me)/details\.php\?id=(?P<id>\d+)$`', $url, $matches)) {
$client = ruTrackerChecker::makeClient("https://kinozal-tv.appspot.com/get_srv_details.php?action=2&id=".$matches["id"]);
if ($client->status != 200) return ruTrackerChecker::STE_CANT_REACH_TRACKER;
if (preg_match('`<li>.*(?P<hash>[0-9A-Fa-f]{40})</li>`', $client->results, $matches1)) {
if (strtoupper($matches1["hash"])==$hash) {
return ruTrackerChecker::STE_UPTODATE;
}
}
$client->setcookies();
$client->fetchComplex("http://dl.kinozal.me/download.php?id=".$matches["id"]);
$client->fetchComplex("https://kinozal-tv.appspot.com/dl./download.php?id=".$matches["id"]);
if ($client->status != 200) return (($client->status < 0) ? ruTrackerChecker::STE_CANT_REACH_TRACKER : ruTrackerChecker::STE_DELETED);
return ruTrackerChecker::createTorrent($client->results, $hash);
}
return ruTrackerChecker::STE_NOT_NEED;
}
}

ruTrackerChecker::registerTracker("/kinozal\./", "/kinozal\.tv|torrent4me\.com/", "KinozalCheckImpl::download_torrent");
ruTrackerChecker::registerTracker("/kinozal\./", "/kinozal\.tv|torrent4me\.com|tor4me\.info|tor2me\.info/", "KinozalCheckImpl::download_torrent");
2 changes: 1 addition & 1 deletion plugins/rutracker_check/trackers/nnmclub.php
Expand Up @@ -12,7 +12,7 @@ static public function download_torrent($url, $hash, $old_torrent)
}
if (preg_match('`\"download.php\?id=(?P<id>\d+)\"`', $client->results, $matches)) {
$client->setcookies();
$client->fetchComplex("http://nnm-club.ws/download.php?id=".$matches["id"]);
$client->fetchComplex("https://nnmclub.to/forum/download.php?id=".$matches["id"]);
if ($client->status != 200) return (($client->status < 0) ? ruTrackerChecker::STE_CANT_REACH_TRACKER : ruTrackerChecker::STE_DELETED);
return ruTrackerChecker::createTorrent($client->results, $hash);
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/rutracker_check/trackers/rutracker.php
Expand Up @@ -15,7 +15,7 @@ static public function download_torrent($url, $hash, $old_torrent)
return ruTrackerChecker::STE_UPTODATE;
}
$client->setcookies();
$client->fetchComplex("http://dl.rutracker.cr/forum/dl.php?t=" . $topic_id);
$client->fetchComplex("https://rutracker.cr/forum/dl.php?t=" . $topic_id);
if ($client->status != 200) return (($client->status < 0) ? ruTrackerChecker::STE_CANT_REACH_TRACKER : ruTrackerChecker::STE_DELETED);
return ruTrackerChecker::createTorrent($client->results, $hash);
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/rutracker_check/trackers/tapocheknet.php
Expand Up @@ -12,7 +12,7 @@ static public function download_torrent($url, $hash, $old_torrent)
}
if (preg_match('`\"download.php\?id=(?P<id>\d+)\"`', $client->results, $matches)) {
$client->setcookies();
$client->fetchComplex("http://tapochek.net/download.php?id=".$matches["id"]);
$client->fetchComplex("https://tapochek.net/download.php?id=".$matches["id"]);
if ($client->status != 200) return (($client->status < 0) ? ruTrackerChecker::STE_CANT_REACH_TRACKER : ruTrackerChecker::STE_DELETED);
return ruTrackerChecker::createTorrent($client->results, $hash);
}
Expand Down
Binary file added plugins/tracklabels/trackers/nnm-club.cc.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/tracklabels/trackers/tor2me.info.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added plugins/tracklabels/trackers/tor4me.info.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7cc64d6

Please sign in to comment.