h
This commit is contained in:
@@ -21,7 +21,7 @@ from API.HTTP import _download_direct_file
|
||||
from SYS.models import DownloadError, DownloadOptions, DownloadMediaResult
|
||||
from SYS.logger import log, debug
|
||||
from SYS.pipeline_progress import PipelineProgress
|
||||
from SYS.result_table import ResultTable
|
||||
from SYS.result_table import Table
|
||||
from SYS.rich_display import stderr_console as get_stderr_console
|
||||
from SYS import pipeline as pipeline_context
|
||||
from SYS.utils import sha256_file
|
||||
@@ -746,12 +746,12 @@ class Download_File(Cmdlet):
|
||||
|
||||
try:
|
||||
from SYS.rich_display import render_item_details_panel
|
||||
from SYS.result_table import ResultTable
|
||||
from SYS.result_table import Table
|
||||
|
||||
for idx, item in enumerate(emitted_items, 1):
|
||||
render_item_details_panel(item, title=f"#{idx} Item Details")
|
||||
|
||||
table = ResultTable("Result")
|
||||
table = Table("Result")
|
||||
for item in emitted_items:
|
||||
table.add_result(item)
|
||||
setattr(table, "_rendered_by_cmdlet", True)
|
||||
@@ -1184,7 +1184,7 @@ class Download_File(Cmdlet):
|
||||
return f"https://www.youtube.com/watch?v={entry_id.strip()}"
|
||||
return None
|
||||
|
||||
table = ResultTable()
|
||||
table = Table()
|
||||
safe_url = str(url or "").strip()
|
||||
table.title = f'download-file -url "{safe_url}"' if safe_url else "download-file"
|
||||
if table_type:
|
||||
@@ -1194,7 +1194,7 @@ class Download_File(Cmdlet):
|
||||
table.table = table_type
|
||||
table.set_source_command("download-file", [])
|
||||
try:
|
||||
table.set_preserve_order(True)
|
||||
table._perseverance(True)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -1318,7 +1318,7 @@ class Download_File(Cmdlet):
|
||||
if remaining_args:
|
||||
base_cmd += " " + " ".join(remaining_args)
|
||||
|
||||
table = ResultTable(title=f"Available formats for {url}", max_columns=10, preserve_order=True)
|
||||
table = Table(title=f"Available formats for {url}", max_columns=10, preserve_order=True)
|
||||
table.set_table("ytdlp.formatlist")
|
||||
table.set_source_command("download-file", [url])
|
||||
|
||||
@@ -1601,7 +1601,7 @@ class Download_File(Cmdlet):
|
||||
if formats:
|
||||
formats_to_show = formats
|
||||
|
||||
table = ResultTable(title=f"Available formats for {url}", max_columns=10, preserve_order=True)
|
||||
table = Table(title=f"Available formats for {url}", max_columns=10, preserve_order=True)
|
||||
table.set_table("ytdlp.formatlist")
|
||||
table.set_source_command("download-file", [url])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user