Load more than 10 audio albums
This commit is contained in:
@@ -826,7 +826,7 @@ class audioBuffer(feedBuffer):
|
||||
widgetUtils.connect_event(m, widgetUtils.MENU, self.move_to_album, menuitem=m.move)
|
||||
widgetUtils.connect_event(m, widgetUtils.MENU, self.download, menuitem=m.download)
|
||||
widgetUtils.connect_event(m, widgetUtils.MENU, self.select_all, menuitem=m.select)
|
||||
widgetUtils.connect_event(m, widgetUtils.MENU, self.unselect_all, menuitem=m.unselect)
|
||||
widgetUtils.connect_event(m, widgetUtils.MENU, self.deselect_all, menuitem=m.deselect)
|
||||
# if owner_id is the current user, the audio is added to the user's audios.
|
||||
if p["owner_id"] == self.session.user_id:
|
||||
m.library.SetItemLabel(_("&Remove"))
|
||||
@@ -903,7 +903,7 @@ class audioBuffer(feedBuffer):
|
||||
for i in range(0, items):
|
||||
self.tab.list.list.SetItemImage(i, 1)
|
||||
|
||||
def unselect_all(self, *args, **kwargs):
|
||||
def deselect_all(self, *args, **kwargs):
|
||||
items = self.tab.list.list.GetItemCount()
|
||||
for i in range(0, items):
|
||||
self.tab.list.list.SetItemImage(i, 0)
|
||||
|
@@ -187,7 +187,7 @@ class Controller(object):
|
||||
if self.session.settings["vk"]["use_alternative_tokens"]:
|
||||
albums = self.session.vk.client_audio.get_albums(owner_id=user_id)
|
||||
else:
|
||||
albums = self.session.vk.client.audio.getPlaylists(owner_id=user_id)
|
||||
albums = self.session.vk.client.audio.getPlaylists(owner_id=user_id, count=100)
|
||||
albums = albums["items"]
|
||||
self.session.audio_albums = albums
|
||||
if create_buffers:
|
||||
@@ -198,7 +198,7 @@ class Controller(object):
|
||||
if self.session.settings["load_at_startup"]["video_albums"] == False and force_action == False:
|
||||
return
|
||||
log.debug("Create video albums...")
|
||||
albums = self.session.vk.client.video.getAlbums(owner_id=user_id)
|
||||
albums = self.session.vk.client.video.getAlbums(owner_id=user_id, count=100)
|
||||
self.session.video_albums = albums["items"]
|
||||
if create_buffers:
|
||||
for i in albums["items"]:
|
||||
@@ -320,6 +320,7 @@ class Controller(object):
|
||||
pub.subscribe(self.handle_longpoll_read_timeout, "longpoll-read-timeout")
|
||||
pub.subscribe(self.create_buffer, "create_buffer")
|
||||
pub.subscribe(self.user_typing, "user-typing")
|
||||
pub.subscribe(self.edit_message, "edit-message")
|
||||
pub.subscribe(self.get_chat, "order-sent-message")
|
||||
pub.subscribe(self.create_timeline, "create-timeline")
|
||||
pub.subscribe(self.api_error, "api-error")
|
||||
@@ -562,6 +563,9 @@ class Controller(object):
|
||||
user1_nom = user["user1_nom"].split()[0]
|
||||
output.speak(_("{user1_nom} is typing...").format(user1_nom=user1_nom))
|
||||
|
||||
def edit_message(self, obj):
|
||||
print(vars(obj))
|
||||
|
||||
def get_chat(self, obj=None):
|
||||
""" Searches or creates a chat buffer with the id of the user that is sending or receiving a message.
|
||||
@obj vk_api.longpoll.EventType: an event wich defines some data from the vk's long poll server."""
|
||||
|
Reference in New Issue
Block a user