// perform an initial update on the newly added feed
// perform an initial update on the newly added feed
$this->feedUpdate($feedID, true);
$this->feedUpdate($feedID, true, $scrape);
} catch (\Throwable $e) {
} catch (\Throwable $e) {
// if the update fails, delete the feed we just added
// if the update fails, delete the feed we just added
$this->db->prepare('DELETE from arsse_feeds where id = ?', 'int')->run($feedID);
$this->db->prepare('DELETE from arsse_feeds where id = ?', 'int')->run($feedID);
@ -1126,8 +1128,9 @@ class Database {
*
*
* @param integer $feedID The numerical identifier of the newsfeed to refresh
* @param integer $feedID The numerical identifier of the newsfeed to refresh
* @param boolean $throwError Whether to throw an exception on failure in addition to storing error information in the database
* @param boolean $throwError Whether to throw an exception on failure in addition to storing error information in the database
* @param boolean|null $scrapeOverride If not null, overrides information in the database signaling whether or not to scrape full-article content. This is intended for when there are no subscriptions for the feed in the database yet
*/
*/
public function feedUpdate($feedID, bool $throwError = false): bool {
public function feedUpdate($feedID, bool $throwError = false, ?bool $scrapeOverride = null): bool {