From 8673f1d9afa2788f28fe3fe23de65b6f8c731425 Mon Sep 17 00:00:00 2001 From: nichuanfang Date: Wed, 11 Oct 2023 04:42:16 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E5=89=AA=E5=88=87=E9=9F=B3?= =?UTF-8?q?=E4=B9=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mk/__main__.py | 4 ++-- mk/mp3_util.py | 2 +- setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mk/__main__.py b/mk/__main__.py index 3988ac3..78ee7da 100644 --- a/mk/__main__.py +++ b/mk/__main__.py @@ -92,7 +92,7 @@ def clip(path:str,start:str,end:str): if img_data!=None: # 添加封面 mp3 = MP3(path) - mp3.add_cover(img_data) + mp3.add_bytes_cover(img_data) mp3.save() print('剪辑完成!') @@ -161,7 +161,7 @@ def main(args=None): # title = info['title'] - # download('https://youtu.be/xsk1SLmf9a0?si=zj8z06UGwLAKEMOj','Handbook - See The World','https://i2.cdn.turner.com/cnn/2008/WORLD/asiapcf/09/03/ta.jaychou/art.jaychou.jpg') + # download('https://www.bilibili.com/video/BV1yt41177RB?t=253.7') # clip('青花瓷-周杰伦.mp3','00:00:00','00:00:30') pass diff --git a/mk/mp3_util.py b/mk/mp3_util.py index fb95cd4..fb1ce07 100644 --- a/mk/mp3_util.py +++ b/mk/mp3_util.py @@ -57,7 +57,7 @@ def add_cover(self,cover_url): print(f'封面{cover_url}添加完成') # 给mp3文件添加封面 - def add_cover(self,image_data:bytes): + def add_bytes_cover(self,image_data:bytes): # 插入封面 self.songFile['APIC'] = APIC( encoding=0, diff --git a/setup.py b/setup.py index 35e0a87..02c8b32 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name='music-tool-kit', - version='0.1.4', + version='0.1.5', description='A tool kit for music download and clip', long_description_content_type='text/markdown', long_description=readme,