From e02c0bf52e364db0756adfbc4ffeec90d3f96681 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Sat, 19 Mar 2022 01:50:05 +0100 Subject: [PATCH] Add options to customize output filename --- config.ini | 3 +++ mvw-dl.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config.ini b/config.ini index 4ea9238..d2c3d66 100644 --- a/config.ini +++ b/config.ini @@ -10,6 +10,9 @@ mvw_endpoint = http://localhost:8000/api/query title_dedup_winner = first dl_progress_update_interval = 10 dl_threads = 2 +dl_filename_pattern = &(channel)s - &(publish_date)s - &(topic)s - &(title)s.&(ext)s +dl_filename_spaces_to_underscores = yes +dl_filename_all_lowercase = yes [maus] min_duration = 1200 diff --git a/mvw-dl.py b/mvw-dl.py index 1063cac..b02730c 100644 --- a/mvw-dl.py +++ b/mvw-dl.py @@ -90,7 +90,10 @@ class CONST(object): {"key": "mvw_endpoint", "value": "http://localhost:8000/api/query"}, {"key": "title_dedup_winner", "value": "first"}, {"key": "dl_progress_update_interval", "value": "10"}, - {"key": "dl_threads", "value": "2"} + {"key": "dl_threads", "value": "2"}, + {"key": "dl_filename_pattern", "value": "&(channel)s - &(publish_date)s - &(topic)s - &(title)s"}, + {"key": "dl_filename_spaces_to_underscores", "value": "yes"}, + {"key": "dl_filename_all_lowercase", "value": "yes"} ] CFG_KNOWN_SECTION = [ {"key": "min_duration", "is_mandatory": False},