diff options
-rwxr-xr-x | jamos | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -126,7 +126,12 @@ def move_file(file, metadata): title = 'unknownsong' if ('artist' in metadata.keys()) and (metadata['artist'] is not None): - artist = metadata['artist'].replace(' ', '_').lower() + if len(metadata['artist'].split(',')) > 1: + # If there are multiple artists, pick the first one + # NOTE: This may break if the artist has a comma in their name + artist = metadata['artist'].split(',')[0].replace(' ', '_').lower() + else: + artist = metadata['artist'].replace(' ', '_').lower() if ('album' in metadata.keys()) and (metadata['album'] is not None): album = metadata['album'].replace(' ', '_').lower() |