eaf-base-api 1.6.1__tar.gz → 1.6.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eaf_base_api
3
- Version: 1.6.1
3
+ Version: 1.6.2
4
4
  Summary: A base API for EchterAlsFake's Porn APIs
5
5
  Home-page: https://github.com/EchterAlsFake/eaf_base_api
6
6
  Author: Johannes Habel
@@ -0,0 +1,5 @@
1
+ __all__ = ["Core", "Quality", "setup_api", "default", "threaded", "FFMPEG", "Callback"]
2
+
3
+ from base_api.base import Core, Quality, setup_api
4
+ from base_api.modules.download import default, threaded, FFMPEG
5
+ from base_api.modules.progress_bars import Callback
@@ -10,12 +10,16 @@ class Callback:
10
10
  print(f"Downloaded: {downloaded} bytes / {total} bytes ({percentage:.2f}%)")
11
11
 
12
12
  @classmethod
13
- def text_progress_bar(cls, downloaded, total):
13
+ def text_progress_bar(cls, downloaded, total, title=False):
14
14
  bar_length = 50
15
15
  filled_length = int(round(bar_length * downloaded / float(total)))
16
16
  percents = round(100.0 * downloaded / float(total), 1)
17
17
  bar = '#' * filled_length + '-' * (bar_length - filled_length)
18
- print(f"\r[{bar}] {percents}%", end='')
18
+ if title is False:
19
+ print(f"\r[{bar}] {percents}%", end='')
20
+
21
+ else:
22
+ print(f"\r | {title} | -->: [{bar}] {percents}%", end='')
19
23
 
20
24
  @staticmethod
21
25
  def update_progress(downloaded, total, animation_phase):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eaf_base_api
3
- Version: 1.6.1
3
+ Version: 1.6.2
4
4
  Summary: A base API for EchterAlsFake's Porn APIs
5
5
  Home-page: https://github.com/EchterAlsFake/eaf_base_api
6
6
  Author: Johannes Habel
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="eaf_base_api",
5
- version="1.6.1",
5
+ version="1.6.2",
6
6
  packages=find_packages(),
7
7
  install_requires=[
8
8
  "requests", "ffmpeg-progress-yield"
File without changes
File without changes
File without changes