def person_updated(self, origin): if not origin - set(['CropFrame']): return if self.person.current_photo_id is None: return if self.photo is not None and self.photo.id == self.person.current_photo_id: return if self.photo is not None: self.photo.updated.disconnect(self.photo_updated) self.photo = Photo.get(id=self.person.current_photo_id) self.photo.updated.connect(self.photo_updated) self.photo_load_retries = 0 self.photo_updated(set(['init']))
def photodownload_error(self, id, msg): photo = Photo.get(id=id) photo.update_load_failed(True, origin='load_failed')