Added video buffers to the timeline dialog

This commit is contained in:
2019-10-11 12:05:27 -05:00
parent 3deabdbf36
commit 2889923940
3 changed files with 10 additions and 0 deletions

View File

@@ -604,6 +604,10 @@ class Controller(object):
buffer = buffers.feedBuffer(parent=self.window.tb, name="{0}_feed".format(user_id,), composefunc="render_status", session=self.session, create_tab=False, endpoint="get", parent_endpoint="wall", extended=1, count=self.session.settings["buffers"]["count_for_wall_buffers"], owner_id=user_id)
user = self.session.get_user(user_id, key="user1")
name_ = _("{user1_nom}'s posts").format(**user)
elif buffer_type == "video":
buffer = buffers.videoBuffer(parent=self.window.tb, name="{0}_video".format(user_id,), composefunc="render_video", session=self.session, create_tab=False, endpoint="get", parent_endpoint="video", owner_id=user_id, count=self.session.settings["buffers"]["count_for_video_buffers"])
user = self.session.get_user(user_id, key="user1")
name_ = _("{user1_nom}'s videos").format(**user)
elif buffer_type == "friends":
buffer = buffers.peopleBuffer(parent=self.window.tb, name="friends_{0}".format(user_id,), composefunc="render_person", session=self.session, create_tab=False, endpoint="get", parent_endpoint="friends", count=5000, fields="uid, first_name, last_name, last_seen", user_id=user_id)
user = self.session.get_user(user_id, key="user1")

View File

@@ -20,9 +20,11 @@ class timelineDialog(widgetUtils.BaseDialog):
actionsSizer = wx.StaticBoxSizer(parent=panel, orient=wx.VERTICAL, label=_("Buffer type"))
self.wall = wx.RadioButton(actionsSizer.GetStaticBox(), wx.NewId(), _("&Wall posts"), style=wx.RB_GROUP)
self.audio = wx.RadioButton(actionsSizer.GetStaticBox(), wx.NewId(), _("Audio"))
self.video = wx.RadioButton(actionsSizer.GetStaticBox(), wx.NewId(), _("Video"))
self.friends = wx.RadioButton(actionsSizer.GetStaticBox(), wx.NewId(), _("Friends"))
actionsSizer.Add(self.wall, 0, wx.ALL, 5)
actionsSizer.Add(self.audio, 0, wx.ALL, 5)
actionsSizer.Add(self.video, 0, wx.ALL, 5)
actionsSizer.Add(self.friends, 0, wx.ALL, 5)
sizer.Add(actionsSizer, 0, wx.ALL, 5)
ok = wx.Button(panel, wx.ID_OK, _("&OK"))
@@ -41,6 +43,8 @@ class timelineDialog(widgetUtils.BaseDialog):
def get_buffer_type(self):
if self.audio.GetValue() == True:
return "audio"
elif self.video.GetValue() == True:
return "video"
elif self.wall.GetValue() == True:
return "wall"
elif self.friends.GetValue() == True: