mirror of
https://github.com/yaronzz/Tidal-Media-Downloader.git
synced 2026-08-03 13:27:04 +03:00
update
This commit is contained in:
@@ -109,12 +109,12 @@ class TidalAPI(object):
|
||||
msg, data = self.__get__(path, params, retry)
|
||||
if msg is not None:
|
||||
return msg, None
|
||||
|
||||
if 'totalNumberOfItems'in data:
|
||||
|
||||
if 'totalNumberOfItems' in data:
|
||||
total = data['totalNumberOfItems']
|
||||
if total > 0 and total <= len(ret):
|
||||
return None, ret
|
||||
|
||||
|
||||
num = 0
|
||||
for item in data["items"]:
|
||||
num += 1
|
||||
@@ -277,7 +277,7 @@ class TidalAPI(object):
|
||||
def getVideo(self, id):
|
||||
msg, data = self.__get__('videos/' + str(id))
|
||||
return msg, dictToModel(data, Video())
|
||||
|
||||
|
||||
def getMix(self, id):
|
||||
msg, tracks, videos = self.getItems(id, Type.Mix)
|
||||
if msg is not None:
|
||||
@@ -287,7 +287,7 @@ class TidalAPI(object):
|
||||
mix.tracks = tracks
|
||||
mix.videos = videos
|
||||
return None, mix
|
||||
|
||||
|
||||
def search(self, text: str, type: Type, offset: int, limit: int):
|
||||
typeStr = "ARTISTS,ALBUMS,TRACKS,VIDEOS,PLAYLISTS"
|
||||
if type == Type.Album:
|
||||
@@ -397,7 +397,7 @@ class TidalAPI(object):
|
||||
if sid is None or sid == "":
|
||||
return None
|
||||
return "https://resources.tidal.com/images/" + sid.replace("-", "/") + "/" + width + "x" + height + ".jpg"
|
||||
|
||||
|
||||
def getCoverData(self, sid, width="320", height="320"):
|
||||
url = self.getCoverUrl(sid, width, height)
|
||||
try:
|
||||
|
||||
@@ -13,10 +13,10 @@ import logging
|
||||
import os
|
||||
import time
|
||||
import requests
|
||||
import m3u8dl
|
||||
import aigpy
|
||||
import lyricsgenius
|
||||
import datetime
|
||||
import tidal_dl.m3u8dl as m3u8dl
|
||||
from tidal_dl import apiKey
|
||||
import tidal_dl
|
||||
from tidal_dl.decryption import decrypt_file
|
||||
|
||||
@@ -26,8 +26,11 @@ class ScrollWidget(QScrollArea):
|
||||
self.setWidget(self._mainW)
|
||||
self.setWidgetResizable(True)
|
||||
|
||||
def addWidgetItem(self, widget: QWidget):
|
||||
self._layout.insertWidget(self._numWidget, widget)
|
||||
def addWidgetItem(self, widget: QWidget, isTail=False):
|
||||
if isTail:
|
||||
self._layout.insertWidget(self._numWidget, widget)
|
||||
else:
|
||||
self._layout.insertWidget(0, widget)
|
||||
self._numWidget += 1
|
||||
|
||||
def delWidgetItem(self, widget: QWidget):
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
@Desc :
|
||||
"""
|
||||
from tidal_gui.downloader import downloadImp
|
||||
from tidal_gui.view.mainView import MainView
|
||||
from tidal_gui.view.mainView import MainView, PageType
|
||||
from tidal_gui.viewModel.aboutModel import AboutModel
|
||||
from tidal_gui.viewModel.loginModel import LoginModel
|
||||
from tidal_gui.viewModel.searchModel import SearchModel
|
||||
@@ -29,6 +29,7 @@ class MainModel(ViewModel):
|
||||
|
||||
self.loginModel.SIGNAL_LOGIN_SUCCESS.connect(self.__loginSuccess__)
|
||||
self.searchModel.SIGNAL_ADD_TASKITEM.connect(self.taskModel.addTaskItem)
|
||||
self.searchModel.SIGNAL_ADD_TASKITEM.connect(self.__addTaskItem__)
|
||||
|
||||
self.view = MainView()
|
||||
self.view.setSearchView(self.searchModel.view)
|
||||
@@ -40,6 +41,9 @@ class MainModel(ViewModel):
|
||||
|
||||
downloadImp.setTaskModel(self.taskModel)
|
||||
downloadImp.start()
|
||||
|
||||
def __addTaskItem__(self):
|
||||
self.view.showPage(PageType.Task)
|
||||
|
||||
def uninit(self):
|
||||
self.taskModel.uninit()
|
||||
|
||||
@@ -46,6 +46,9 @@ rm -rf tidal_dl_test.egg-info
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user