Added %explicit% for albums
This commit is contained in:
parent
0be0e8370e
commit
1c490656b5
|
@ -251,6 +251,7 @@ def getTrackData(dz, trackAPI_gw, trackAPI=None, albumAPI_gw=None, albumAPI=None
|
|||
track['album']['recordType'] = albumAPI['record_type']
|
||||
track['album']['barcode'] = albumAPI['upc'] if 'upc' in albumAPI else "Unknown"
|
||||
track['album']['label'] = albumAPI['label'] if 'label' in albumAPI else "Unknown"
|
||||
track['album']['explicit'] = albumAPI['explicit_lyrics'] if 'explicit_lyrics' in albumAPI else False
|
||||
if not 'pic' in track['album']:
|
||||
track['album']['pic'] = albumAPI['cover_small'][albumAPI['cover_small'].find('cover/') + 6:-24]
|
||||
if 'release_date' in albumAPI:
|
||||
|
@ -283,6 +284,7 @@ def getTrackData(dz, trackAPI_gw, trackAPI=None, albumAPI_gw=None, albumAPI=None
|
|||
track['album']['recordType'] = "Album"
|
||||
track['album']['barcode'] = "Unknown"
|
||||
track['album']['label'] = albumAPI_gw['LABEL_NAME'] if 'LABEL_NAME' in albumAPI_gw else "Unknown"
|
||||
track['album']['explicit'] = albumAPI_gw['EXPLICIT_ALBUM_CONTENT']['EXPLICIT_LYRICS_STATUS'] == 1 if 'EXPLICIT_ALBUM_CONTENT' in albumAPI_gw and 'EXPLICIT_LYRICS_STATUS' in albumAPI_gw['EXPLICIT_ALBUM_CONTENT'] else False
|
||||
if not 'pic' in track['album']:
|
||||
track['album']['pic'] = albumAPI_gw['ALB_PICTURE']
|
||||
if 'PHYSICAL_RELEASE_DATE' in albumAPI_gw:
|
||||
|
|
|
@ -166,6 +166,7 @@ def settingsRegexAlbum(foldername, album, settings, trackAPI):
|
|||
foldername = foldername.replace("%type%", fixName(album['recordType'][0].upper() + album['recordType'][1:].lower(),
|
||||
settings['illegalCharacterReplacer']))
|
||||
foldername = foldername.replace("%upc%", album['barcode'])
|
||||
foldername = foldername.replace("%explicit%", "(Explicit)" if album['explicit'] else "")
|
||||
foldername = foldername.replace("%label%", fixName(album['label'], settings['illegalCharacterReplacer']))
|
||||
if len(album['genre']) > 0:
|
||||
foldername = foldername.replace("%genre%", fixName(album['genre'][0], settings['illegalCharacterReplacer']))
|
||||
|
|
Loading…
Reference in New Issue