Fixed download oversight
This commit is contained in:
parent
2d3d6d0699
commit
87e83e807f
|
@ -129,6 +129,7 @@ def getPreferredBitrate(dz, track, preferredBitrate, shouldFallback, uuid=None,
|
||||||
|
|
||||||
def getCorrectURL(track, formatName, formatNumber):
|
def getCorrectURL(track, formatName, formatNumber):
|
||||||
nonlocal wrongLicense, isGeolocked
|
nonlocal wrongLicense, isGeolocked
|
||||||
|
url = None
|
||||||
# Check the track with the legit method
|
# Check the track with the legit method
|
||||||
try:
|
try:
|
||||||
url = dz.get_track_url(track.trackToken, formatName)
|
url = dz.get_track_url(track.trackToken, formatName)
|
||||||
|
@ -441,10 +442,9 @@ class Downloader:
|
||||||
|
|
||||||
def downloadWrapper(self, extraData, track=None):
|
def downloadWrapper(self, extraData, track=None):
|
||||||
trackAPI_gw = extraData['trackAPI_gw']
|
trackAPI_gw = extraData['trackAPI_gw']
|
||||||
if '_EXTRA_TRACK' in trackAPI_gw:
|
if trackAPI_gw.get('_EXTRA_TRACK'):
|
||||||
extraData['trackAPI'] = trackAPI_gw['_EXTRA_TRACK'].copy()
|
extraData['trackAPI'] = trackAPI_gw['_EXTRA_TRACK'].copy()
|
||||||
del extraData['trackAPI_gw']['_EXTRA_TRACK']
|
del extraData['trackAPI_gw']['_EXTRA_TRACK']
|
||||||
del trackAPI_gw['_EXTRA_TRACK']
|
|
||||||
# Temp metadata to generate logs
|
# Temp metadata to generate logs
|
||||||
itemData = {
|
itemData = {
|
||||||
'id': trackAPI_gw['SNG_ID'],
|
'id': trackAPI_gw['SNG_ID'],
|
||||||
|
|
|
@ -16,7 +16,7 @@ class IDownloadObject:
|
||||||
self.progress = obj.get('progress', 0)
|
self.progress = obj.get('progress', 0)
|
||||||
self.errors = obj.get('errors', [])
|
self.errors = obj.get('errors', [])
|
||||||
self.files = obj.get('files', [])
|
self.files = obj.get('files', [])
|
||||||
self.extrasPath = obj.get('extrasPath')
|
self.extrasPath = obj.get('extrasPath', "")
|
||||||
if self.extrasPath: self.extrasPath = Path(self.extrasPath)
|
if self.extrasPath: self.extrasPath = Path(self.extrasPath)
|
||||||
self.progressNext = 0
|
self.progressNext = 0
|
||||||
self.uuid = f"{self.type}_{self.id}_{self.bitrate}"
|
self.uuid = f"{self.type}_{self.id}_{self.bitrate}"
|
||||||
|
|
|
@ -128,5 +128,5 @@ def formatListener(key, data=None):
|
||||||
if key == "startConversion":
|
if key == "startConversion":
|
||||||
return f"[{data}] Started converting"
|
return f"[{data}] Started converting"
|
||||||
if key == "finishConversion":
|
if key == "finishConversion":
|
||||||
return f"[{data}] Finished converting"
|
return f"[{data['uuid']}] Finished converting"
|
||||||
return ""
|
return ""
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -23,7 +23,7 @@ setup(
|
||||||
python_requires='>=3.7',
|
python_requires='>=3.7',
|
||||||
packages=find_packages(exclude=("tests",)),
|
packages=find_packages(exclude=("tests",)),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=["click", "pycryptodomex", "mutagen", "requests", "spotipy>=2.11.0", "deezer-py>=1.1.1"],
|
install_requires=["click", "pycryptodomex", "mutagen", "requests", "spotipy>=2.11.0", "deezer-py>=1.1.2"],
|
||||||
entry_points={
|
entry_points={
|
||||||
"console_scripts": [
|
"console_scripts": [
|
||||||
"deemix=deemix.__main__:download",
|
"deemix=deemix.__main__:download",
|
||||||
|
|
Loading…
Reference in New Issue