def setDisplayingPlaylist(self, playlist_image_url, playlist): try: rds.set("displaying_list_image_url", playlist_image_url) rds.delete("displaying_playlist") print "displaying_playlist:" print json.dumps(playlist) rds.set("displaying_playlist", json.dumps(playlist)) except: print "set displaying_playlist failed"
def changePlayinglist(self, media): if media == 'music': rds.delete("playing_playlist") print "deleted" rds.set('playing_media', "music") displaylist_dumps = rds.get("displaying_playlist") print "dump success" rds.set("playing_playlist", displaylist_dumps) print "restore success" self.playing_playlist = json.loads(rds.get("playing_playlist"), encoding='utf-8', cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None)