✨ Track segments are downloaded simultaneously, which results in a huge speed increase. Some refactoring work has been done.

This commit is contained in:
Robert Honz
2024-11-12 22:15:11 +01:00
parent 4cef07b08f
commit 78a48348a8
6 changed files with 152 additions and 63 deletions
+2
View File
@@ -37,6 +37,7 @@ class Settings:
metadata_cover_embed: bool = True
cover_album_file: bool = True
extract_flac: bool = True
downloads_simultaneous_per_track_max: int = 20
@dataclass_json
@@ -82,6 +83,7 @@ class HelpSettings:
metadata_cover_embed: str = "Embed album cover into file."
cover_album_file: str = "Save cover to 'cover.jpg', if an album is downloaded."
extract_flac: str = "Extract FLAC audio tracks from MP4 containers and save them as `*.flac` (uses FFmpeg)."
downloads_simultaneous_per_track_max: str = "Maximum number of simultaneous chunk downloads per track."
@dataclass_json
+9
View File
@@ -0,0 +1,9 @@
import pathlib
from dataclasses import dataclass
@dataclass
class DownloadSegmentResult:
result: bool
url: str
path_segment: pathlib.Path