/** @var integer Maximum size, in bytes, of data when fetching feeds from foreign servers */
/** @var integer Maximum size, in bytes, of data when fetching feeds from foreign servers */
public $fetchSizeLimit = 2 * 1024 * 1024;
public $fetchSizeLimit = 2 * 1024 * 1024;
/** @var boolean Whether to allow the possibility of fetching full article contents using an item's URL. Whether fetching will actually happen is also governed by a per-feed setting */
public $fetchEnableScraping = true;
/** @var string User-Agent string to use when fetching feeds from foreign servers */
/** @var string User-Agent string to use when fetching feeds from foreign servers */
public function feedUpdate(int $feedID, bool $throwError = false): bool {
public function feedUpdate(int $feedID, bool $throwError = false): bool {
$tr = $this->db->begin();
$tr = $this->db->begin();
// check to make sure the feed exists
// check to make sure the feed exists
$f = $this->db->prepare("SELECT url, username, password, modified, etag, err_count FROM arsse_feeds where id is ?", "int")->run($feedID)->getRow();
$f = $this->db->prepare("SELECT url, username, password, modified, etag, err_count, scrape FROM arsse_feeds where id is ?", "int")->run($feedID)->getRow();
// if the feed hasn't changed, just compute the next fetch time and record it
// if the feed hasn't changed, just compute the next fetch time and record it
$this->db->prepare("UPDATE arsse_feeds SET updated = CURRENT_TIMESTAMP, next_fetch = ? WHERE id is ?", 'datetime', 'int')->run($feed->nextFetch, $feedID);
$this->db->prepare("UPDATE arsse_feeds SET updated = CURRENT_TIMESTAMP, next_fetch = ? WHERE id is ?", 'datetime', 'int')->run($feed->nextFetch, $feedID);