]> Skullheadx's Git Forge - youtube-downloader.git/commitdiff
its scuffed but it works sometimes to get albums cli
authorSkullheadx <94652084+Skullheadx@users.noreply.github.com>
Mon, 14 Oct 2024 19:54:51 +0000 (15:54 -0400)
committerSkullheadx <94652084+Skullheadx@users.noreply.github.com>
Mon, 14 Oct 2024 19:54:51 +0000 (15:54 -0400)
links.txt [deleted file]
ytdl/__pycache__/funcmodule.cpython-312.pyc
ytdl/funcmodule.py

diff --git a/links.txt b/links.txt
deleted file mode 100644 (file)
index 5acca21..0000000
--- a/links.txt
+++ /dev/null
@@ -1 +0,0 @@
-https://music.youtube.com/watch?v=lYBUbBu4W08&si=z03FVSmqqyxKZFmZ
index af7fa62b138e763b4562e3255eccd304e5e28bc2..91e1dc7737f75c15a08dc87db4088e5396deda98 100644 (file)
Binary files a/ytdl/__pycache__/funcmodule.cpython-312.pyc and b/ytdl/__pycache__/funcmodule.cpython-312.pyc differ
index 83bfefb85b819db469d9d69b42455be7d430e077..53ddeeed5ff739006c502121312440efa0f87747 100644 (file)
@@ -62,7 +62,9 @@ def download(link, mode, force=False):
 
 
 def convert_add_metadata(input1, input2, output, yt, m1=1, m2=0):
-    artist, album, title = yt.vid_info['videoDetails']['keywords']
+    album = yt.title
+    if 'keywords' in yt.vid_info['videoDetails'].keys() and len(yt.vid_info['videoDetails']['keywords']) > 2:
+        album = yt.vid_info['videoDetails']['keywords'][-2]
     command = [
         'ffmpeg',
         '-i', input1,
@@ -71,8 +73,8 @@ def convert_add_metadata(input1, input2, output, yt, m1=1, m2=0):
         '-map', f'{m2}',
         '-c', 'copy',
         f'-disposition:v:{m2}', 'attached_pic',
-        '-metadata', f'title={title}',
-        '-metadata', f'artist={artist}',
+        '-metadata', f'title={yt.title}',
+        '-metadata', f'artist={yt.author}',
         '-metadata', f'comment={big_num_format(yt.views) + " views"}',
         '-metadata', f'date={yt.publish_date}',
         '-metadata', f'album={album}',