示例#1
0
文件: card.py 项目: fordream/me
 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
示例#2
0
文件: card.py 项目: fordream/me
 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))
示例#3
0
文件: event.py 项目: leonsim/me
 def photo_data(self, cate):
     return doubanfs.get("/me/evp-%s-%s-%s" % (self.event_id, self.id, cate))
示例#4
0
文件: event.py 项目: leonsim/me
 def photo_data(self, cate):
     if self.photo_id > 0:
         return doubanfs.get("/me/evc%s-%s-%s" % (self.id, self.photo_id, cate))
示例#5
0
文件: blog.py 项目: leonsim/me
 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))