podflow 20250629.1__py3-none-any.whl → 20250630__py3-none-any.whl
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/main_podcast.py +70 -2
- {podflow-20250629.1.dist-info → podflow-20250630.dist-info}/METADATA +1 -1
- {podflow-20250629.1.dist-info → podflow-20250630.dist-info}/RECORD +6 -7
- podflow/run_and_upload.py +0 -77
- {podflow-20250629.1.dist-info → podflow-20250630.dist-info}/WHEEL +0 -0
- {podflow-20250629.1.dist-info → podflow-20250630.dist-info}/entry_points.txt +0 -0
- {podflow-20250629.1.dist-info → podflow-20250630.dist-info}/top_level.txt +0 -0
podflow/main_podcast.py
CHANGED
@@ -5,6 +5,7 @@ import sys
|
|
5
5
|
import json
|
6
6
|
import time
|
7
7
|
import urllib
|
8
|
+
import threading
|
8
9
|
import subprocess
|
9
10
|
|
10
11
|
import cherrypy
|
@@ -22,18 +23,24 @@ from podflow.httpfs.app_bottle import bottle_app_instance
|
|
22
23
|
|
23
24
|
# 下载和视频处理模块
|
24
25
|
from podflow.ffmpeg_judge import ffmpeg_judge
|
25
|
-
from podflow.
|
26
|
+
from podflow.download.delete_part import delete_part
|
27
|
+
from podflow.download_and_build import download_and_build
|
26
28
|
|
27
29
|
# RSS 和消息处理模块
|
28
30
|
from podflow.message.save_rss import save_rss
|
29
31
|
from podflow.message.get_original_rss import get_original_rss
|
32
|
+
from podflow.message.get_video_format import get_video_format
|
33
|
+
from podflow.message.optimize_download import optimize_download
|
30
34
|
from podflow.message.original_rss_fail_print import original_rss_fail_print
|
35
|
+
from podflow.message.update_information_display import update_information_display
|
36
|
+
from podflow.message.update_youtube_bilibili_rss import update_youtube_bilibili_rss
|
31
37
|
|
32
38
|
# 登录模块
|
33
39
|
from podflow.bilibili.login import get_bilibili_data
|
34
40
|
from podflow.youtube.login import get_youtube_cookie
|
35
41
|
|
36
42
|
# 配置和图标模块
|
43
|
+
from podflow.config.channge_icon import channge_icon
|
37
44
|
from podflow.config.build_original import build_original
|
38
45
|
|
39
46
|
# 制作和修改文件模块
|
@@ -53,6 +60,7 @@ from podflow.youtube.build import print_fail_youtube
|
|
53
60
|
# 长期媒体进行上传模块
|
54
61
|
from podflow.upload.login import login_upload
|
55
62
|
from podflow.upload.add_upload import add_upload
|
63
|
+
from podflow.upload.upload_files import all_upload
|
56
64
|
from podflow.upload.update_upload import update_upload
|
57
65
|
from podflow.upload.linked_client import connect_upload_server
|
58
66
|
from podflow.upload.get_upload_original import get_upload_original
|
@@ -139,8 +147,62 @@ def main_podcast():
|
|
139
147
|
# 初始化原始上传信息
|
140
148
|
get_upload_original()
|
141
149
|
progress_update(0.04)
|
142
|
-
|
150
|
+
|
151
|
+
# 如果有上传服务器,则启动上传线程
|
152
|
+
if upload_url:
|
153
|
+
thread_upload = threading.Thread(
|
154
|
+
target=all_upload,
|
155
|
+
args=(upload_url,)
|
156
|
+
)
|
157
|
+
thread_upload.start()
|
158
|
+
|
159
|
+
# 更新Youtube和哔哩哔哩频道xml
|
160
|
+
update_youtube_bilibili_rss()
|
161
|
+
progress_update(0.1)
|
162
|
+
# 判断是否有更新内容
|
163
|
+
if gVar.channelid_youtube_ids_update or gVar.channelid_bilibili_ids_update:
|
164
|
+
gVar.update_generate_rss = True
|
143
165
|
if gVar.update_generate_rss:
|
166
|
+
# 根据日出日落修改封面(只适用原封面)
|
167
|
+
channge_icon()
|
168
|
+
progress_update(0.11, num=0.0049)
|
169
|
+
# 输出需要更新的信息
|
170
|
+
update_information_display(
|
171
|
+
gVar.channelid_youtube_ids_update,
|
172
|
+
gVar.youtube_content_ytid_update,
|
173
|
+
gVar.youtube_content_ytid_backward_update,
|
174
|
+
"YouTube",
|
175
|
+
)
|
176
|
+
update_information_display(
|
177
|
+
gVar.channelid_bilibili_ids_update,
|
178
|
+
gVar.bilibili_content_bvid_update,
|
179
|
+
gVar.bilibili_content_bvid_backward_update,
|
180
|
+
"BiliBili",
|
181
|
+
)
|
182
|
+
progress_update(0.12)
|
183
|
+
# 暂停进程打印
|
184
|
+
gVar.server_process_print_flag[0] = "pause"
|
185
|
+
# 获取视频格式信息
|
186
|
+
get_video_format()
|
187
|
+
progress_update(0.199)
|
188
|
+
# 恢复进程打印
|
189
|
+
bottle_app_instance.cherry_print()
|
190
|
+
# 优化下载顺序
|
191
|
+
optimize_download()
|
192
|
+
# 删除中断下载的媒体文件
|
193
|
+
if gVar.config["delete_incompletement"]:
|
194
|
+
delete_part(gVar.channelid_youtube_ids | gVar.channelid_bilibili_ids)
|
195
|
+
progress_update(0.20, refresh=2)
|
196
|
+
# 暂停进程打印
|
197
|
+
gVar.server_process_print_flag[0] = "pause"
|
198
|
+
# 下载并构建YouTube和哔哩哔哩视频
|
199
|
+
download_and_build()
|
200
|
+
progress_update(0.8)
|
201
|
+
|
202
|
+
# 如果有上传服务器,则等待上传线程完成
|
203
|
+
if upload_url:
|
204
|
+
thread_upload.join()
|
205
|
+
|
144
206
|
# 添加新媒体至上传列表
|
145
207
|
add_upload()
|
146
208
|
progress_update(0.81, num=0.0049)
|
@@ -195,6 +257,12 @@ def main_podcast():
|
|
195
257
|
# 清理缓存文件
|
196
258
|
remove_flush(upload_url)
|
197
259
|
else:
|
260
|
+
|
261
|
+
# 如果没有更新内容,则停止上传线程
|
262
|
+
gVar.upload_stop = True
|
263
|
+
if upload_url:
|
264
|
+
thread_upload.join()
|
265
|
+
|
198
266
|
time_print("频道无更新内容")
|
199
267
|
# 清空变量内数据
|
200
268
|
gVar.channelid_youtube_ids_update.clear() # 需更新的YouTube频道字典
|
@@ -2,10 +2,9 @@ podflow/__init__.py,sha256=mquu8BdWK9V4dDObCCfnPodeXOPkz-kj8_RNB7kK3Ys,7628
|
|
2
2
|
podflow/download_and_build.py,sha256=x7S7N26B1G9Yn2yr7YthDJgKUwEKBLtHBLlaqpofLas,746
|
3
3
|
podflow/ffmpeg_judge.py,sha256=wM49pPXOFwFAA_8TKHal5fV6ka9sAA87yGQMDOssvXo,1340
|
4
4
|
podflow/main.py,sha256=7zWdpw80jqPaYu1Un1nPqaZoiAb7Dqg8zaF-cUioU4c,755
|
5
|
-
podflow/main_podcast.py,sha256=
|
5
|
+
podflow/main_podcast.py,sha256=Lz8cFdIjzCjSjsTx2vjmrU5i2opdSO93Y9IxWlJeD4E,13065
|
6
6
|
podflow/main_upload.py,sha256=xuN15GAXokl2xzZrraLeusevl0j-TnHVziL0wobsBZc,2586
|
7
7
|
podflow/parse_arguments.py,sha256=h3a7EaRZS04kNMFYbxTW9Ch29KgZ7dyS-yqEEt_etQI,2592
|
8
|
-
podflow/run_and_upload.py,sha256=EtkQtmiqZh8pqXQfQnn6hfjk0T-1wmc0YUFhTOqPRPw,2799
|
9
8
|
podflow/basic/__init__.py,sha256=CAfI6mVQtz7KKbAiTIZ9_IbvaTXeAqxR1U7ov9GDoDo,44
|
10
9
|
podflow/basic/file_save.py,sha256=6vu4EkbsN4df5-ci6sJOgIOUEhh-WaRBOyMJ8rpouXo,1233
|
11
10
|
podflow/basic/folder_build.py,sha256=5oHyfiDcSp2YITXQWIPwriBF9XuU3qs7wZQOWJHYJ1s,546
|
@@ -107,8 +106,8 @@ podflow/youtube/__init__.py,sha256=pgXod8gq0IijZxIkPSwgAOcb9JI5rd1mqMomoR7bcJ4,4
|
|
107
106
|
podflow/youtube/build.py,sha256=j6SVq3HFFGlNNqRrHfnBIThdzsH88PFmwLnejosif1U,12311
|
108
107
|
podflow/youtube/get.py,sha256=oO32GjTFvUgP5AfFX5AlIuXU2UT6QtOUOXWLFzi8XtI,17157
|
109
108
|
podflow/youtube/login.py,sha256=KYl--ya6Z1u0uIcOp9l8i3DIIj9hsYUDH4dtJjI0MLM,1295
|
110
|
-
podflow-
|
111
|
-
podflow-
|
112
|
-
podflow-
|
113
|
-
podflow-
|
114
|
-
podflow-
|
109
|
+
podflow-20250630.dist-info/METADATA,sha256=GEeZ4rah0rMYrbE4XCyEs34tWr-sB6CyGsdDRjmLKrI,14195
|
110
|
+
podflow-20250630.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
111
|
+
podflow-20250630.dist-info/entry_points.txt,sha256=mn7hD_c_dmpKe3XU0KNekheBvD01LhlJ9htY-Df0j2A,131
|
112
|
+
podflow-20250630.dist-info/top_level.txt,sha256=fUujhhz-RrMI8aGvi-3Ey5y7FQnpOOgoFw9OWM3yLCU,8
|
113
|
+
podflow-20250630.dist-info/RECORD,,
|
podflow/run_and_upload.py
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
# podflow/run_and_upload.py
|
2
|
-
# coding: utf-8
|
3
|
-
|
4
|
-
import threading
|
5
|
-
from podflow import gVar
|
6
|
-
from podflow.upload.upload_files import all_upload
|
7
|
-
from podflow.config.channge_icon import channge_icon
|
8
|
-
from podflow.download.delete_part import delete_part
|
9
|
-
from podflow.httpfs.progress_bar import progress_update
|
10
|
-
from podflow.download_and_build import download_and_build
|
11
|
-
from podflow.httpfs.app_bottle import bottle_app_instance
|
12
|
-
from podflow.message.get_video_format import get_video_format
|
13
|
-
from podflow.message.optimize_download import optimize_download
|
14
|
-
from podflow.message.update_information_display import update_information_display
|
15
|
-
from podflow.message.update_youtube_bilibili_rss import update_youtube_bilibili_rss
|
16
|
-
|
17
|
-
|
18
|
-
def find_and_duild():
|
19
|
-
# 更新Youtube和哔哩哔哩频道xml
|
20
|
-
update_youtube_bilibili_rss()
|
21
|
-
progress_update(0.1)
|
22
|
-
# 判断是否有更新内容
|
23
|
-
if gVar.channelid_youtube_ids_update or gVar.channelid_bilibili_ids_update:
|
24
|
-
gVar.update_generate_rss = True
|
25
|
-
if gVar.update_generate_rss:
|
26
|
-
# 根据日出日落修改封面(只适用原封面)
|
27
|
-
channge_icon()
|
28
|
-
progress_update(0.11, num=0.0049)
|
29
|
-
# 输出需要更新的信息
|
30
|
-
update_information_display(
|
31
|
-
gVar.channelid_youtube_ids_update,
|
32
|
-
gVar.youtube_content_ytid_update,
|
33
|
-
gVar.youtube_content_ytid_backward_update,
|
34
|
-
"YouTube",
|
35
|
-
)
|
36
|
-
update_information_display(
|
37
|
-
gVar.channelid_bilibili_ids_update,
|
38
|
-
gVar.bilibili_content_bvid_update,
|
39
|
-
gVar.bilibili_content_bvid_backward_update,
|
40
|
-
"BiliBili",
|
41
|
-
)
|
42
|
-
progress_update(0.12)
|
43
|
-
# 暂停进程打印
|
44
|
-
gVar.server_process_print_flag[0] = "pause"
|
45
|
-
# 获取视频格式信息
|
46
|
-
get_video_format()
|
47
|
-
progress_update(0.199)
|
48
|
-
# 恢复进程打印
|
49
|
-
bottle_app_instance.cherry_print()
|
50
|
-
# 优化下载顺序
|
51
|
-
optimize_download()
|
52
|
-
# 删除中断下载的媒体文件
|
53
|
-
if gVar.config["delete_incompletement"]:
|
54
|
-
delete_part(gVar.channelid_youtube_ids | gVar.channelid_bilibili_ids)
|
55
|
-
progress_update(0.20, refresh=2)
|
56
|
-
# 暂停进程打印
|
57
|
-
gVar.server_process_print_flag[0] = "pause"
|
58
|
-
# 下载并构建YouTube和哔哩哔哩视频
|
59
|
-
download_and_build()
|
60
|
-
progress_update(0.8)
|
61
|
-
|
62
|
-
# 运行并上传模块
|
63
|
-
def run_and_upload(upload_url):
|
64
|
-
if upload_url:
|
65
|
-
thread_find_and_duild = threading.Thread(target=find_and_duild)
|
66
|
-
thread_upload = threading.Thread(
|
67
|
-
target=all_upload,
|
68
|
-
args=(upload_url,)
|
69
|
-
)
|
70
|
-
|
71
|
-
thread_find_and_duild.start()
|
72
|
-
thread_upload.start()
|
73
|
-
|
74
|
-
thread_find_and_duild.join()
|
75
|
-
thread_upload.join()
|
76
|
-
else:
|
77
|
-
find_and_duild()
|
File without changes
|
File without changes
|
File without changes
|