Twisted | Sister - Stay Hungry -2016- -flac 24-192-
# Heuristic: first part = artist, second = album (if available) if len(parts) >= 2: result['artist'] = parts[0] result['album'] = parts[1] elif len(parts) == 1: result['album'] = parts[0]
"Twisted Sister - Stay Hungry -2016- -FLAC 24-192-" Twisted Sister - Stay Hungry -2016- -FLAC 24-192-
return result test_string = "Twisted Sister - Stay Hungry -2016- -FLAC 24-192-" parsed = parse_audio_folder_name(test_string) # Heuristic: first part = artist, second =
It sounds like you're looking for a (perhaps for a music file manager, tag editor, or media player) that can intelligently parse and handle messy or inconsistent folder/filename strings like: # Heuristic: first part = artist