upload new version

This commit is contained in:
Yaronzz
2022-06-24 10:19:41 +08:00
parent e1ee47b93c
commit fd97a2b966
12 changed files with 185 additions and 211 deletions
Binary file not shown.
+1 -1
View File
@@ -11,6 +11,6 @@ setup(
packages=find_packages(exclude=['tidal_dl*']), packages=find_packages(exclude=['tidal_dl*']),
include_package_data = True, include_package_data = True,
platforms = "any", platforms = "any",
install_requires=["tidal-dl", "PyQt5"], install_requires=["tidal-dl"],
entry_points={'console_scripts': [ 'tidal-gui = tidal_gui:main', ]} entry_points={'console_scripts': [ 'tidal-gui = tidal_gui:main', ]}
) )
+1 -3
View File
@@ -17,8 +17,6 @@ setup(
"requests>=2.22.0", "requests>=2.22.0",
"pycryptodome", "pycryptodome",
"pydub", "pydub",
"prettytable", "prettytable"],
"PyQt5",
"qt-material"],
entry_points={'console_scripts': ['tidal-dl = tidal_dl:main', ]} entry_points={'console_scripts': ['tidal-dl = tidal_dl:main', ]}
) )
+1 -1
View File
@@ -13,7 +13,7 @@ import getopt
from tidal_dl.events import * from tidal_dl.events import *
from tidal_dl.settings import * from tidal_dl.settings import *
from tidal_dl.gui import * from tidal_dl.gui import startGui
def mainCommand(): def mainCommand():
+8 -8
View File
@@ -120,12 +120,12 @@ def downloadVideo(video: Video, album: Album = None, playlist: Playlist = None):
m3u8content = requests.get(stream.m3u8Url).content m3u8content = requests.get(stream.m3u8Url).content
if m3u8content is None: if m3u8content is None:
Printf.err(f"DL Video[{video.title}] getM3u8 failed.{str(e)}") Printf.err(f"DL Video[{video.title}] getM3u8 failed.{str(e)}")
return False return False, f"GetM3u8 failed.{str(e)}"
urls = aigpy.m3u8.parseTsUrls(m3u8content) urls = aigpy.m3u8.parseTsUrls(m3u8content)
if len(urls) <= 0: if len(urls) <= 0:
Printf.err(f"DL Video[{video.title}] getTsUrls failed.{str(e)}") Printf.err(f"DL Video[{video.title}] getTsUrls failed.{str(e)}")
return False return False, "GetTsUrls failed.{str(e)}"
check, msg = aigpy.m3u8.downloadByTsUrls(urls, path) check, msg = aigpy.m3u8.downloadByTsUrls(urls, path)
if check: if check:
@@ -133,10 +133,10 @@ def downloadVideo(video: Video, album: Album = None, playlist: Playlist = None):
return True return True
else: else:
Printf.err(f"DL Video[{video.title}] failed.{msg}") Printf.err(f"DL Video[{video.title}] failed.{msg}")
return False return False, msg
except Exception as e: except Exception as e:
Printf.err(f"DL Video[{video.title}] failed.{str(e)}") Printf.err(f"DL Video[{video.title}] failed.{str(e)}")
return False return False, str(e)
def downloadTrack(track: Track, album=None, playlist=None, userProgress=None, partSize=1048576): def downloadTrack(track: Track, album=None, playlist=None, userProgress=None, partSize=1048576):
@@ -153,7 +153,7 @@ def downloadTrack(track: Track, album=None, playlist=None, userProgress=None, pa
# check exist # check exist
if __isSkip__(path, stream.url): if __isSkip__(path, stream.url):
Printf.success(aigpy.path.getFileName(path) + " (skip:already exists!)") Printf.success(aigpy.path.getFileName(path) + " (skip:already exists!)")
return True return True, ''
# download # download
logging.info("[DL Track] name=" + aigpy.path.getFileName(path) + "\nurl=" + stream.url) logging.info("[DL Track] name=" + aigpy.path.getFileName(path) + "\nurl=" + stream.url)
@@ -164,7 +164,7 @@ def downloadTrack(track: Track, album=None, playlist=None, userProgress=None, pa
check, err = tool.start(SETTINGS.showProgress) check, err = tool.start(SETTINGS.showProgress)
if not check: if not check:
Printf.err(f"DL Track[{track.title}] failed.{str(err)}") Printf.err(f"DL Track[{track.title}] failed.{str(err)}")
return False return False, str(err)
# encrypted -> decrypt and remove encrypted file # encrypted -> decrypt and remove encrypted file
__encrypted__(stream, path + '.part', path) __encrypted__(stream, path + '.part', path)
@@ -186,7 +186,7 @@ def downloadTrack(track: Track, album=None, playlist=None, userProgress=None, pa
__setMetaData__(track, album, path, contributors, lyrics) __setMetaData__(track, album, path, contributors, lyrics)
Printf.success(track.title) Printf.success(track.title)
return True return True, ''
except Exception as e: except Exception as e:
Printf.err(f"DL Track[{track.title}] failed.{str(e)}") Printf.err(f"DL Track[{track.title}] failed.{str(e)}")
return False return False, str(e)
+13 -3
View File
@@ -8,19 +8,27 @@
@Contact : yaronhuang@foxmail.com @Contact : yaronhuang@foxmail.com
@Desc : @Desc :
""" """
import os
import sys import sys
import _thread import _thread
import importlib
from tidal_dl.events import * from tidal_dl.events import *
from tidal_dl.settings import * from tidal_dl.settings import *
from tidal_dl.printf import *
enableGui = False
try:
params = importlib.import_module('PyQt5')
enableGui = True
except Exception as e:
pass
if enableGui:
from PyQt5.QtCore import Qt from PyQt5.QtCore import Qt
from PyQt5.QtCore import pyqtSignal from PyQt5.QtCore import pyqtSignal
from PyQt5 import QtWidgets from PyQt5 import QtWidgets
from qt_material import apply_stylesheet from qt_material import apply_stylesheet
class MainView(QtWidgets.QWidget): class MainView(QtWidgets.QWidget):
s_downloadEnd = pyqtSignal(str, bool, str) s_downloadEnd = pyqtSignal(str, bool, str)
@@ -170,7 +178,9 @@ def startGui():
window.checkLogin() window.checkLogin()
app.exec_() app.exec_()
else:
def startGui():
Printf.err("Not support gui. Please type: `pip3 install PyQt5 qt_material`")
if __name__ == '__main__': if __name__ == '__main__':
SETTINGS.read(getProfilePath()) SETTINGS.read(getProfilePath())
+1 -1
View File
@@ -20,7 +20,7 @@ from tidal_dl.settings import *
from tidal_dl.lang.language import * from tidal_dl.lang.language import *
VERSION = '2022.06.23.3' VERSION = '2022.06.24.1'
__LOGO__ = f''' __LOGO__ = f'''
/$$$$$$$$ /$$ /$$ /$$ /$$ /$$ /$$$$$$$$ /$$ /$$ /$$ /$$ /$$
|__ $$__/|__/ | $$ | $$ | $$| $$ |__ $$__/|__/ | $$ | $$ | $$| $$
-58
View File
@@ -1,58 +0,0 @@
cd TIDALDL-PY
rm -rf dist
rm -rf build
rm -rf exe/tidal-dl.exe
rm MANIFEST.in
rm -rf tidal_dl.egg-info
rm -rf tidal_gui.egg-info
rm -rf tidal_dl_test.egg-info
mkdir exe
# pack
python setup.py sdist bdist_wheel
# creat exe file
pyinstaller -F tidal_dl/__init__.py
# rename exe name
mv dist/__init__.exe exe/tidal-dl.exe
pip uninstall -y tidal-dl
# creat requirements.txt
# pipreqs ./ --force --encoding=utf8
# python setup.py install
# upload
twine upload dist/*
cd TIDALDL-PY
rm -rf dist
rm -rf build
rm -rf exe/tidal-gui.exe
cp -rf guiStatic.in MANIFEST.in
rm -rf tidal_dl.egg-info
rm -rf tidal_gui.egg-info
rm -rf tidal_dl_test.egg-info
# pack
python setup-gui.py sdist bdist_wheel
# creat exe file
pyinstaller -F tidal_gui/__init__.py -w
pyinstaller -F -w -p C:/Windows/System32/downlevel tidal_gui/__init__.py
# rename exe name
mv dist/__init__.exe exe/tidal-gui.exe
pip uninstall -y tidal-gui
# upload
twine upload dist/*
+20
View File
@@ -0,0 +1,20 @@
rm -rf dist
rm -rf build
rm -rf __init__.spec
cd TIDALDL-PY
rm -rf __init__.spec
rm -rf dist
rm -rf build
rm -rf exe
rm -rf MANIFEST.in
rm -rf *.egg-info
python setup.py sdist bdist_wheel
pyinstaller -F tidal_dl/__init__.py
mkdir exe
mv dist/__init__.exe exe/tidal-dl.exe
pip uninstall -y tidal-dl
cd ..
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

+4
View File
@@ -0,0 +1,4 @@
cd TIDALDL-PY
twine upload dist/*
cd ..