Rename ChannelProvider -> Channel

main
Micke Nordin 3 years ago
parent 605f40e1f1
commit 54193eb8df
Signed by: micke
GPG Key ID: 014B273D614BE877

@ -7,7 +7,7 @@ import os
import pickle import pickle
import threading import threading
import ChannelProvider from Channel import Channel
import feedparser import feedparser
import requests import requests
import wx import wx
@ -15,7 +15,7 @@ from bs4 import BeautifulSoup
from Items import Item from Items import Item
class SVT(ChannelProvider.ChannelProvider): class SVT(Channel):
m_cache: dict = dict() m_cache: dict = dict()
m_cachefile = '/tmp/svt_cache' m_cachefile = '/tmp/svt_cache'

@ -8,12 +8,12 @@ from typing import Union
import feedparser import feedparser
import requests import requests
import wx import wx
from ChannelProvider import ChannelProvider from Channel import Channel
from Items import Item from Items import Item
from youtube_dl import YoutubeDL as yt from youtube_dl import YoutubeDL as yt
class YouTube(ChannelProvider): class YouTube(Channel):
m_cache: dict = dict() m_cache: dict = dict()
m_cachefile = '/tmp/yt_cache' m_cachefile = '/tmp/yt_cache'

@ -13,7 +13,7 @@ default_logo += "thumb/f/fd/Cartoon_Hand_Playing_Multiple_Online_Videos.svg/"
default_logo += "480px-Cartoon_Hand_Playing_Multiple_Online_Videos.svg.png" default_logo += "480px-Cartoon_Hand_Playing_Multiple_Online_Videos.svg.png"
class ChannelProvider: class Channel:
def __init__(self, def __init__(self,
provider_name: str, provider_name: str,
feed: str, feed: str,

@ -8,9 +8,9 @@ import wx
import wx.lib.scrolledpanel as scrolled import wx.lib.scrolledpanel as scrolled
import wx.media import wx.media
from ChannelProvider import SVT, ChannelProvider, YouTube from Channel import SVT, Channel, YouTube
ChannelProvider = NewType('ChannelProvider', ChannelProvider) Channel = NewType('Channel', Channel)
class Cast(wx.Frame): class Cast(wx.Frame):
@ -33,7 +33,7 @@ class Cast(wx.Frame):
self.m_control = None self.m_control = None
self.m_panel.SetupScrolling() self.m_panel.SetupScrolling()
self.m_panel.SetSizer(self.m_sizer) self.m_panel.SetSizer(self.m_sizer)
self.m_providers: list[ChannelProvider] = [ self.m_providers: list[Channel] = [
YouTube.YouTube('UCu6mSoMNzHQiBIOCkHUa2Aw'), YouTube.YouTube('UCu6mSoMNzHQiBIOCkHUa2Aw'),
SVT.SVT() SVT.SVT()
] ]

Loading…
Cancel
Save