feat: 修复增加下载网站tag引入的一个bug

This commit is contained in:
tigeren 2025-11-22 19:06:41 +00:00
parent 3c3d418a07
commit 1670c5d7fc
2 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
docker build -t 192.168.2.212:3000/tigeren/metube:1.3 .
docker build -t 192.168.2.212:3000/tigeren/metube:1.4 .
docker push 192.168.2.212:3000/tigeren/metube:1.3
docker push 192.168.2.212:3000/tigeren/metube:1.4
docker compose up -d --build --force-recreate

View File

@ -563,10 +563,12 @@ class DownloadQueue:
parsed_url = urlparse(v.info.url)
v.info.website = parsed_url.netloc
if v.info.filename:
# Use getattr with default to safely check for filename attribute
filename = getattr(v.info, 'filename', None)
if filename:
dldirectory, _ = self.__calc_download_path(v.info.quality, v.info.format, v.info.folder)
if dldirectory:
filepath = os.path.join(dldirectory, v.info.filename)
filepath = os.path.join(dldirectory, filename)
v.info.file_exists = os.path.exists(filepath)
else:
v.info.file_exists = False