Skip to content

Commit

Permalink
add tag-composer
Browse files Browse the repository at this point in the history
  • Loading branch information
yaronzz committed Aug 19, 2019
1 parent 04cfdc1 commit d86f600
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 7 deletions.
Binary file modified TIDALDL-PY/exe/tidal-dl.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion TIDALDL-PY/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
aigpy==2019.8.12.3
aigpy==2019.8.19.0
requests==2.21.0
ffmpeg==1.4
futures
Expand Down
4 changes: 2 additions & 2 deletions TIDALDL-PY/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
setup(
name = 'tidal-dl',
version="2019.8.17.0",
version="2019.8.19.0",
license = "MIT Licence",
description = "Tidal Music Download.",

Expand All @@ -11,7 +11,7 @@
packages = find_packages(),
include_package_data = True,
platforms = "any",
install_requires=["aigpy>=2019.8.12.3", "requests",
install_requires=["aigpy>=2019.8.19.0", "requests",
"ffmpeg", "pycryptodome", "pydub", ],

entry_points={'console_scripts': [
Expand Down
4 changes: 2 additions & 2 deletions TIDALDL-PY/tidal_dl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from tidal_dl.download import Download
from tidal_dl.printhelper import printMenu,printChoice2,printErr,printWarring

TIDAL_DL_VERSION = "2019.8.17.0"
TIDAL_DL_VERSION = "2019.8.19.0"

def logIn(username = "", password = ""):
if username == "" or password == "":
Expand Down Expand Up @@ -184,7 +184,7 @@ def debug():

dl = Download(1)
# dl.downloadTrack(79232385)
dl.downloadAlbum(79232364)
dl.downloadAlbum(90521280)
# dl.downloadVideo(57261945) #1hours
# dl.downloadVideo(92418079)

Expand Down
3 changes: 2 additions & 1 deletion TIDALDL-PY/tidal_dl/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def __thradfunc_dl(self, paraList):
if int(self.config.threadnum) <= 1 and self.showpro:
showprogress = True

Contributors = self.tool.getTrackContributors(paraList['trackinfo']['id'])
if needDl:
try:
while count > 0:
Expand All @@ -105,7 +106,7 @@ def __thradfunc_dl(self, paraList):
if check:
bIsSuccess = True
paraList['path'] = self.tool.covertMp4toM4a(paraList['path'])
self.tool.setTrackMetadata(paraList['trackinfo'], paraList['path'], albumInfo, index, coverpath)
self.tool.setTrackMetadata(paraList['trackinfo'], paraList['path'], albumInfo, index, coverpath, Contributors)
pstr = paraList['title']
except:
pass
Expand Down
14 changes: 13 additions & 1 deletion TIDALDL-PY/tidal_dl/tidal.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,18 @@ def covertMp4toM4a(self, file_path):
else:
return file_path

def setTrackMetadata(self, track_info, file_path, album_info, index, coverpath):
def _parseContributors(self, roleType, Contributors):
if Contributors is None:
return None
try:
ret = []
for item in Contributors['items']:
if item['role'] == roleType:
ret.append(item['name'])
return ret
except:
return None
def setTrackMetadata(self, track_info, file_path, album_info, index, coverpath, Contributors):
# isrc,replayGain,releasedate
obj = tagHelper.TagTool(file_path)
obj.album = track_info['album']['title']
Expand All @@ -143,6 +154,7 @@ def setTrackMetadata(self, track_info, file_path, album_info, index, coverpath):
obj.copyright = track_info['copyright']
obj.tracknumber = track_info['trackNumber']
obj.discnumber = track_info['volumeNumber']
obj.composer = self._parseContributors('Composer', Contributors)
if index is not None:
obj.tracknumber = str(index)
if album_info is not None:
Expand Down
4 changes: 4 additions & 0 deletions TIDALDL-PY/updatelog.log
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
======2019-08-19=============================
1\ Show Config
2\ Tag: add composer

======2019-08-17=============================
1\ Download ArtistAlbum: Add EP&Singles

Expand Down

0 comments on commit d86f600

Please sign in to comment.