Skip to content

Commit e8db366

Browse files
chore: major download speed boost
1 parent 440ec66 commit e8db366

6 files changed

Lines changed: 21 additions & 15 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ pip install --upgrade flix-cli
131131
- [`iina`](https://iina.io) - Alternate video player for MacOS
132132
- [`vlc`](https://apps.apple.com/us/app/vlc-media-player/id650377962) - Video Player for iPhone/iPad
133133
- [`ffmpeg`](https://github.com/FFmpeg/FFmpeg) - Download manager
134-
- [`yt-dlp`](https://github.com/yt-dlp/yt-dlp) - Frontend for ffmpeg
135134
- [`fzf`](https://github.com/junegunn/fzf) - for selection menu
136135

137136
# Usage

flix_cli/core/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__core__ = "1.7.11.5"
1+
__core__ = "1.7.11.6"

flix_cli/core/utils/__config__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def get_config() -> str:
2828
CONFIG_FILE = f"{CONFIG_DIR}/flix-cli.conf"
2929

3030
config = {}
31+
player = ""
32+
downloads_dir = ""
3133

3234
if os.path.exists(CONFIG_FILE):
3335
with open(CONFIG_FILE, "r") as f:
@@ -37,7 +39,11 @@ def get_config() -> str:
3739
key, value = line.split('=', 1)
3840
config[key.strip()] = value.strip().strip('"')
3941

40-
player = config.get("player")
41-
downloads_dir = config.get("dl_dir")
42+
player = config.get("player")
43+
downloads_dir = config.get("dl_dir")
44+
45+
else:
46+
player = "mpv"
47+
downloads_dir = f"C:/Users/{getpass.getuser()}/Downloads" if plt.system() == "Windows" else f"{os.path.expanduser("~")}/Downloads"
4248

4349
return player, downloads_dir

flix_cli/core/utils/__downloader__.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,22 @@ def download(path, name, file, referer, subs):
1818
name = name.replace(" ", "-")
1919
name = name.replace("\"", "")
2020
url = file
21-
if not os.path.exists(f"{path}/{FLIX_CLI_DOWNLOADS}"):
22-
os.makedirs(f"{path}/{FLIX_CLI_DOWNLOADS}")
2321

2422
if os.path.exists(dl_path):
25-
path = dl_path
26-
23+
path = dl_path
24+
25+
if not os.path.exists(f"{path}/{FLIX_CLI_DOWNLOADS}"):
26+
os.makedirs(f"{path}/{FLIX_CLI_DOWNLOADS}")
27+
2728
path = f"{path}/{FLIX_CLI_DOWNLOADS}"
2829

2930
args = [
3031
YT_DLP_EXECUTABLE,
31-
url,
32-
"--downloader",
33-
"ffmpeg",
34-
"-o",
35-
f"{path}/{name}.mp4"
32+
f"{url}",
33+
"--no-skip-unavailable-fragments",
34+
"--fragment-retries", "infinite",
35+
"-N", "16",
36+
"-o", f"{path}/{name}.mp4"
3637
]
3738

3839
yt_dl_process = subprocess.Popen(args)

flix_cli/core/utils/__player__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
MPV_EXECUTABLE = "mpv"
1010
IINA_EXECUTABLE = "iina"
11-
VLC_EXECUTABLE = "vlc"
11+
#VLC_EXECUTABLE = "vlc"
1212

1313
client = httpx.Client(timeout=None)
1414

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "flix-cli"
7-
version = "1.7.11.5"
7+
version = "1.7.11.6"
88
description = "A high efficient, powerful and fast movie scraper."
99
authors = ["DemonKingSwarn <rockingswarn@gmail.com>"]
1010
license = "GPLv3"

0 commit comments

Comments
 (0)