public function update() { // update info + episodes from tvrage $tvrage = new TVRage(); $tvrage->update($this); if ($this->tvdb_id == 0) { $this->findTVDB(); } if ($this->tvdb_id != 0) { // get info from tvdb $tvdb = new TVDB(); $tvdb->update($this); } // cache images $localStore = nzbVR::instance()->localStore; $shouldSave = false; if ($this->banner != null) { $localStore->storeImage("series/banners", TVDB::imageURL($this->banner)); $shouldSave = true; } if ($this->poster != null) { $localStore->storeImage("series/poster", TVDB::imageURL($this->poster)); $shouldSave = true; } if ($this->fanart != null) { $localStore->storeImage("series/fanart", TVDB::imageURL($this->fanart)); $shouldSave = true; } if ($shouldSave) { $localStore->save(); } }