Skip to content

Commit

Permalink
fix max_print_length not set
Browse files Browse the repository at this point in the history
  • Loading branch information
nichind committed Dec 11, 2024
1 parent 9f7187b commit 28cf6c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pybalt/cobalt.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ async def download(
Raises:
- BadInstance: If the specified instance cannot be reached.
"""
max_print_length, _ = 0, 0
if playlist or len(findall("[&?]list=([^&]+)", url)) > 0:
if type(playlist) is str:
url = playlist
Expand Down Expand Up @@ -501,14 +502,14 @@ def shorten(s: str, additional_len: int = 0) -> str:
async with ClientSession(headers=self.headers) as session:
async with aopen(path.join(path_folder, filename), "wb") as f:
try:
max_print_length, _ = 0, 0
progress_chars = ["⢎⡰", "⢎⡡", "⢎⡑", "⢎⠱", "⠎⡱", "⢊⡱", "⢌⡱", "⢆⡱"]
progress_index = 0
total_size = 0
start_time = time()
last_update = 0
last_speed_update = 0
downloaded_since_last = 0
max_print_length, _ = get_terminal_size()
async with session.get(file.tunnel) as response:
print(f"\033[97m{filename}\033[0m", flush=True)
result_path = path.join(path_folder, f'"{filename}"')
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from setuptools import setup, find_packages
from glob import glob


def readme():
Expand All @@ -9,7 +8,7 @@ def readme():

setup(
name="pybalt",
version="2024.12.5",
version="2024.12.6",
author="nichind",
author_email="[email protected]",
description="Download mediafiles from YouTube, Twitter (X), Instagram, Reddit & more. CLI & python module for @imputnet's cobalt processing instance api.",
Expand Down

0 comments on commit 28cf6c2

Please sign in to comment.