Moved some stuff and changed some things

This commit is contained in:
RemixDev 2020-02-22 15:57:24 +01:00
parent e9f010628e
commit e33f73dfe5
5 changed files with 11 additions and 11 deletions

View File

@ -10,7 +10,7 @@
"createStructurePlaylist": false, "createStructurePlaylist": false,
"createSingleFolder": false, "createSingleFolder": false,
"saveFullArtists": false, "saveFullArtists": false,
"padTrack": true, "padTracks": true,
"paddingSize": "0", "paddingSize": "0",
"illegalCharacterReplacer": "_", "illegalCharacterReplacer": "_",
"queueConcurrency": 3, "queueConcurrency": 3,
@ -26,8 +26,7 @@
"coverImageTemplate": "", "coverImageTemplate": "",
"artistImageTemplate": "", "artistImageTemplate": "",
"multitagSeparator": "default", "multitagSeparator": "default",
"dateFormat": "0", "dateFormat": "YMD",
"dateFormatYear": "4",
"savePlaylistAsCompilation": false, "savePlaylistAsCompilation": false,
"removeAlbumVersion": false, "removeAlbumVersion": false,
"moveFeaturedToTitle": false, "moveFeaturedToTitle": false,

View File

@ -150,7 +150,7 @@ def getTrackData(trackAPI):
} }
track['album']['trackTotal'] = albumAPI2['NUMBER_TRACK'] track['album']['trackTotal'] = albumAPI2['NUMBER_TRACK']
track['album']['discTotal'] = albumAPI2['NUMBER_DISK'] track['album']['discTotal'] = albumAPI2['NUMBER_DISK']
track['album']['recordType'] = trackAPI['TYPE'] track['album']['recordType'] = "Album"
track['album']['barcode'] = "Unknown" track['album']['barcode'] = "Unknown"
track['album']['label'] = albumAPI2['LABEL_NAME'] if 'LABEL_NAME' in albumAPI2 else "Unknown" track['album']['label'] = albumAPI2['LABEL_NAME'] if 'LABEL_NAME' in albumAPI2 else "Unknown"
if not 'pic' in track['album']: if not 'pic' in track['album']:
@ -174,10 +174,11 @@ def getTrackData(trackAPI):
track['artist'] = {} track['artist'] = {}
track['artists'] = [] track['artists'] = []
for artist in trackAPI2['contributors']: for artist in trackAPI2['contributors']:
track['artists'].append(artist['name']) if artist['id'] != 5080:
if not artist['role'] in track['artist']: track['artists'].append(artist['name'])
track['artist'][artist['role']] = [] if not artist['role'] in track['artist']:
track['artist'][artist['role']].append(artist['name']) track['artist'][artist['role']] = []
track['artist'][artist['role']].append(artist['name'])
if not 'discTotal' in track['album'] or not track['album']['discTotal']: if not 'discTotal' in track['album'] or not track['album']['discTotal']:
if not albumAPI2: if not albumAPI2:

View File

@ -2,7 +2,7 @@
import wx import wx
from deemix.ui.SettingsDialog import SettingsDialog from deemix.ui.SettingsDialog import SettingsDialog
from deemix.app.functions import getIDFromLink, getTypeFromLink from deemix.utils.misc import getIDFromLink, getTypeFromLink
from deemix.app.downloader import download_track, download_album, download_playlist from deemix.app.downloader import download_track, download_album, download_playlist
from deemix.app.settings import initSettings from deemix.app.settings import initSettings

View File

@ -21,9 +21,9 @@ def tagID3(stream, track, save):
if save['albumArtist']: if save['albumArtist']:
tag.add(TPE2(text=track['album']['artist']['name'])) tag.add(TPE2(text=track['album']['artist']['name']))
if save['trackNumber']: if save['trackNumber']:
tag.add(TRCK(text=str(track['trackNumber']))) tag.add(TRCK(text=str(track['trackNumber'])+("/"+str(track['album']['trackTotal']) if save['trackTotal'] else "")))
if save['discNumber']: if save['discNumber']:
tag.add(TPOS(text=str(track['discNumber']))) tag.add(TPOS(text=str(track['discNumber'])+("/"+str(track['album']['discTotal']) if save['discTotal'] else "")))
if save['genre']: if save['genre']:
tag.add(TCON(text=track['album']['genre'])) tag.add(TCON(text=track['album']['genre']))
if save['year']: if save['year']: