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,
|
"savePlaylistAsCompilation": false,
|
||||||
"useNullSeparator": false,
|
"useNullSeparator": false,
|
||||||
"saveID3v1": true,
|
"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()
|
track['title'] = re.sub(r' ?\(Album Version\)', "", track['title']).strip()
|
||||||
|
|
||||||
# Generate artist tag if needed
|
# Generate artist tag if needed
|
||||||
if settings['tags']['multitagSeparator'] != "default":
|
if settings['tags']['multiArtistSeparator'] != "default":
|
||||||
if settings['tags']['multitagSeparator'] == "andFeat":
|
if settings['tags']['multiArtistSeparator'] == "andFeat":
|
||||||
track['artistsString'] = track['mainArtistsString']
|
track['artistsString'] = track['mainArtistsString']
|
||||||
if 'featArtistsString' in track and settings['featuredToTitle'] != "2":
|
if 'featArtistsString' in track and settings['featuredToTitle'] != "2":
|
||||||
track['artistsString'] += " " + track['featArtistsString']
|
track['artistsString'] += " " + track['featArtistsString']
|
||||||
else:
|
else:
|
||||||
track['artistsString'] = settings['tags']['multitagSeparator'].join(track['artists'])
|
track['artistsString'] = settings['tags']['multiArtistSeparator'].join(track['artists'])
|
||||||
else:
|
else:
|
||||||
track['artistsString'] = ", ".join(track['artists'])
|
track['artistsString'] = ", ".join(track['artists'])
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,10 @@ def tagID3(stream, track, save):
|
||||||
if save['title']:
|
if save['title']:
|
||||||
tag.add(TIT2(text=track['title']))
|
tag.add(TIT2(text=track['title']))
|
||||||
if save['artist'] and len(track['artists']):
|
if save['artist'] and len(track['artists']):
|
||||||
if save['multitagSeparator'] != "default":
|
if save['multiArtistSeparator'] != "default":
|
||||||
|
if save['multiArtistSeparator'] == "nothing":
|
||||||
|
tag.add(TPE1(text=track['mainArtist']['name']))
|
||||||
|
else:
|
||||||
tag.add(TPE1(text=track['artistsString']))
|
tag.add(TPE1(text=track['artistsString']))
|
||||||
tag.add(TXXX(desc="ARTISTS", text=track['artists']))
|
tag.add(TXXX(desc="ARTISTS", text=track['artists']))
|
||||||
else:
|
else:
|
||||||
|
@ -22,6 +25,9 @@ def tagID3(stream, track, save):
|
||||||
if save['album']:
|
if save['album']:
|
||||||
tag.add(TALB(text=track['album']['title']))
|
tag.add(TALB(text=track['album']['title']))
|
||||||
if save['albumArtist'] and len(track['album']['artists']):
|
if save['albumArtist'] and len(track['album']['artists']):
|
||||||
|
if save['singleAlbumArtist']:
|
||||||
|
tag.add(TPE2(text=track['album']['mainArtist']['name']))
|
||||||
|
else:
|
||||||
tag.add(TPE2(text=track['album']['artists']))
|
tag.add(TPE2(text=track['album']['artists']))
|
||||||
if save['trackNumber']:
|
if save['trackNumber']:
|
||||||
tag.add(TRCK(
|
tag.add(TRCK(
|
||||||
|
@ -80,7 +86,10 @@ def tagFLAC(stream, track, save):
|
||||||
if save['title']:
|
if save['title']:
|
||||||
tag["TITLE"] = track['title']
|
tag["TITLE"] = track['title']
|
||||||
if save['artist'] and len(track['artists']):
|
if save['artist'] and len(track['artists']):
|
||||||
if save['multitagSeparator'] != "default":
|
if save['multiArtistSeparator'] != "default":
|
||||||
|
if save['multiArtistSeparator'] == "nothing":
|
||||||
|
tag["ARTIST"] = track['mainArtist']['name']
|
||||||
|
else:
|
||||||
tag["ARTIST"] = track['artistsString']
|
tag["ARTIST"] = track['artistsString']
|
||||||
tag["ARTISTS"] = track['artists']
|
tag["ARTISTS"] = track['artists']
|
||||||
else:
|
else:
|
||||||
|
@ -88,6 +97,9 @@ def tagFLAC(stream, track, save):
|
||||||
if save['album']:
|
if save['album']:
|
||||||
tag["ALBUM"] = track['album']['title']
|
tag["ALBUM"] = track['album']['title']
|
||||||
if save['albumArtist'] and len(track['album']['artists']):
|
if save['albumArtist'] and len(track['album']['artists']):
|
||||||
|
if save['singleAlbumArtist']:
|
||||||
|
tag["ALBUMARTIST"] = track['album']['mainArtist']['name']
|
||||||
|
else:
|
||||||
tag["ALBUMARTIST"] = track['album']['artists']
|
tag["ALBUMARTIST"] = track['album']['artists']
|
||||||
if save['trackNumber']:
|
if save['trackNumber']:
|
||||||
tag["TRACKNUMBER"] = str(track['trackNumber'])
|
tag["TRACKNUMBER"] = str(track['trackNumber'])
|
||||||
|
|
Loading…
Reference in New Issue