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