From 5d804b2d8ecd4adac6ece3d9572dc9d0dc9094e0 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Thu, 6 Dec 2018 17:56:22 -0600 Subject: [PATCH] Display audio attachments in chat messages properly --- src/controller/buffers.py | 5 ++--- src/sessionmanager/utils.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/controller/buffers.py b/src/controller/buffers.py index 5ff42a0..53fe5ca 100644 --- a/src/controller/buffers.py +++ b/src/controller/buffers.py @@ -7,7 +7,6 @@ import wx import languageHandler import widgetUtils import messages -import utils import player import output import selector @@ -16,11 +15,11 @@ import attach from pubsub import pub from vk.exceptions import VkAPIError from wxUI.tabs import home -from sessionmanager import session, renderers +from sessionmanager import session, renderers, utils from mysc.thread_utils import call_threaded from mysc import upload from wxUI import commonMessages, menus -from utils import add_attachment +from sessionmanager.utils import add_attachment log = logging.getLogger("controller.buffers") diff --git a/src/sessionmanager/utils.py b/src/sessionmanager/utils.py index 1942d3e..8559e7a 100644 --- a/src/sessionmanager/utils.py +++ b/src/sessionmanager/utils.py @@ -76,7 +76,7 @@ def add_attachment(attachment): msg = u"{0}".format(attachment["video"]["title"],) tpe = _(u"Video") elif attachment["type"] == "audio": - msg = u"{0}".format(" ".join(session.render_audio(attachment["audio"]))) + msg = u"{0}".format(" ".join(renderers.render_audio(attachment["audio"]))) tpe = _(u"Audio") elif attachment["type"] == "doc": if attachment["doc"].has_key("preview") and attachment["doc"]["preview"].has_key("audio_msg"):