]> diplodocus.org Git - flac-archive/blobdiff - fa-flacd
untested attempt to add error checking
[flac-archive] / fa-flacd
index 6488ef536e73169f47ac8056ec77d35c285cc2ab..5e93e1f16965b7cb3f9bb1452b1e44324f925122 100755 (executable)
--- a/fa-flacd
+++ b/fa-flacd
@@ -1,4 +1,4 @@
-#! /usr/bin/env python2.4
+#! /usr/bin/python
 
 """
 =head1 NAME
@@ -126,7 +126,11 @@ def flac(dir, tracknum, tags):
     flac files represent individual tracks or whole discs."""
 
     separator = ' '
-    artist = (tags.gets('ARTIST', separator=', ') or '').replace('/', '_')
+    if len(tags.get('ALBUMARTIST')) > 0:
+        artist_tag = tags.gets('ALBUMARTIST', separator=', ')
+    else:
+        artist_tag = tags.gets('ARTIST', separator=', ')
+    artist = (artist_tag or '').replace('/', '_')
     album = (tags.gets('ALBUM', separator=separator) or '').replace('/', '_')
     discnum = tags.gets('DISCNUMBER')