Readded popular and suggested audios

This commit is contained in:
Manuel Cortez 2018-12-18 13:18:21 -06:00
parent 9d2615c221
commit 90999fc3d6
2 changed files with 9 additions and 7 deletions

View File

@ -14,6 +14,8 @@
* Now Socializer will not send a notification every 5 minutes.
* Socializer should handle connection errors when loading items in buffers and retry in 2 minutes. Also, connection errors in the chat server are handled and chat should be able to reconnect by itself.
* When trying to add an audio or video to an album, if the current user does not have any album, it will display an error instead of a traceback.
* Added popular and suggested songs. This will not work when using alternative tokens.
* Updated Russian translations: thanks to Дарья Ратникова.
## Changes in version 0.16 (13.12.2018)

View File

@ -75,7 +75,6 @@ class Controller(object):
self.buffers.append(feed)
# Translators: Own user's wall name in the tree view.
self.window.insert_buffer(feed.tab, _(u"My wall"), self.window.search("posts"))
### Disabled audio stuff for now.
audios = buffers.empty(parent=self.window.tb, name="audios")
self.buffers.append(audios)
# Translators: name for the music category in the tree view.
@ -84,12 +83,13 @@ class Controller(object):
audio = buffers.audioBuffer(parent=self.window.tb, name="me_audio", composefunc="render_audio", session=self.session, endpoint="get", parent_endpoint="audio")
self.buffers.append(audio)
self.window.insert_buffer(audio.tab, _(u"My audios"), self.window.search("audios"))
# p_audio = buffers.audioBuffer(parent=self.window.tb, name="popular_audio", composefunc="render_audio", session=self.session, endpoint="getPopular", parent_endpoint="audio", full_list=True, count=self.session.settings["buffers"]["count_for_audio_buffers"])
# self.buffers.append(p_audio)
# self.window.insert_buffer(p_audio.tab, _(u"Populars"), self.window.search("audios"))
# r_audio = buffers.audioBuffer(parent=self.window.tb, name="recommended_audio", composefunc="render_audio", session=self.session, endpoint="getRecommendations", parent_endpoint="audio", full_list=True, count=self.session.settings["buffers"]["count_for_audio_buffers"])
# self.buffers.append(r_audio)
# self.window.insert_buffer(r_audio.tab, _(u"Recommendations"), self.window.search("audios"))
if self.session.settings["vk"]["use_alternative_tokens"] == False:
p_audio = buffers.audioBuffer(parent=self.window.tb, name="popular_audio", composefunc="render_audio", session=self.session, endpoint="getPopular", parent_endpoint="audio", full_list=True, count=self.session.settings["buffers"]["count_for_audio_buffers"])
self.buffers.append(p_audio)
self.window.insert_buffer(p_audio.tab, _(u"Populars"), self.window.search("audios"))
r_audio = buffers.audioBuffer(parent=self.window.tb, name="recommended_audio", composefunc="render_audio", session=self.session, endpoint="getRecommendations", parent_endpoint="audio", full_list=True, count=self.session.settings["buffers"]["count_for_audio_buffers"])
self.buffers.append(r_audio)
self.window.insert_buffer(r_audio.tab, _(u"Recommendations"), self.window.search("audios"))
albums = buffers.empty(parent=self.window.tb, name="albums")
self.buffers.append(albums)
self.window.insert_buffer(albums.tab, _(u"Albums"), self.window.search("audios"))