Renamed multitagSeparator to multiArtistSeparator
as it only affects artists Added singleAlbumArtist that saves only the main artist in the albumartist field
This commit is contained in:
parent
bc59fb8906
commit
492b1dbc23
|
@ -69,6 +69,7 @@
|
|||
"savePlaylistAsCompilation": false,
|
||||
"useNullSeparator": false,
|
||||
"saveID3v1": true,
|
||||
"multitagSeparator": "default"
|
||||
"multiArtistSeparator": "default",
|
||||
"singleAlbumArtist": false,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -672,13 +672,13 @@ def downloadTrackObj(dz, trackAPI, settings, bitrate, queueItem, extraTrack=None
|
|||
track['title'] = re.sub(r' ?\(Album Version\)', "", track['title']).strip()
|
||||
|
||||
# Generate artist tag if needed
|
||||
if settings['tags']['multitagSeparator'] != "default":
|
||||
if settings['tags']['multitagSeparator'] == "andFeat":
|
||||
if settings['tags']['multiArtistSeparator'] != "default":
|
||||
if settings['tags']['multiArtistSeparator'] == "andFeat":
|
||||
track['artistsString'] = track['mainArtistsString']
|
||||
if 'featArtistsString' in track and settings['featuredToTitle'] != "2":
|
||||
track['artistsString'] += " " + track['featArtistsString']
|
||||
else:
|
||||
track['artistsString'] = settings['tags']['multitagSeparator'].join(track['artists'])
|
||||
track['artistsString'] = settings['tags']['multiArtistSeparator'].join(track['artists'])
|
||||
else:
|
||||
track['artistsString'] = ", ".join(track['artists'])
|
||||
|
||||
|
|
|
@ -14,15 +14,21 @@ def tagID3(stream, track, save):
|
|||
if save['title']:
|
||||
tag.add(TIT2(text=track['title']))
|
||||
if save['artist'] and len(track['artists']):
|
||||
if save['multitagSeparator'] != "default":
|
||||
tag.add(TPE1(text=track['artistsString']))
|
||||
if save['multiArtistSeparator'] != "default":
|
||||
if save['multiArtistSeparator'] == "nothing":
|
||||
tag.add(TPE1(text=track['mainArtist']['name']))
|
||||
else:
|
||||
tag.add(TPE1(text=track['artistsString']))
|
||||
tag.add(TXXX(desc="ARTISTS", text=track['artists']))
|
||||
else:
|
||||
tag.add(TPE1(text=track['artists']))
|
||||
if save['album']:
|
||||
tag.add(TALB(text=track['album']['title']))
|
||||
if save['albumArtist'] and len(track['album']['artists']):
|
||||
tag.add(TPE2(text=track['album']['artists']))
|
||||
if save['singleAlbumArtist']:
|
||||
tag.add(TPE2(text=track['album']['mainArtist']['name']))
|
||||
else:
|
||||
tag.add(TPE2(text=track['album']['artists']))
|
||||
if save['trackNumber']:
|
||||
tag.add(TRCK(
|
||||
text=str(track['trackNumber']) + ("/" + str(track['album']['trackTotal']) if save['trackTotal'] else "")))
|
||||
|
@ -80,15 +86,21 @@ def tagFLAC(stream, track, save):
|
|||
if save['title']:
|
||||
tag["TITLE"] = track['title']
|
||||
if save['artist'] and len(track['artists']):
|
||||
if save['multitagSeparator'] != "default":
|
||||
tag["ARTIST"] = track['artistsString']
|
||||
if save['multiArtistSeparator'] != "default":
|
||||
if save['multiArtistSeparator'] == "nothing":
|
||||
tag["ARTIST"] = track['mainArtist']['name']
|
||||
else:
|
||||
tag["ARTIST"] = track['artistsString']
|
||||
tag["ARTISTS"] = track['artists']
|
||||
else:
|
||||
tag["ARTIST"] = track['artists']
|
||||
if save['album']:
|
||||
tag["ALBUM"] = track['album']['title']
|
||||
if save['albumArtist'] and len(track['album']['artists']):
|
||||
tag["ALBUMARTIST"] = track['album']['artists']
|
||||
if save['singleAlbumArtist']:
|
||||
tag["ALBUMARTIST"] = track['album']['mainArtist']['name']
|
||||
else:
|
||||
tag["ALBUMARTIST"] = track['album']['artists']
|
||||
if save['trackNumber']:
|
||||
tag["TRACKNUMBER"] = str(track['trackNumber'])
|
||||
if save['trackTotal']:
|
||||
|
|
Loading…
Reference in New Issue