Compare commits

..

No commits in common. "3deefbadd830b4b460c3767ef29fcfee1e201e67" and "ec7e2036fbfdf7e63354c7b3980fa323fb1e25a9" have entirely different histories.

2 changed files with 7 additions and 14 deletions

View File

@ -1,5 +1,4 @@
import yt_dlp as yt import yt_dlp as yt
from plyer import notification
def get(yt_url): def get(yt_url):
ytdl_options = { ytdl_options = {
@ -13,22 +12,17 @@ def get(yt_url):
'embed_metadata': True, 'embed_metadata': True,
'format': 'any/bestaudio/best', 'format': 'any/bestaudio/best',
# See help(yt_dlp.postprocessor) for a list of available Postprocessors and their arguments # See help(yt_dlp.postprocessor) for a list of available Postprocessors and their arguments
'postprocessors': [{ # Extract audio using ffmpeg, 'postprocessors': [{ # Extract audio using ffmpeg
'key': 'FFmpegMetadata'
},{
'key': 'FFmpegExtractAudio', 'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3', 'preferredcodec': 'mp3',
},{'key': 'FFmpegMetadata'},
{'key': 'EmbedThumbnail'},] }]
} }
with yt.YoutubeDL(ytdl_options) as ytdl: with yt.YoutubeDL(ytdl_options) as ytdl:
ytdl.download(yt_url) ytdl.download(yt_url)
notification.notify(
title = "yt2mp3",
message = "Download and conversion complete.",
app_icon = None,
timeout = 5,
)
def dl_progress(d): def dl_progress(d):

View File

@ -1,2 +1 @@
yt-dlp yt-dlp
plyer