Hides the lyric field if there is no lyric available in audio posts

This commit is contained in:
Manuel Cortez 2016-02-26 13:27:30 -06:00
parent 6499904f0f
commit 44079d19d2

View File

@ -252,6 +252,8 @@ class audio(postController):
if post.has_key("lyrics_id"): if post.has_key("lyrics_id"):
l = self.session.vk.client.audio.getLyrics(lyrics_id=int(post["lyrics_id"])) l = self.session.vk.client.audio.getLyrics(lyrics_id=int(post["lyrics_id"]))
self.dialog.set("lyric", l["text"]) self.dialog.set("lyric", l["text"])
else:
self.dialog.change_state("lyric", False)
def download(self, *args, **kwargs): def download(self, *args, **kwargs):
post = self.post[self.dialog.get_audio()] post = self.post[self.dialog.get_audio()]