diff --git a/ChannelProvider/SVT/__init__.py b/Channel/SVT/__init__.py similarity index 98% rename from ChannelProvider/SVT/__init__.py rename to Channel/SVT/__init__.py index 6277bab..2a84ee2 100644 --- a/ChannelProvider/SVT/__init__.py +++ b/Channel/SVT/__init__.py @@ -7,7 +7,7 @@ import os import pickle import threading -import ChannelProvider +from Channel import Channel import feedparser import requests import wx @@ -15,7 +15,7 @@ from bs4 import BeautifulSoup from Items import Item -class SVT(ChannelProvider.ChannelProvider): +class SVT(Channel): m_cache: dict = dict() m_cachefile = '/tmp/svt_cache' diff --git a/ChannelProvider/YouTube/__init__.py b/Channel/YouTube/__init__.py similarity index 98% rename from ChannelProvider/YouTube/__init__.py rename to Channel/YouTube/__init__.py index 0ef41ef..1aaa256 100644 --- a/ChannelProvider/YouTube/__init__.py +++ b/Channel/YouTube/__init__.py @@ -8,12 +8,12 @@ from typing import Union import feedparser import requests import wx -from ChannelProvider import ChannelProvider +from Channel import Channel from Items import Item from youtube_dl import YoutubeDL as yt -class YouTube(ChannelProvider): +class YouTube(Channel): m_cache: dict = dict() m_cachefile = '/tmp/yt_cache' diff --git a/ChannelProvider/__init__.py b/Channel/__init__.py similarity index 98% rename from ChannelProvider/__init__.py rename to Channel/__init__.py index 14454f5..6e42ea7 100644 --- a/ChannelProvider/__init__.py +++ b/Channel/__init__.py @@ -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" -class ChannelProvider: +class Channel: def __init__(self, provider_name: str, feed: str, diff --git a/main.py b/main.py index 40ce9bb..f7ca11c 100644 --- a/main.py +++ b/main.py @@ -8,9 +8,9 @@ import wx import wx.lib.scrolledpanel as scrolled 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): @@ -33,7 +33,7 @@ class Cast(wx.Frame): self.m_control = None self.m_panel.SetupScrolling() self.m_panel.SetSizer(self.m_sizer) - self.m_providers: list[ChannelProvider] = [ + self.m_providers: list[Channel] = [ YouTube.YouTube('UCu6mSoMNzHQiBIOCkHUa2Aw'), SVT.SVT() ]