mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2026-02-15 13:59:55 +00:00
Fix crash if FFmpeg isn't found
`EncoderFFmpeg()` objects are now initialized while the program is running, instead on invocation.
This commit is contained in:
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
The release dates mentioned follow the format `DD-MM-YYYY`.
|
The release dates mentioned follow the format `DD-MM-YYYY`.
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
### Fixed
|
||||||
|
- Failure on invoking spotdl if FFmpeg isn't found. It should now warn about missing
|
||||||
|
FFmpeg and move ahead without encoding. [@ritiek](https://github.com/ritiek)
|
||||||
|
(29b1f31a2622f749df83c3072c4cbb22615bff95)
|
||||||
|
|
||||||
## [2.0.3] (Hotfix Release) - 18-05-2020
|
## [2.0.3] (Hotfix Release) - 18-05-2020
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ class Track:
|
|||||||
return progress_bar
|
return progress_bar
|
||||||
|
|
||||||
def download_while_re_encoding(self, stream, target_path, target_encoding=None,
|
def download_while_re_encoding(self, stream, target_path, target_encoding=None,
|
||||||
encoder=EncoderFFmpeg(), show_progress=True):
|
encoder=EncoderFFmpeg, show_progress=True):
|
||||||
total_chunks = self.calculate_total_chunks(stream["filesize"])
|
total_chunks = self.calculate_total_chunks(stream["filesize"])
|
||||||
process = encoder.re_encode_from_stdin(
|
process = encoder().re_encode_from_stdin(
|
||||||
stream["encoding"],
|
stream["encoding"],
|
||||||
target_path,
|
target_path,
|
||||||
target_encoding=target_encoding
|
target_encoding=target_encoding
|
||||||
@@ -80,10 +80,10 @@ class Track:
|
|||||||
writer(response, progress_bar, file_io)
|
writer(response, progress_bar, file_io)
|
||||||
|
|
||||||
def re_encode(self, input_path, target_path, target_encoding=None,
|
def re_encode(self, input_path, target_path, target_encoding=None,
|
||||||
encoder=EncoderFFmpeg(), show_progress=True):
|
encoder=EncoderFFmpeg, show_progress=True):
|
||||||
stream = self.metadata["streams"].getbest()
|
stream = self.metadata["streams"].getbest()
|
||||||
total_chunks = self.calculate_total_chunks(stream["filesize"])
|
total_chunks = self.calculate_total_chunks(stream["filesize"])
|
||||||
process = encoder.re_encode_from_stdin(
|
process = encoder().re_encode_from_stdin(
|
||||||
stream["encoding"],
|
stream["encoding"],
|
||||||
target_path,
|
target_path,
|
||||||
target_encoding=target_encoding
|
target_encoding=target_encoding
|
||||||
|
|||||||
Reference in New Issue
Block a user