forked from DRMTalks/devine
Use console.rule between sections of dl's new logs
These are handy to separate the logs to be per-title, and per section of initialization.
This commit is contained in:
parent
b2bbc808c4
commit
389fa6e979
|
@ -28,6 +28,8 @@ from pywidevine.cdm import Cdm as WidevineCdm
|
|||
from pywidevine.device import Device
|
||||
from pywidevine.remotecdm import RemoteCdm
|
||||
from tqdm import tqdm
|
||||
from rich.padding import Padding
|
||||
from rich.rule import Rule
|
||||
|
||||
from devine.core.config import config
|
||||
from devine.core.console import console
|
||||
|
@ -282,8 +284,10 @@ class dl:
|
|||
self.log.error("No titles returned, nothing to download...")
|
||||
sys.exit(1)
|
||||
|
||||
for line in str(titles).splitlines(keepends=False):
|
||||
console.log(line)
|
||||
console.print(Padding(
|
||||
Rule(f"[rule.text]{titles.__class__.__name__}: {titles}"),
|
||||
(1, 2)
|
||||
))
|
||||
|
||||
if list_titles:
|
||||
for title in titles:
|
||||
|
@ -294,7 +298,11 @@ class dl:
|
|||
if isinstance(title, Episode) and wanted and f"{title.season}x{title.number}" not in wanted:
|
||||
continue
|
||||
|
||||
console.log(f"Getting tracks for {title}")
|
||||
console.print(Padding(
|
||||
Rule(f"[rule.text]{title}"),
|
||||
(1, 2)
|
||||
))
|
||||
|
||||
if slow and i != 0:
|
||||
delay = random.randint(60, 120)
|
||||
with console.status(f"Delaying by {delay} seconds..."):
|
||||
|
|
Loading…
Reference in New Issue