diff --git a/Dockerfile b/Dockerfile index 2f648a7..6ff5b57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,4 @@ RUN pip install . RUN mkdir /music WORKDIR /music -ENTRYPOINT ["spotdl", "-f", "/music"] +ENTRYPOINT ["spotdl"] diff --git a/spotdl/helpers/spotify.py b/spotdl/helpers/spotify.py index ab3ea38..9695a39 100644 --- a/spotdl/helpers/spotify.py +++ b/spotdl/helpers/spotify.py @@ -156,10 +156,10 @@ class SpotifyHelpers: logger.info(u"Writing {0} tracks to {1}.".format(tracks["total"], target_file)) write_to_stdout = target_file == "-" if write_to_stdout: - with open(target_file, "a") as file_out: - track_urls = writer(tracks, file_out) - else: file_out = sys.stdout track_urls = writer(tracks, file_out) + else: + with open(target_file, "a") as file_out: + track_urls = writer(tracks, file_out) return track_urls