Skip to content

Commit

Permalink
Write FLACs to tempfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
7x11x13 committed Jul 14, 2024
1 parent e54d57c commit 8990483
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scdl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Python Soundcloud Music Downloader."""

__version__ = "v2.11.0"
__version__ = "v2.11.1"
7 changes: 4 additions & 3 deletions scdl/scdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1203,9 +1203,8 @@ def build_ffmpeg_encoding_args(
supported = get_ffmpeg_supported_options()
ffmpeg_args = [
"ffmpeg",
# Disable all the useless stuff
"-loglevel",
"error",
"debug" if kwargs["debug"] else "error",
# Input stream
"-i",
input_file,
Expand Down Expand Up @@ -1428,7 +1427,7 @@ def _get_ffmpeg_pipe(


def _is_unsupported_codec_for_streaming(codec: str) -> bool:
return codec in ("ipod",)
return codec in ("ipod", "flac")


def _re_encode_ffmpeg(
Expand Down Expand Up @@ -1514,6 +1513,8 @@ def read_stdout() -> None:
if stdin_thread:
stdin_thread.join()

logger.debug(f"FFmpeg output: {errors_output}")

# Make sure that process has exited and get its exit code
pipe.wait()
if pipe.returncode != 0:
Expand Down
1 change: 1 addition & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def assert_track(

if check_metadata:
f = music_tag.load_file(file)
assert f["#length"].value
assert f["title"].value == expected_title
assert f["artist"].value == expected_artist
if expected_genre:
Expand Down

0 comments on commit 8990483

Please sign in to comment.