def recreate_photo(self): try: data = doubanfs.get("/me/card/%s/photo/%s/%s" % (self.id, self.photo_id, Cate.ORIGIN)) d = scale(data, Cate.LARGE, DEFAULT_CONFIG) doubanfs.set("/me/card/%s/photo/%s/%s" % (self.id, self.photo_id, Cate.LARGE), d) except: print "doubanfs write fail!!! %s" % self.id
def photo_data(self, id, cate=Cate.LARGE): if not id: id = self.photo_id if id > 0: return doubanfs.get("/me/card/%s/photo/%s/%s" % (self.id, id, cate))
def photo_data(self, cate): return doubanfs.get("/me/evp-%s-%s-%s" % (self.event_id, self.id, cate))
def photo_data(self, cate): if self.photo_id > 0: return doubanfs.get("/me/evc%s-%s-%s" % (self.id, self.photo_id, cate))
def audio_data(self, cate=Cate.ORIGIN): if self.audio_id > 0: return doubanfs.get("/me/ba%s-%s-%s" % (self.id, self.audio_id, cate))