From aff74e63e9e6983ce1ca57888d417025fe66aabc Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Tue, 28 Dec 2021 17:55:24 +0100 Subject: [PATCH] Add another youtube channel --- main.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/main.py b/main.py index 851ff20..a8080a4 100644 --- a/main.py +++ b/main.py @@ -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)