mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-31 10:18:55 +00:00
update apinfo.tpl and Parsing.
This commit is contained in:
@@ -33,7 +33,7 @@ class Parsing
|
||||
$this->parsprocessed = 0;
|
||||
$this->releasefilesprocessed = 0;
|
||||
$this->cleanup = ['nuke' => [], 'misc' => []];
|
||||
$this->pdo = new newznab\db\Settings();
|
||||
$this->pdo = new Settings();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1439,43 +1439,43 @@ class Parsing
|
||||
while (preg_match('/^(\:|\"|\-| |\_)+/', $r['searchname'])) {
|
||||
$r['searchname'] = substr($r['searchname'], 1);
|
||||
}
|
||||
$this->updateName($this->pdo, $r['id'], $oldname, $r['searchname']);
|
||||
$this->updateName($r['id'], $oldname, $r['searchname']);
|
||||
}
|
||||
if (preg_match('/^000\-/', $r['searchname'])) {
|
||||
while (preg_match('/^000\-/', $r['searchname'])) {
|
||||
$r['searchname'] = substr($r['searchname'], 4);
|
||||
}
|
||||
$this->updateName($this->pdo, $r['id'], $oldname, $r['searchname']);
|
||||
$this->updateName($r['id'], $oldname, $r['searchname']);
|
||||
}
|
||||
if (preg_match('/(\:|\"|\-| |\/)$/', $r['searchname'])) {
|
||||
while (preg_match('/(\:|\"|\-| |\/)$/', $r['searchname'])) {
|
||||
$r['searchname'] = substr($r['searchname'], 0, -1);
|
||||
}
|
||||
$this->updateName($this->pdo, $r['id'], $oldname, $r['searchname']);
|
||||
$this->updateName($r['id'], $oldname, $r['searchname']);
|
||||
}
|
||||
if (preg_match('/\"/', $r['searchname'])) {
|
||||
while (preg_match('/\"/', $r['searchname'])) {
|
||||
$r['searchname'] = str_replace('"', '', $r['searchname']);
|
||||
}
|
||||
$this->updateName($this->pdo, $r['id'], $oldname, $r['searchname']);
|
||||
$this->updateName($r['id'], $oldname, $r['searchname']);
|
||||
}
|
||||
if (preg_match('/\-\d{1}$/', $r['searchname'])) {
|
||||
while (preg_match('/\-\d{1}$/', $r['searchname'])) {
|
||||
$r['searchname'] = preg_replace('/\-\d{1}$/', '', $r['searchname']);
|
||||
}
|
||||
$this->updateName($this->pdo, $r['id'], $oldname, $r['searchname']);
|
||||
$this->updateName($r['id'], $oldname, $r['searchname']);
|
||||
}
|
||||
if (preg_match('/\!+.*?mom.*?\!+/i', $r['searchname'])) {
|
||||
while (preg_match('/\!+.*?mom.*?\!+/i', $r['searchname'])) {
|
||||
$r['searchname'] = preg_replace('/\!+.*?mom.*?\!+/i', '', $r['searchname']);
|
||||
}
|
||||
$this->updateName($this->pdo, $r['id'], $oldname, $r['searchname']);
|
||||
$this->updateName($r['id'], $oldname, $r['searchname']);
|
||||
}
|
||||
if (preg_match('/(\\/)/i', $r['searchname'])) {
|
||||
while (preg_match('/(\\/)/i', $r['searchname'])) {
|
||||
$r['searchname'] = preg_replace('/(\\/)/i', '', $r['searchname']);
|
||||
}
|
||||
$this->updateName($this->pdo, $r['id'], $oldname, $r['searchname']);
|
||||
$this->updateName($r['id'], $oldname, $r['searchname']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1483,12 +1483,11 @@ class Parsing
|
||||
/**
|
||||
* update a release name
|
||||
*
|
||||
* @param Settings $pdo
|
||||
* @param $id
|
||||
* @param $oldname
|
||||
* @param $newname
|
||||
*/
|
||||
private function updateName(Settings $pdo, $id, $oldname, $newname)
|
||||
private function updateName($id, $oldname, $newname)
|
||||
{
|
||||
if ($this->verbose)
|
||||
echo sprintf("OLD : %s\nNEW : %s\n\n", $oldname, $newname);
|
||||
|
||||
@@ -1,10 +1,24 @@
|
||||
{$rsshead}
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:newznab="{$serverroot}rss-info/">
|
||||
<channel>
|
||||
<atom:link href="{$serverroot}{$smarty.server.REQUEST_URI|escape:"htmlall"|substr:1}" rel="self" type="application/rss+xml" />
|
||||
<title>{$site->title|escape}</title>
|
||||
<description>{$site->title|escape} Nzb Feed</description>
|
||||
<link>{$serverroot}</link>
|
||||
<language>en-gb</language>
|
||||
<webMaster>{$site->email} ({$site->title|escape})</webMaster>
|
||||
<category>{$site->meta_keywords}</category>
|
||||
<image>
|
||||
<url>{$serverroot}templates/nntmux/images/logo.png</url>
|
||||
<title>{$site->title|escape}</title>
|
||||
<link>{$serverroot}</link>
|
||||
<description>Visit {$site->title|escape} - {$site->strapline|escape}</description>
|
||||
</image>
|
||||
<item>
|
||||
<title>{$release.searchname|escape:"htmlall"}</title>
|
||||
<guid isPermaLink="true">{$serverroot}details/{$release.guid}</guid>
|
||||
<link>{$serverroot}nfo/{$release.guid}</link>
|
||||
<pubDate>{$release.postdate|phpdate_format:"DATE_RSS"}</pubDate>
|
||||
<pubDate>{$release.postdate|phpdate_format:"DATE_RSS"}</pubDate>
|
||||
<description>{$nfoutf|escape:"htmlall"}</description>
|
||||
<enclosure url="{$serverroot}api?t=getnfo&id={$release.guid}&raw=1&i={$uid}&r={$rsstoken}" length="{$nfoutf|count_characters:true}" type="text/x-nfo" />
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user