diff options
author | ComradeCrow <comradecrow@vivaldi.net> | 2025-02-14 16:11:57 -0800 |
---|---|---|
committer | ComradeCrow <comradecrow@vivaldi.net> | 2025-02-14 16:11:57 -0800 |
commit | 4d71ed8e8dbd794e8e22baec590e23fba6a347ed (patch) | |
tree | 8d25f901a169aa5f4092dc3031dbb956365256f4 | |
parent | 396448bf1c7f372474eca374cfecdb64fca854f1 (diff) | |
download | podweb-4d71ed8e8dbd794e8e22baec590e23fba6a347ed.tar.gz |
minor updates
-rwxr-xr-x | PodWeb.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/PodWeb.py b/PodWeb.py index cb407de..9123348 100755 --- a/PodWeb.py +++ b/PodWeb.py @@ -39,6 +39,7 @@ class PodWeb: self.options = options self.options.update({"DEBUG": debug}) self.servers = [] + self.simulate = simulate self.DEFAULT_SERVERLIST_HEADING = """## You can add podcast xml feeds here. ## You can also optionally add categories, website url, image urls, and names for the podcasts. ## The order of category, name, and url does not matter. @@ -116,10 +117,12 @@ class PodWeb: def _create_tables(self) -> None: self.data.execute("""CREATE TABLE IF NOT EXISTS "episodes" ( - "guid" TEXT NOT NULL UNIQUE, - "title" TEXT, + "guid" TEXT NOT NULL UNIQUE, + "title" TEXT, "description" TEXT, - "img" TEXT, + "img" TEXT, + "url" TEXT, + "season" TEXT, PRIMARY KEY("guid") )""") self.data.execute("""CREATE TABLE IF NOT EXISTS "downloads" ( @@ -163,6 +166,9 @@ class PodWeb: if do_return: return content if content: + for i in content: + content["url"] = + podcastparser.normalize_feed_url(content["url"]) self.servers = content def _create_serverlist(self) -> None: @@ -188,6 +194,7 @@ class PodWeb: site=None, img=None ) -> None: + feedurl = podcastparser.normalize_feed_url(feedurl) feedparse = urllib.parse.urlparse(feedurl) for i in self.servers: iparse = urllib.parse.urlparse(i["url"]) |