mirror of
https://gitlab.com/RemixDev/deemix-py.git
synced 2024-12-29 11:06:14 +00:00
Fixed typo
This commit is contained in:
parent
7ad388b999
commit
a3b96d3340
|
@ -1,3 +1,3 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
__version__ = "1.5.8"
|
__version__ = "1.5.9"
|
||||||
|
|
|
@ -15,7 +15,7 @@ from os import makedirs
|
||||||
from tempfile import gettempdir
|
from tempfile import gettempdir
|
||||||
|
|
||||||
from deemix.app.queueitem import QISingle, QICollection
|
from deemix.app.queueitem import QISingle, QICollection
|
||||||
from deemix.app.track import Track, AlbumDoesntExsists
|
from deemix.app.track import Track, AlbumDoesntExists
|
||||||
from deemix.utils import changeCase
|
from deemix.utils import changeCase
|
||||||
from deemix.utils.pathtemplates import generateFilename, generateFilepath, settingsRegexAlbum, settingsRegexArtist, settingsRegexPlaylistFile
|
from deemix.utils.pathtemplates import generateFilename, generateFilepath, settingsRegexAlbum, settingsRegexArtist, settingsRegexPlaylistFile
|
||||||
from deemix.api.deezer import USER_AGENT_HEADER, TrackFormats
|
from deemix.api.deezer import USER_AGENT_HEADER, TrackFormats
|
||||||
|
@ -53,7 +53,7 @@ errorMessages = {
|
||||||
'notAvailable': "Track not available on deezer's servers!",
|
'notAvailable': "Track not available on deezer's servers!",
|
||||||
'notAvailableNoAlternative': "Track not available on deezer's servers and no alternative found!",
|
'notAvailableNoAlternative': "Track not available on deezer's servers and no alternative found!",
|
||||||
'noSpaceLeft': "No space left on target drive, clean up some space for the tracks",
|
'noSpaceLeft': "No space left on target drive, clean up some space for the tracks",
|
||||||
'albumDoesntExsists': "Track's album does not exsist, failed to gather info"
|
'albumDoesntExists': "Track's album does not exsist, failed to gather info"
|
||||||
}
|
}
|
||||||
|
|
||||||
def downloadImage(url, path, overwrite=OverwriteOption.DONT_OVERWRITE):
|
def downloadImage(url, path, overwrite=OverwriteOption.DONT_OVERWRITE):
|
||||||
|
@ -232,8 +232,8 @@ class DownloadJob:
|
||||||
trackAPI=trackAPI_gw['_EXTRA_TRACK'] if '_EXTRA_TRACK' in trackAPI_gw else None,
|
trackAPI=trackAPI_gw['_EXTRA_TRACK'] if '_EXTRA_TRACK' in trackAPI_gw else None,
|
||||||
albumAPI=trackAPI_gw['_EXTRA_ALBUM'] if '_EXTRA_ALBUM' in trackAPI_gw else None
|
albumAPI=trackAPI_gw['_EXTRA_ALBUM'] if '_EXTRA_ALBUM' in trackAPI_gw else None
|
||||||
)
|
)
|
||||||
except AlbumDoesntExsists:
|
except AlbumDoesntExists:
|
||||||
raise DownloadError('albumDoesntExsists')
|
raise DownloadError('albumDoesntExists')
|
||||||
if self.queueItem.cancel: raise DownloadCancelled
|
if self.queueItem.cancel: raise DownloadCancelled
|
||||||
|
|
||||||
# Check if track not yet encoded
|
# Check if track not yet encoded
|
||||||
|
@ -453,7 +453,7 @@ class DownloadJob:
|
||||||
filepath = filepath / tempPath
|
filepath = filepath / tempPath
|
||||||
filename = filename[filename.rfind(pathSep) + len(pathSep):]
|
filename = filename[filename.rfind(pathSep) + len(pathSep):]
|
||||||
|
|
||||||
# Make sure the filepath exsists
|
# Make sure the filepath exists
|
||||||
makedirs(filepath, exist_ok=True)
|
makedirs(filepath, exist_ok=True)
|
||||||
writepath = filepath / f"{filename}{extensions[track.selectedFormat]}"
|
writepath = filepath / f"{filename}{extensions[track.selectedFormat]}"
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ class SpotifyHelper:
|
||||||
self.sp = None
|
self.sp = None
|
||||||
self.configFolder = configFolder
|
self.configFolder = configFolder
|
||||||
|
|
||||||
# Make sure config folder exsists
|
# Make sure config folder exists
|
||||||
if not self.configFolder:
|
if not self.configFolder:
|
||||||
self.configFolder = getConfigFolder()
|
self.configFolder = getConfigFolder()
|
||||||
self.configFolder = Path(self.configFolder)
|
self.configFolder = Path(self.configFolder)
|
||||||
|
|
|
@ -251,7 +251,7 @@ class Track:
|
||||||
albumAPI_gw = dz.get_album_gw(self.album['id'])
|
albumAPI_gw = dz.get_album_gw(self.album['id'])
|
||||||
except APIError:
|
except APIError:
|
||||||
albumAPI_gw = None
|
albumAPI_gw = None
|
||||||
raise AlbumDoesntExsists
|
raise AlbumDoesntExists
|
||||||
|
|
||||||
self.album['title'] = albumAPI_gw['ALB_TITLE']
|
self.album['title'] = albumAPI_gw['ALB_TITLE']
|
||||||
self.album['mainArtist'] = {
|
self.album['mainArtist'] = {
|
||||||
|
@ -398,5 +398,5 @@ class TrackError(Exception):
|
||||||
"""Base class for exceptions in this module."""
|
"""Base class for exceptions in this module."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class AlbumDoesntExsists(TrackError):
|
class AlbumDoesntExists(TrackError):
|
||||||
pass
|
pass
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ README = (HERE / "README.md").read_text()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="deemix",
|
name="deemix",
|
||||||
version="1.5.8",
|
version="1.5.9",
|
||||||
description="A barebone deezer downloader library",
|
description="A barebone deezer downloader library",
|
||||||
long_description=README,
|
long_description=README,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
|
|
Loading…
Reference in a new issue