summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjamos7
1 files changed, 6 insertions, 1 deletions
diff --git a/jamos b/jamos
index 6a2d532..2e6350e 100755
--- a/jamos
+++ b/jamos
@@ -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()