podflow 20250803__tar.gz → 20250821__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {podflow-20250803 → podflow-20250821}/PKG-INFO +1 -1
- {podflow-20250803 → podflow-20250821}/podflow/download/dl_aideo_video.py +1 -0
- {podflow-20250803 → podflow-20250821}/podflow/httpfs/app_bottle.py +46 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/fail_message_initialize.py +5 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/get_youtube_and_bilibili_video_format.py +3 -1
- {podflow-20250803 → podflow-20250821}/podflow/message/media_format.py +1 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/update_information_display.py +10 -5
- {podflow-20250803 → podflow-20250821}/podflow/message/xml_item.py +31 -5
- {podflow-20250803 → podflow-20250821}/podflow/remove/remove_dir.py +8 -0
- {podflow-20250803 → podflow-20250821}/podflow/remove/remove_file.py +8 -0
- podflow-20250821/podflow/upload/uploaded_remove.py +54 -0
- {podflow-20250803 → podflow-20250821}/podflow.egg-info/PKG-INFO +1 -1
- {podflow-20250803 → podflow-20250821}/podflow.egg-info/SOURCES.txt +1 -0
- {podflow-20250803 → podflow-20250821}/podflow.egg-info/requires.txt +1 -1
- {podflow-20250803 → podflow-20250821}/setup.py +2 -2
- {podflow-20250803 → podflow-20250821}/MANIFEST.in +0 -0
- {podflow-20250803 → podflow-20250821}/README.md +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/__init__.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/__init__.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/file_save.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/folder_build.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/get_duration.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/get_file_list.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/get_html_dict.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/http_client.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/list_merge_tidy.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/qr_code.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/random_sequence.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/split_dict.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/time_format.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/time_print.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/time_stamp.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/vary_replace.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/basic/write_log.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/bilibili/__init__.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/bilibili/build.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/bilibili/get.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/bilibili/login.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/config/__init__.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/config/build_original.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/config/channge_icon.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/config/correct_channelid.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/config/correct_config.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/config/get_channelid.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/config/get_channelid_id.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/config/get_config.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/download/__init__.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/download/convert_bytes.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/download/delete_part.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/download/show_progress.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/download/wait_animation.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/download/youtube_and_bilibili_download.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/download_and_build.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/ffmpeg_judge.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/httpfs/__init__.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/httpfs/browser.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/httpfs/download_bar.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/httpfs/get_channelid.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/httpfs/port_judge.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/httpfs/progress_bar.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/httpfs/to_html.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/main.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/main_podcast.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/main_upload.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/makeup/__init__.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/makeup/del_makeup_format_fail.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/makeup/make_up_file.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/makeup/make_up_file_format_mod.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/makeup/make_up_file_mod.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/__init__.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/backup_zip_save.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/create_main_rss.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/display_qrcode_and_url.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/format_time.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/get_media_name.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/get_original_rss.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/get_video_format.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/get_video_format_multithread.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/optimize_download.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/original_rss_fail_print.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/rss_create_hash.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/save_rss.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/title_correction.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/update_youtube_bilibili_rss.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/want_retry.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/xml_original_item.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/message/xml_rss.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/netscape/__init__.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/netscape/bulid_netscape.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/parse_arguments.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/remove/__init__.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/remove/remove_flush.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/repair/__init__.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/repair/reverse_log.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/templates/css/config.css +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/templates/css/index.css +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/templates/index.html +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/templates/js/config.js +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/templates/js/index.js +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/templates/js/qrcode.min.js +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/upload/__init__.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/upload/add_upload.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/upload/build_hash.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/upload/find_media_index.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/upload/get_upload_original.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/upload/linked_client.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/upload/linked_server.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/upload/login.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/upload/store_users_info.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/upload/time_key.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/upload/update_upload.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/upload/upload_files.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/upload/upload_server.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/youtube/__init__.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/youtube/build.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/youtube/check.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/youtube/get.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow/youtube/login.py +0 -0
- {podflow-20250803 → podflow-20250821}/podflow.egg-info/dependency_links.txt +0 -0
- {podflow-20250803 → podflow-20250821}/podflow.egg-info/entry_points.txt +0 -0
- {podflow-20250803 → podflow-20250821}/podflow.egg-info/top_level.txt +0 -0
- {podflow-20250803 → podflow-20250821}/pyproject.toml +0 -0
- {podflow-20250803 → podflow-20250821}/setup.cfg +0 -0
@@ -61,6 +61,7 @@ def download_video(
|
|
61
61
|
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",
|
62
62
|
"Referer": "https://www.youtube.com/",
|
63
63
|
}
|
64
|
+
ydl_opts["extractor_args"] = {"youtube": {"player-client": "web_embedded,web,tv"}}
|
64
65
|
ydl_opts["cookiefile"] = cookies # cookies 是你的 cookies 文件名
|
65
66
|
if playlist_num: # 播放列表的第n个视频
|
66
67
|
ydl_opts["playliststart"] = playlist_num
|
@@ -49,6 +49,7 @@ class bottle_app:
|
|
49
49
|
self.app_bottle.route("/upload", method="POST", callback=self.upload)
|
50
50
|
self.app_bottle.route("/flush", method="POST", callback=self.clear_cache)
|
51
51
|
self.app_bottle.route("/remove", method="POST", callback=self.remove)
|
52
|
+
self.app_bottle.route("/download", callback=self.download)
|
52
53
|
else:
|
53
54
|
self.app_bottle.route("/index", callback=self.index)
|
54
55
|
self.app_bottle.route("/getid", method="POST", callback=self.getid)
|
@@ -713,6 +714,51 @@ class bottle_app:
|
|
713
714
|
"message": "Folder Removed Successfully", # 文件夹删除成功
|
714
715
|
"error": None,
|
715
716
|
}
|
717
|
+
# 路由处理下载请求
|
718
|
+
def download(self):
|
719
|
+
# 获取已上传数据
|
720
|
+
upload_message = gVar.upload_message
|
721
|
+
# 获取上传数据配置(存储用户名和密码)
|
722
|
+
upload_data = gVar.upload_data
|
723
|
+
# 从请求参数中获取用户名,默认为空字符串
|
724
|
+
username = request.query.get("username", "")
|
725
|
+
# 从请求参数中获取密码,默认为空字符串
|
726
|
+
password = request.query.get("password", "")
|
727
|
+
channelid = request.query.get("channel_id", "")
|
728
|
+
filename = request.query.get("filename", "")
|
729
|
+
if username not in upload_data:
|
730
|
+
self.print_out("login", 401)
|
731
|
+
return {
|
732
|
+
"code": -2,
|
733
|
+
"message": "Username Error", # 用户名错误
|
734
|
+
"error": None,
|
735
|
+
}
|
736
|
+
# 验证密码是否正确
|
737
|
+
if upload_data[username] != password:
|
738
|
+
self.print_out("login", 401)
|
739
|
+
return {
|
740
|
+
"code": -3,
|
741
|
+
"message": "Password Error", # 密码错误
|
742
|
+
"error": None,
|
743
|
+
}
|
744
|
+
if not channelid:
|
745
|
+
self.print_out("download", 404)
|
746
|
+
return {
|
747
|
+
"code": -6,
|
748
|
+
"message": "ChannelId Does Not Exist", # 频道ID不存在
|
749
|
+
}
|
750
|
+
if not filename:
|
751
|
+
self.print_out("download", 404)
|
752
|
+
return {
|
753
|
+
"code": -14,
|
754
|
+
"message": "Filename Not Provided", # 未提供文件名
|
755
|
+
}
|
756
|
+
|
757
|
+
|
758
|
+
|
759
|
+
|
760
|
+
|
761
|
+
|
716
762
|
|
717
763
|
# 路由处理模板文件请求
|
718
764
|
def serve_template_file(self, filepath):
|
@@ -184,6 +184,11 @@ error_reason = [
|
|
184
184
|
"\033[31m播放列表不存在\033[0m",
|
185
185
|
"text",
|
186
186
|
],
|
187
|
+
[
|
188
|
+
"An extractor error has occurred. (caused by KeyError('data')); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U",
|
189
|
+
"\033[31m提取器错误\033[0m",
|
190
|
+
"text",
|
191
|
+
],
|
187
192
|
]
|
188
193
|
|
189
194
|
|
{podflow-20250803 → podflow-20250821}/podflow/message/get_youtube_and_bilibili_video_format.py
RENAMED
@@ -69,7 +69,9 @@ def get_youtube_and_bilibili_video_format(
|
|
69
69
|
else:
|
70
70
|
power = get_bilibili_cid(id_num, gVar.video_id_update_format[id_num]["name"])[2]
|
71
71
|
if power is True and (
|
72
|
-
"试看" in id_update_format
|
72
|
+
"试看" in id_update_format
|
73
|
+
or "提取器错误" in id_update_format
|
74
|
+
or id_update_format == "无法获取音频ID"
|
73
75
|
):
|
74
76
|
id_update_format = "\033[31m充电专属\033[0m"
|
75
77
|
if isinstance(id_update_format, list):
|
@@ -39,6 +39,7 @@ def duration_and_formats(video_website, video_url, cookies):
|
|
39
39
|
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",
|
40
40
|
"Referer": "https://www.youtube.com/",
|
41
41
|
}
|
42
|
+
ydl_opts["extractor_args"] = {"youtube": {"player-client": "web_embedded,web,tv"}}
|
42
43
|
ydl_opts["cookiefile"] = cookies # cookies 是你的 cookies 文件名
|
43
44
|
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
44
45
|
# 使用提供的 URL 提取视频信息
|
@@ -55,20 +55,25 @@ def update_information_display(
|
|
55
55
|
channelid_key in content_id_update
|
56
56
|
and channelid_key in content_id_backward_update
|
57
57
|
):
|
58
|
-
if (
|
59
|
-
|
60
|
-
|
58
|
+
if skip_display(
|
59
|
+
name, channelid_key, channelid_value, content_id_update
|
60
|
+
) and skip_display(
|
61
|
+
name, channelid_key, channelid_value, content_id_backward_update
|
61
62
|
):
|
62
63
|
print_channelid_ids_update += f"\033[97m{channelid_value}\033[0m"
|
63
64
|
else:
|
64
65
|
print_channelid_ids_update += f"\033[34m{channelid_value}\033[0m"
|
65
66
|
elif channelid_key in content_id_update:
|
66
|
-
if skip_display(
|
67
|
+
if skip_display(
|
68
|
+
name, channelid_key, channelid_value, content_id_update
|
69
|
+
):
|
67
70
|
print_channelid_ids_update += f"\033[97m{channelid_value}\033[0m"
|
68
71
|
else:
|
69
72
|
print_channelid_ids_update += f"\033[32m{channelid_value}\033[0m"
|
70
73
|
elif channelid_key in content_id_backward_update:
|
71
|
-
if skip_display(
|
74
|
+
if skip_display(
|
75
|
+
name, channelid_key, channelid_value, content_id_backward_update
|
76
|
+
):
|
72
77
|
print_channelid_ids_update += f"\033[97m{channelid_value}\033[0m"
|
73
78
|
else:
|
74
79
|
print_channelid_ids_update += f"\033[36m{channelid_value}\033[0m"
|
@@ -2,12 +2,28 @@
|
|
2
2
|
# coding: utf-8
|
3
3
|
|
4
4
|
import os
|
5
|
+
import re
|
5
6
|
import html
|
6
7
|
import hashlib
|
7
|
-
from podflow
|
8
|
+
from podflow import gVar
|
8
9
|
from podflow.basic.time_format import time_format
|
9
10
|
from podflow.basic.get_duration import get_duration
|
10
|
-
from podflow import
|
11
|
+
from podflow.upload.find_media_index import find_media_index
|
12
|
+
from podflow.message.title_correction import title_correction
|
13
|
+
|
14
|
+
|
15
|
+
def get_duration_by_guid(xml_text: str, target_guid: str):
|
16
|
+
# 匹配包含目标 GUID 的 <item> 区块,并提取 <itunes:duration> 的值
|
17
|
+
pattern = re.compile(
|
18
|
+
r"<item>.*?<guid>"
|
19
|
+
+ re.escape(target_guid)
|
20
|
+
+ r"</guid>.*?<itunes:duration>([^<]+)</itunes:duration>.*?</item>",
|
21
|
+
re.S,
|
22
|
+
)
|
23
|
+
m = pattern.search(xml_text)
|
24
|
+
if m:
|
25
|
+
return m.group(1)
|
26
|
+
return "Unknown"
|
11
27
|
|
12
28
|
|
13
29
|
# 生成item模块
|
@@ -53,9 +69,19 @@ def xml_item(
|
|
53
69
|
output_format = "m4a"
|
54
70
|
video_type = "audio/x-m4a"
|
55
71
|
# 获取文件时长
|
56
|
-
|
57
|
-
|
58
|
-
)
|
72
|
+
file_path = f"channel_audiovisual/{output_dir}/{video_url}.{output_format}"
|
73
|
+
duration = ""
|
74
|
+
if os.path.exists(file_path):
|
75
|
+
duration = time_format(get_duration(file_path))
|
76
|
+
elif gVar.config["upload"]:
|
77
|
+
index = find_media_index(gVar.upload_original, f"{video_url}.{output_format}")
|
78
|
+
if index != -1:
|
79
|
+
item = gVar.upload_original[index]
|
80
|
+
if "duration" in item:
|
81
|
+
duration = time_format(item["duration"])
|
82
|
+
else:
|
83
|
+
xml_text = gVar.xmls_original.get(output_dir, "")
|
84
|
+
duration = get_duration_by_guid(xml_text, video_url)
|
59
85
|
# 生成url
|
60
86
|
if gVar.config["token"]:
|
61
87
|
input_string = f"{gVar.config['token']}/channel_audiovisual/{output_dir}/{video_url}.{output_format}"
|
@@ -11,6 +11,14 @@ from podflow.basic.http_client import http_client
|
|
11
11
|
|
12
12
|
def judge_upload(upload_url, name):
|
13
13
|
if upload_url:
|
14
|
+
sign = True
|
15
|
+
upload_original = gVar.upload_original
|
16
|
+
for item in upload_original:
|
17
|
+
if item["channel_id"] == name and item["upload"] is True:
|
18
|
+
sign = False
|
19
|
+
break
|
20
|
+
if sign:
|
21
|
+
return True
|
14
22
|
result = {
|
15
23
|
-2: "用户名错误",
|
16
24
|
-3: "密码错误",
|
@@ -5,10 +5,18 @@ import os
|
|
5
5
|
from podflow import gVar
|
6
6
|
from podflow.basic.write_log import write_log
|
7
7
|
from podflow.basic.http_client import http_client
|
8
|
+
from podflow.upload.find_media_index import find_media_index
|
8
9
|
|
9
10
|
|
10
11
|
def judge_upload(upload_url, output_dir, file_name):
|
11
12
|
if upload_url:
|
13
|
+
upload_original = gVar.upload_original
|
14
|
+
index = find_media_index(upload_original, file_name)
|
15
|
+
if index != -1:
|
16
|
+
return True
|
17
|
+
item = upload_original[index]
|
18
|
+
if not item["upload"]:
|
19
|
+
return True
|
12
20
|
result = {
|
13
21
|
-2: "用户名错误",
|
14
22
|
-3: "密码错误",
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# podflow/upload/uploaded_remove.py
|
2
|
+
# coding: utf-8
|
3
|
+
|
4
|
+
import os
|
5
|
+
import time
|
6
|
+
from datetime import datetime, timedelta
|
7
|
+
from podflow import gVar
|
8
|
+
from podflow.basic.write_log import write_log
|
9
|
+
from podflow.basic.time_format import time_format
|
10
|
+
from podflow.basic.get_duration import get_duration
|
11
|
+
from podflow.upload.find_media_index import find_media_index
|
12
|
+
|
13
|
+
|
14
|
+
# 过滤和排序上传媒体模块
|
15
|
+
def filter_and_sort_media(media_list):
|
16
|
+
filtered_sorted = sorted(
|
17
|
+
(
|
18
|
+
item
|
19
|
+
for item in media_list
|
20
|
+
if item["upload"]
|
21
|
+
and not item["remove"]
|
22
|
+
),
|
23
|
+
key=lambda x: x["media_time"],
|
24
|
+
)
|
25
|
+
return [
|
26
|
+
{"media_id": item["media_id"], "channel_id": item["channel_id"]}
|
27
|
+
for item in filtered_sorted
|
28
|
+
]
|
29
|
+
|
30
|
+
# 上传已删除媒体模块
|
31
|
+
def uploaded_remove(upload_url):
|
32
|
+
if upload_url:
|
33
|
+
# 当前时间
|
34
|
+
now = datetime.now()
|
35
|
+
# 30天前的时间
|
36
|
+
one_month_ago = now - timedelta(days=30)
|
37
|
+
# 转换为时间戳(秒级)
|
38
|
+
timestamp = int(time.mktime(one_month_ago.timetuple()))
|
39
|
+
result = filter_and_sort_media(gVar.upload_original)
|
40
|
+
num = 0
|
41
|
+
for item in result:
|
42
|
+
if num < 10 and item["media_time"] < timestamp:
|
43
|
+
break
|
44
|
+
num += 1
|
45
|
+
output_dir = item["channel_id"]
|
46
|
+
file_name = item["media_id"]
|
47
|
+
index = find_media_index(gVar.upload_original, file_name)
|
48
|
+
if index != -1:
|
49
|
+
gVar.upload_original[index]["remove"] = True
|
50
|
+
file_path = f"channel_audiovisual/{output_dir}/{file_name}"
|
51
|
+
duration = time_format(get_duration(file_path))
|
52
|
+
gVar.upload_original[index]["duration"] = duration
|
53
|
+
os.remove(file_path)
|
54
|
+
write_log(f"{file_name}本地文件已删除")
|
@@ -113,6 +113,7 @@ podflow/upload/time_key.py
|
|
113
113
|
podflow/upload/update_upload.py
|
114
114
|
podflow/upload/upload_files.py
|
115
115
|
podflow/upload/upload_server.py
|
116
|
+
podflow/upload/uploaded_remove.py
|
116
117
|
podflow/youtube/__init__.py
|
117
118
|
podflow/youtube/build.py
|
118
119
|
podflow/youtube/check.py
|
@@ -5,7 +5,7 @@ from setuptools import setup, find_packages
|
|
5
5
|
|
6
6
|
setup(
|
7
7
|
name="podflow",
|
8
|
-
version="
|
8
|
+
version="20250821",
|
9
9
|
author="gruel_zxz",
|
10
10
|
author_email="zhuxizhouzxz@gmail.com",
|
11
11
|
description="A podcast server that includes YouTube and BiliBili",
|
@@ -31,7 +31,7 @@ setup(
|
|
31
31
|
install_requires=[
|
32
32
|
"astral>=3.2",
|
33
33
|
"bottle>=0.13.2",
|
34
|
-
"yt-dlp>=2025.
|
34
|
+
"yt-dlp>=2025.8.20",
|
35
35
|
"chardet>=5.2.0",
|
36
36
|
"cherrypy>=18.10.0",
|
37
37
|
"pyqrcode>=1.2.1",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|