修复downloaded_processor的时间格式化 (#582)

This commit is contained in:
Kataick authored and GitHub committed 2023-08-02 07:59:21 +00:00
1 parent cd97c9b47b
commit 7da1271d6e
2 files changed
+6 -7

No files matched your search

+2 -2
View File
@@ -244,8 +244,8 @@ class DownloadBase:
'date': date,
'live_cover_path': self.live_cover_path,
'is_download': self.is_download,
'start_time': date,
'end_time': time.localtime(),
'start_time': time.strftime("%Y-%m-%d %H:%M:%S", date),
'end_time': time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),
}
def download_cover(self, fmtname):
+4 -5
View File
@@ -44,11 +44,10 @@ def process(name, url):
'name': name,
'url': url,
}
start_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
if config['streamers'].get(name, {}).get('preprocessor'):
processor(config['streamers'].get(name, {}).get('preprocessor'),
f'{{"name": "{name}", "url": "{url}", "start_time": "{start_time}"}}')
preprocessor = config['streamers'].get(name, {}).get('preprocessor')
if preprocessor:
processor(preprocessor,
f'{{"name": "{name}", "url": "{url}", "start_time": "{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())}"}}')
url_status = event_manager.context['url_status']
# 下载开始