Skip to content

Commit

Permalink
Merge pull request #299 from akerssies/master
Browse files Browse the repository at this point in the history
Added new, seen and downloaded elements to newznab.
  • Loading branch information
mesa57 committed Apr 11, 2017
2 parents e6f2c42 + 3904dc0 commit 8369830
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions lib/page/SpotPage_newznabapi.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,31 @@ function showResults($spots, $offset, $outputtype) {
$attr->setAttribute('value', $spot['commentcount']);
$item->appendChild($attr);
} # if
if($this->_tplHelper->isSpotNew($spot)) {
$attr = $doc->createElement("new", "true");
$item->appendChild($attr);
}
else {
$attr = $doc->createElement("new", "false");
$item->appendChild($attr);
}
if(!empty($spot["hasbeenseen"])) {
$attr = $doc->createElement("seen", "true");
$item->appendChild($attr);
}
else {
$attr = $doc->createElement("seen", "false");
$item->appendChild($attr);

}
if(!empty($spot["hasbeendownloaded"])) {
$attr = $doc->createElement("downloaded", "true");
$item->appendChild($attr);
}
else {
$attr = $doc->createElement("downloaded", "false");
$item->appendChild($attr);
}
} # foreach

$this->sendContentTypeHeader('xml');
Expand Down

0 comments on commit 8369830

Please sign in to comment.