Add another youtube channel

main
Micke Nordin 3 years ago
parent 1a97232327
commit aff74e63e9
Signed by: micke
GPG Key ID: 014B273D614BE877

@ -40,9 +40,11 @@ class Cast(wx.Frame):
SVT.SVT('ch-svt2'),
SVT.SVT('ch-svt24')
]),
ChannelProvider(
'YouTube',
channels=[YouTube.YouTube('UCu6mSoMNzHQiBIOCkHUa2Aw')])
ChannelProvider('YouTube',
channels=[
YouTube.YouTube('UCoxcjq-8xIDTYp3uz647V5A'),
YouTube.YouTube('UCu6mSoMNzHQiBIOCkHUa2Aw')
])
]
self.m_selected_channel = None
self.m_selected_provider_index = None
@ -81,7 +83,8 @@ class Cast(wx.Frame):
self.m_sizer.Clear(delete_windows=True)
self.m_sizer = wx.BoxSizer(wx.VERTICAL)
backbtn = wx.Button(self.m_panel, -1, label="Go back", size=(480, 40))
backbtn.Bind(wx.EVT_BUTTON, lambda event: self.show_provider_list(event))
backbtn.Bind(wx.EVT_BUTTON,
lambda event: self.show_provider_list(event))
self.m_sizer.Add(backbtn, wx.ALIGN_CENTER_VERTICAL)
self.m_sizer.AddSpacer(10)
channel_index = 0
@ -119,7 +122,9 @@ class Cast(wx.Frame):
wx.GetApp().Yield()
backbtn = wx.Button(self.m_panel, -1, label="Go back", size=(480, 40))
backbtn.Bind(wx.EVT_BUTTON, lambda event: self.show_channel_list(event, self.m_selected_provider_index))
backbtn.Bind(
wx.EVT_BUTTON, lambda event: self.show_channel_list(
event, self.m_selected_provider_index))
self.m_sizer.Add(backbtn, wx.ALIGN_CENTER_VERTICAL)
self.m_sizer.AddSpacer(10)
for item in channel.get_items():
@ -208,9 +213,10 @@ class Cast(wx.Frame):
id=-1,
label=friendly_name,
size=(480, 40))
btn.Bind(wx.EVT_BUTTON,
lambda event, chromecast=cast, muri=uri, index=provider_index: self.
set_chromecast(event, chromecast, muri, index))
btn.Bind(
wx.EVT_BUTTON,
lambda event, chromecast=cast, muri=uri, index=provider_index:
self.set_chromecast(event, chromecast, muri, index))
self.m_sizer.Add(btn, wx.ALIGN_CENTER_VERTICAL)
self.m_panel.SetSizer(self.m_sizer)
self.m_sizer.Fit(self)

Loading…
Cancel
Save