Just get "lead artist" (TPE1), don't try others.
authorbarbieri <barbieri@gmail.com>
Thu, 17 Jan 2008 21:46:14 +0000 (21:46 +0000)
committerbarbieri <barbieri@gmail.com>
Thu, 17 Jan 2008 21:46:14 +0000 (21:46 +0000)
id3lib helpers used to get all of those, using an *ordered* search for
the fields.

However these multiple searches were slow and I'm now doing one walk
and registering the found fields, in the order they're listed on the
file. This lead to "composer" showing before "lead artist" and thus
being used, producing undesired results for "cover albums" where you
want the artist to be the playing one, not the original.

We have 2 solutions, I used the first:
 * just get "lead artist", most of tag editors just edit them or at
   least enable users to change that. Most software just use this.
 * get all the fields, consider them as a group for "todo" analysis
   and at the end of the search use in the specific order. This is
   more complex and would require lots of allocation/copy/free to a
   case that is often uncommon.

lightmediascanner/src/plugins/id3lib/id3lib.cpp

index 5916ff3..fb2fc03 100644 (file)
@@ -118,11 +118,7 @@ _id3lib_get_data(const ID3_Tag &tag, struct lms_audio_info *info)
       }
       break;
 
-    case ID3FID_COMPOSER:
     case ID3FID_LEADARTIST:
-    case ID3FID_BAND:
-    case ID3FID_CONDUCTOR:
-    case ID3FID_MIXARTIST:
       if (!info->artist.str) {
         _id3lib_get_string(frame, ID3FN_TEXT, &info->artist);
         if (info->artist.str)