Skip to content

Commit

Permalink
CHORE: add cover
Browse files Browse the repository at this point in the history
  • Loading branch information
thib1984 committed Mar 30, 2024
1 parent e2e8e31 commit 40c6aea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# 2.4.1

- [x] add cover

# 2.4.0

- [ ] Direct url download
- [ ] Add/Remove python versions
- [x] Direct url download
- [x] Add/Remove python versions

# 2.3.0

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name="ytdlmusic",
version="2.4.0",
version="2.4.1",
description="ytdlmusic is a command-line program to search and download music files from YouTube without use browser.",
long_description="The complete description/installation/use/FAQ is available at : https://github.com/thib1984/ytdlmusic#readme",
long_description_content_type="text/markdown",
Expand Down
4 changes: 3 additions & 1 deletion ytdlmusic/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def download_song(song_url, filename):
opts = {
"outtmpl": name_without_extension(filename) + ".%(ext)s",
"format": "m4a/best",
'writethumbnail': True,
}

if extension(filename) == ".mp3":
opts["format"] = "bestaudio/best"
opts["postprocessors"] = [
Expand All @@ -46,6 +46,7 @@ def download_song(song_url, filename):
"preferredquality": "256",
},
{"key": "FFmpegMetadata"},
{"key": "EmbedThumbnail"},
]
if is_quality():
opts.get("postprocessors")[0]["preferredquality"] = "320"
Expand All @@ -58,6 +59,7 @@ def download_song(song_url, filename):
"preferredcodec": "vorbis",
},
{"key": "FFmpegMetadata"},
{"key": "EmbedThumbnail"},
]

if is_verbose():
Expand Down

0 comments on commit 40c6aea

Please sign in to comment.