aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorWolfgang Müller2024-09-19 18:53:07 +0200
committerWolfgang Müller2024-09-19 18:53:07 +0200
commit7e991f08d972505ace6b989bb578d1c4c9ee2ea7 (patch)
tree3b99e023387f8fa80310e6dc3a8203bc8e24b3fb
parent3cf32bc82c44e656c1d1753c0a14ac98dde26692 (diff)
downloadlater-7e991f08d972505ace6b989bb578d1c4c9ee2ea7.tar.gz
Move YTDLPLogger to beginning of file
-rwxr-xr-xlater22
1 files changed, 11 insertions, 11 deletions
diff --git a/later b/later
index 9ae72a3..da7d791 100755
--- a/later
+++ b/later
@@ -9,6 +9,17 @@ import sys
from datetime import datetime as dt
+class YTDLPLogger:
+ def debug(self, msg):
+ pass
+
+ def warning(self, msg):
+ pass
+
+ def error(self, msg):
+ print("later: yt-dlp:", msg, file=sys.stderr)
+
+
def get_xdg(type, fallback):
env = f"XDG_{type.upper()}_HOME"
if env in os.environ:
@@ -24,17 +35,6 @@ later_cache_dir = os.path.join(xdg_cache_home, "later")
title_map_file = os.path.join(later_cache_dir, "titles.json")
-class YTDLPLogger:
- def debug(self, msg):
- pass
-
- def warning(self, msg):
- pass
-
- def error(self, msg):
- print("later: yt-dlp:", msg, file=sys.stderr)
-
-
def entries():
def get_mtime(entry):
return entry.stat().st_mtime