This commit is contained in:
Ghost 2024-02-28 07:39:55 +01:00
parent d90a951dbf
commit 0c6ef03373
3 changed files with 18 additions and 12 deletions

View File

View File

@ -194,7 +194,11 @@ class M3U8_Segments:
url_number = self.segments.index(ts_url) url_number = self.segments.index(ts_url)
is_valid = ( str(url_number) in failed_segments ) is_valid = True
for failde_seg in failed_segments:
if str(failde_seg) in ts_url:
is_valid = False
break
if is_valid: if is_valid:
@ -308,8 +312,8 @@ class M3U8_Segments:
with open(file_list_path, 'w') as f: with open(file_list_path, 'w') as f:
for ts_file in ts_files: for ts_file in ts_files:
absolute_path = os.path.abspath(os.path.join(self.temp_folder, ts_file), current_dir) relative_path = os.path.relpath(os.path.join(self.temp_folder, ts_file), current_dir)
f.write(f"file '{absolute_path}'\n") f.write(f"file '{relative_path}'\n")
console.log("[cyan]Start join all file") console.log("[cyan]Start join all file")
try: try:

View File

@ -6,14 +6,16 @@ from Src.Util.console import console
def msg_start(): def msg_start():
msg = """ msg = """
_____ _ _ _ _
/ ____| | (_) (_) | _____ _ _ _____ _ _
| (___ | |_ _ __ ___ __ _ _ __ ___ _ _ __ __ _ ___ ___ _ __ ___ _ _ _ __ _| |_ _ _ / ____| | (_) / ____| (_) |
\___ \| __| '__/ _ \/ _` | '_ ` _ \| | '_ \ / _` | / __/ _ \| '_ ` _ \| | | | '_ \| | __| | | | | (___ | |_ _ __ ___ __ _ _ __ ___ _ _ __ __ _ | | ___ _ __ ___ _ __ ___ _ _ _ __ _| |_ _ _
____) | |_| | | __/ (_| | | | | | | | | | | (_| | | (_| (_) | | | | | | |_| | | | | | |_| |_| | \___ \| __| '__/ _ \/ _` | '_ ` _ \| | '_ \ / _` | | | / _ \| '_ ` _ \| '_ ` _ \| | | | '_ \| | __| | | |
|_____/ \__|_| \___|\__,_|_| |_| |_|_|_| |_|\__, | \___\___/|_| |_| |_|\__,_|_| |_|_|\__|\__, | ____) | |_| | | __/ (_| | | | | | | | | | | (_| | | |___| (_) | | | | | | | | | | | |_| | | | | | |_| |_| |
|_____/ \__|_| \___|\__,_|_| |_| |_|_|_| |_|\__, | \_____\___/|_| |_| |_|_| |_| |_|\__,_|_| |_|_|\__|\__, |
__/ | __/ | __/ | __/ |
|___/ |___/ |___/ |___/
""" """
console.print(f"[purple]{msg}") console.print(f"[purple]{msg}")