|
@@ 117-127 (lines=11) @@
|
| 114 |
|
if($dbTitleData = $this->Tracker->title->getID($titleURL, (int) $site['id'], FALSE, TRUE)) { |
| 115 |
|
if($this->sites->{$site['site_class']}->doCustomCheck($dbTitleData['latest_chapter'], $titleData['latest_chapter'])) { |
| 116 |
|
$titleID = $dbTitleData['id']; |
| 117 |
|
if($this->Tracker->title->updateByID((int) $titleID, $titleData['latest_chapter'])) { |
| 118 |
|
//Make sure last_checked is always updated on successful run. |
| 119 |
|
//CHECK: Is there a reason we aren't just doing this in updateByID? |
| 120 |
|
$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE) |
| 121 |
|
->where('id', $titleID) |
| 122 |
|
->update('tracker_titles'); |
| 123 |
|
|
| 124 |
|
print " - ({$titleData['latest_chapter']})\n"; |
| 125 |
|
} else { |
| 126 |
|
print " - Title doesn't exist? ($titleID)\n"; |
| 127 |
|
} |
| 128 |
|
} else { |
| 129 |
|
print " - Failed Check (DB: '{$dbTitleData['latest_chapter']}' || UPDATE: '{$titleData['latest_chapter']}')\n"; |
| 130 |
|
} |
|
@@ 224-228 (lines=5) @@
|
| 221 |
|
} |
| 222 |
|
|
| 223 |
|
//We might as well try to update as well. |
| 224 |
|
if($this->Tracker->title->updateByID((int) $row->id, $titleData['latest_chapter'])) { |
| 225 |
|
$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE) |
| 226 |
|
->where('id', $row->id) |
| 227 |
|
->update('tracker_titles'); |
| 228 |
|
} |
| 229 |
|
} else { |
| 230 |
|
log_message('error', "{$row->title} failed to update title successfully"); |
| 231 |
|
print " - FAILED TO PARSE\n"; |