podflow 20250404.8__py3-none-any.whl → 20250404.9__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/__init__.py +0 -1
- podflow/basic/time_print.py +0 -3
- podflow/main_podcast.py +0 -4
- podflow/templates/index.html +27 -29
- {podflow-20250404.8.dist-info → podflow-20250404.9.dist-info}/METADATA +1 -1
- {podflow-20250404.8.dist-info → podflow-20250404.9.dist-info}/RECORD +9 -9
- {podflow-20250404.8.dist-info → podflow-20250404.9.dist-info}/WHEEL +0 -0
- {podflow-20250404.8.dist-info → podflow-20250404.9.dist-info}/entry_points.txt +0 -0
- {podflow-20250404.8.dist-info → podflow-20250404.9.dist-info}/top_level.txt +0 -0
podflow/__init__.py
CHANGED
podflow/basic/time_print.py
CHANGED
podflow/main_podcast.py
CHANGED
podflow/templates/index.html
CHANGED
@@ -404,56 +404,54 @@
|
|
404
404
|
.catch(error => console.error('获取消息失败:', error));
|
405
405
|
}
|
406
406
|
|
407
|
+
function createMessageElement(message) {
|
408
|
+
const p = document.createElement('p');
|
409
|
+
p.innerHTML = message;
|
410
|
+
p.className = 'message';
|
411
|
+
return p;
|
412
|
+
}
|
413
|
+
|
407
414
|
function appendMessages(container, newMessages, oldMessages) {
|
408
415
|
// 判断当前是否在底部
|
409
416
|
const isAtBottom = container.scrollHeight - container.scrollTop <= container.clientHeight + 10;
|
410
|
-
|
411
|
-
//
|
417
|
+
|
418
|
+
// 当两数组长度相等且有内容时,只比较最后一项
|
412
419
|
if (newMessages.length === oldMessages.length && newMessages.length > 0) {
|
413
420
|
const lastNewMessage = newMessages[newMessages.length - 1];
|
414
421
|
const lastOldMessage = oldMessages[oldMessages.length - 1];
|
415
422
|
if (lastNewMessage !== lastOldMessage) {
|
416
|
-
const p =
|
417
|
-
p.innerHTML = lastNewMessage;
|
418
|
-
p.className = 'message'; // 添加 CSS 类名
|
419
|
-
|
420
|
-
// 获取容器的最后一个子元素
|
423
|
+
const p = createMessageElement(lastNewMessage);
|
421
424
|
const lastChild = container.lastElementChild;
|
422
|
-
// 如果容器有子元素,则替换最后一个
|
423
425
|
if (lastChild) {
|
424
426
|
container.replaceChild(p, lastChild);
|
425
427
|
} else {
|
426
|
-
// 如果容器为空,则直接添加
|
427
428
|
container.appendChild(p);
|
428
429
|
}
|
429
430
|
}
|
430
431
|
} else {
|
431
|
-
// 如果 newMessages
|
432
|
+
// 如果 newMessages 与 oldMessages 数量不一致
|
433
|
+
// 先替换容器中最后一项为 newMessages 中对应位置的消息(若 oldMessages 存在数据)
|
434
|
+
if (oldMessages.length > 0) {
|
435
|
+
const replaceIndex = oldMessages.length - 1;
|
436
|
+
const p = createMessageElement(newMessages[replaceIndex]);
|
437
|
+
const lastChild = container.lastElementChild;
|
438
|
+
if (lastChild) {
|
439
|
+
container.replaceChild(p, lastChild);
|
440
|
+
} else {
|
441
|
+
container.appendChild(p);
|
442
|
+
}
|
443
|
+
}
|
444
|
+
// 再追加从 oldMessages.length 开始的后续消息
|
432
445
|
newMessages.slice(oldMessages.length).forEach(msg => {
|
433
|
-
|
434
|
-
p.innerHTML = msg;
|
435
|
-
p.className = 'message'; // 添加 CSS 类名
|
436
|
-
container.appendChild(p);
|
446
|
+
container.appendChild(createMessageElement(msg));
|
437
447
|
});
|
438
448
|
}
|
439
|
-
|
440
|
-
//
|
441
|
-
for (let i = 2; i <= 3; i++) {
|
442
|
-
const child = container.children[container.children.length - (i + 1)];
|
443
|
-
if (child && newMessages.length > i) {
|
444
|
-
const newMessage = newMessages[newMessages.length - (i + 1)];
|
445
|
-
const p = document.createElement('p');
|
446
|
-
p.innerHTML = newMessage;
|
447
|
-
p.className = 'message'; // 添加 CSS 类名
|
448
|
-
container.replaceChild(p, child);
|
449
|
-
}
|
450
|
-
}
|
451
|
-
|
452
|
-
// 如果用户没有主动滚动,才自动滚动到底部
|
449
|
+
|
450
|
+
// 如果用户没有主动滚动,则自动滚动到底部
|
453
451
|
if (!userScrolled) {
|
454
452
|
container.scrollTop = container.scrollHeight;
|
455
453
|
}
|
456
|
-
}
|
454
|
+
}
|
457
455
|
|
458
456
|
function startMessagePolling() {
|
459
457
|
getMessages();
|
@@ -1,8 +1,8 @@
|
|
1
|
-
podflow/__init__.py,sha256
|
1
|
+
podflow/__init__.py,sha256=N8hpfDHmVdVyDQs50yt_EMscS2v6CTD5a8oBWUkUOf0,7222
|
2
2
|
podflow/download_and_build.py,sha256=GKQ1uX8Nuwdhr4wgnGr3jP1Mu0llRUPFcboQ3S05WkU,671
|
3
3
|
podflow/ffmpeg_judge.py,sha256=wM49pPXOFwFAA_8TKHal5fV6ka9sAA87yGQMDOssvXo,1340
|
4
4
|
podflow/main.py,sha256=Cz2E33-Kcc_1_oxNs4Z1OoqJYhonmClsrtoCW1oQmZA,739
|
5
|
-
podflow/main_podcast.py,sha256=
|
5
|
+
podflow/main_podcast.py,sha256=ytBL4LsGLttOFrJ9MXjMR1EBeTtoGjA78KQleA7rKwQ,9027
|
6
6
|
podflow/main_upload.py,sha256=H_T5KQMYzToqzQbjGQ6DWDGziy8iMnpmf7A1qOStJuo,2296
|
7
7
|
podflow/parse_arguments.py,sha256=h3a7EaRZS04kNMFYbxTW9Ch29KgZ7dyS-yqEEt_etQI,2592
|
8
8
|
podflow/basic/__init__.py,sha256=CAfI6mVQtz7KKbAiTIZ9_IbvaTXeAqxR1U7ov9GDoDo,44
|
@@ -16,7 +16,7 @@ podflow/basic/list_merge_tidy.py,sha256=7hWfSnsPh23edHNU92vxtI0nfpfN8m54GTEt2rGm
|
|
16
16
|
podflow/basic/qr_code.py,sha256=BQFxAx55vqWECTwWgybyXu3IuDFavpc3zMCmZ4XvKKE,1630
|
17
17
|
podflow/basic/split_dict.py,sha256=Ir6GTortcWMUeFITFgY1v-INMla5y0IN3RN3nTgzWqM,401
|
18
18
|
podflow/basic/time_format.py,sha256=T3tw2vbOwxMYYXDaV4Sj76WOZtsspj2lWA_DzWqUEJA,487
|
19
|
-
podflow/basic/time_print.py,sha256=
|
19
|
+
podflow/basic/time_print.py,sha256=e7T9WTPDgo9SejYKL4XR5C6Gi9iOWSe1JdfO-YMkmbo,1172
|
20
20
|
podflow/basic/time_stamp.py,sha256=Kbz9PzgPtss1fRqPXdfz1q6MTGVMRi3LPClN7wrXSIk,1888
|
21
21
|
podflow/basic/vary_replace.py,sha256=-TyvZxfak6U7Ak8F87ctYUBpHB2Il6iYZof37lwKjto,211
|
22
22
|
podflow/basic/write_log.py,sha256=wfiNfFuRLCWNLXDRNPVaVsKxwB44xxTiCFJ66g71XmU,1255
|
@@ -80,7 +80,7 @@ podflow/remove/remove_dir.py,sha256=xQIhrnqnYjMzXjoSWaTvm7JwPYOFTN1muuTPdaLDXpQ,
|
|
80
80
|
podflow/remove/remove_file.py,sha256=8wAJQehs-XBqvu0vPlEme2_tt0FZxc5ELwGMxXA_558,982
|
81
81
|
podflow/repair/__init__.py,sha256=Gpc1i6xiSLodKjjmzH66c_Y1z0HQ9E9CS3p95FRnVFM,45
|
82
82
|
podflow/repair/reverse_log.py,sha256=Wc_vAH0WB-z1fNdWx7FYaVH4caRPtot7tDwDwFhmpz4,1106
|
83
|
-
podflow/templates/index.html,sha256=
|
83
|
+
podflow/templates/index.html,sha256=FJ2MN0U4BxPifiBzYeVigdvKMF99Azo03N4OkqGeJEc,17861
|
84
84
|
podflow/upload/__init__.py,sha256=AtOSXDrE5EjUe3z-iBd1NTDaH8n_X9qA5WXdBLkONjA,45
|
85
85
|
podflow/upload/add_upload.py,sha256=_2-V0z75Lwu-PUCfMD9HOSxZTB102yZlZW5hSdlHcsc,1432
|
86
86
|
podflow/upload/build_hash.py,sha256=9opa3xLd7nJbGGX5xa3uuKPS6dxlbkAb87ZdEiUxmxI,473
|
@@ -95,8 +95,8 @@ podflow/youtube/__init__.py,sha256=pgXod8gq0IijZxIkPSwgAOcb9JI5rd1mqMomoR7bcJ4,4
|
|
95
95
|
podflow/youtube/build.py,sha256=3LYk_ICVXj9XkE9jZ8jEVI8596xxS_QZkcoIwcBE3Ys,12006
|
96
96
|
podflow/youtube/get.py,sha256=Of7PRgUknhpyW70nvyVAUYVb5KyFViKiBTfH3Y6Mke8,16970
|
97
97
|
podflow/youtube/login.py,sha256=KYl--ya6Z1u0uIcOp9l8i3DIIj9hsYUDH4dtJjI0MLM,1295
|
98
|
-
podflow-20250404.
|
99
|
-
podflow-20250404.
|
100
|
-
podflow-20250404.
|
101
|
-
podflow-20250404.
|
102
|
-
podflow-20250404.
|
98
|
+
podflow-20250404.9.dist-info/METADATA,sha256=OoC5BxBXpLX0Mmlgp-cmmQl6yhn6AD4kDo84qjsIOo0,14165
|
99
|
+
podflow-20250404.9.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
100
|
+
podflow-20250404.9.dist-info/entry_points.txt,sha256=mn7hD_c_dmpKe3XU0KNekheBvD01LhlJ9htY-Df0j2A,131
|
101
|
+
podflow-20250404.9.dist-info/top_level.txt,sha256=fUujhhz-RrMI8aGvi-3Ey5y7FQnpOOgoFw9OWM3yLCU,8
|
102
|
+
podflow-20250404.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|