Skip to content

Commit 23c7ebe

Browse files
committed
minor fixes
1 parent 8082780 commit 23c7ebe

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
First stable release: `1.0.0`
88

9-
Current: `1.1.1`
9+
Current: `1.1.2`
1010

1111
*Do not require authentication.*
1212

onedrivedownloader/main.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,13 @@ def download(url: str, filename: str, unzip=True, unzip_path: str = None, force_
7373
filename = os.path.join(filename, fname)
7474

7575
total_size_in_bytes = int(response.headers.get('content-length', 0))
76-
progress_bar = tqdm(total=total_size_in_bytes, unit='iB', unit_scale=True) if total_size_in_bytes > 1024 else None
7776
block_size = 1024
7877

7978
ret_path = filename
8079

8180
if not os.path.exists(filename) or force_download:
81+
progress_bar = tqdm(total=total_size_in_bytes, unit='iB', unit_scale=True) if total_size_in_bytes > 1024 else None
82+
8283
_create_if_not_exists(filename)
8384

8485
with open(filename, 'wb') as f:
@@ -97,6 +98,7 @@ def download(url: str, filename: str, unzip=True, unzip_path: str = None, force_
9798
# unzip file if necessary
9899
if unzip:
99100
if filename.endswith(".zip") or filename.endswith(".tar.gz"):
101+
print("Unzipping file...")
100102
unzip_path = unzip_path if unzip_path is not None else os.path.split(filename)[0]
101103
clean_unzip_path = force_unzip and os.path.realpath(unzip_path) not in os.path.realpath(filename)
102104
ret_path = unzip_path

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
setup(
77
name='onedrivedownloader',
88
packages=find_packages(),
9-
version='1.1.1',
9+
version='1.1.2',
1010
license='MIT',
1111
description='Python utility to download files through OneDrive',
1212
long_description=long_description,
1313
long_description_content_type="text/markdown",
1414
author='Lorenzo Bonicelli',
1515
author_email='[email protected]',
1616
url='https://github.com/loribonna/onedrivedownloader',
17-
download_url='https://github.com/loribonna/onedrivedownloader/archive/refs/tags/v1.1.1.zip',
17+
download_url='https://github.com/loribonna/onedrivedownloader/archive/refs/tags/v1.1.2.zip',
1818
keywords=['onedrive', 'downloader', 'download', 'python', 'utility'],
1919
install_requires=["requests","tqdm"],
2020
classifiers=[

0 commit comments

Comments
 (0)