about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xPodWeb.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/PodWeb.py b/PodWeb.py
index 3cd87d3..7026772 100755
--- a/PodWeb.py
+++ b/PodWeb.py
@@ -22,6 +22,8 @@ options = {
         os.path.join(os.path.expanduser("~/.config/podweb"), "serverlist")
     ),
     "downloadlocation": os.path.expanduser("~/Podcasts"),
+    "default_download_limit": -1,
+    "default_download_order": "ASC",
 }
 
 if os.name == "nt":
@@ -55,6 +57,7 @@ class PodWeb:
 ##    url: https://example.com/feed.xml
 ##    img: https://example.com/image.jpg
 ##    site: https://example.com
+##    autodownload: 10
 ##  - name: example podcast 2
 ##    url: example.com/feed2.xml
 
@@ -181,6 +184,11 @@ class PodWeb:
         )
 
     def _win_safe_filename(self, filename: str) -> str:
+        restricted_filenames = ["com", "prn", "aux", "nul"]
+        restricted_filenames += [F"com{i}" for i in range(0,10)]
+        restricted_filenames += [F"lpt{i}" for i in range(0,10)]
+        if filename.lower() not in restricted_filenames:
+            pass
         safe_chars = [" ", ".", "_"]
         return "".join(
             char for char in filename if char.isalnum() or char in safe_chars