|
@@ 74-82 (lines=9) @@
|
| 71 |
|
if(is_array($titleData) && !is_null($titleData['latest_chapter'])) { |
| 72 |
|
//FIXME: "At the moment" we don't seem to be doing anything with TitleData['last_updated']. |
| 73 |
|
// Should we even use this? Y/N |
| 74 |
|
if($this->Tracker->title->updateByID((int) $row->id, $titleData['latest_chapter'])) { |
| 75 |
|
//Make sure last_checked is always updated on successful run. |
| 76 |
|
//CHECK: Is there a reason we aren't just doing this in updateByID? |
| 77 |
|
$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE) |
| 78 |
|
->where('id', $row->id) |
| 79 |
|
->update('tracker_titles'); |
| 80 |
|
|
| 81 |
|
print " - ({$titleData['latest_chapter']})\n"; |
| 82 |
|
} |
| 83 |
|
} else { |
| 84 |
|
log_message('error', "{$row->title} failed to update successfully"); |
| 85 |
|
print " - FAILED TO PARSE\n"; |
|
@@ 110-120 (lines=11) @@
|
| 107 |
|
if($dbTitleData = $this->Tracker->title->getID($titleURL, (int) $site['id'], FALSE, TRUE)) { |
| 108 |
|
if($this->sites->{$site['site_class']}->doCustomCheck($dbTitleData['latest_chapter'], $titleData['latest_chapter'])) { |
| 109 |
|
$titleID = $dbTitleData['id']; |
| 110 |
|
if($this->Tracker->title->updateByID((int) $titleID, $titleData['latest_chapter'])) { |
| 111 |
|
//Make sure last_checked is always updated on successful run. |
| 112 |
|
//CHECK: Is there a reason we aren't just doing this in updateByID? |
| 113 |
|
$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE) |
| 114 |
|
->where('id', $titleID) |
| 115 |
|
->update('tracker_titles'); |
| 116 |
|
|
| 117 |
|
print " - ({$titleData['latest_chapter']})\n"; |
| 118 |
|
} else { |
| 119 |
|
print " - Title doesn't exist? ($titleID)\n"; |
| 120 |
|
} |
| 121 |
|
} else { |
| 122 |
|
print " - Failed Check.\n"; |
| 123 |
|
} |
|
@@ 181-185 (lines=5) @@
|
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
//We might as well try to update as well. |
| 181 |
|
if($this->Tracker->title->updateByID((int) $row->id, $titleData['latest_chapter'])) { |
| 182 |
|
$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE) |
| 183 |
|
->where('id', $row->id) |
| 184 |
|
->update('tracker_titles'); |
| 185 |
|
} |
| 186 |
|
} else { |
| 187 |
|
log_message('error', "{$row->title} failed to update title successfully"); |
| 188 |
|
print " - FAILED TO PARSE\n"; |