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