v20 Compilations seem not to behave as per the Wiki - bug or not?
#1
I am struggling to understand why Kodi does not seem (note how I phrase it!) to behave as the Wiki specifies. Most likely this is a case of "working as designed" and I just fail to understand it, and not a bug. But I'm not sure at this point, so maybe someone can show me the error of my ways.

The Wiki states that:
  1. Kodi has strong support for MusicBrainz tagging. It is highly recommended that users tag their music files using MusicBrainz Picard.
  2. Kodi reads the TCMP tag (a.k.a. "compilation" or "compilation (iTunes) from V16 onward.
  3. Kodi reads the MUSICBRAINZ ALBUM TYPE from V17 onward.
So I'm using Picard 2.5.6 to retrieve the Musicbrains data for the album "A State of Trance 2022" (here) which returns with the Musicbrainz Album type set to "album / compilation / dj-mix". Relevant output of the id3v2 --list command:
Quote:TXXX (User defined text information): (MusicBrainz Album Type): album / compilation / dj-mix

Great. And the multiple fields in the tag are separated by the prescribed ' / ' (space-slash-space) sequence. So I'd expect this album to show up in the library listed under 'Compilations'.

It doesn't.

However, when I add the 'TCMP' tag (Musicbrainz Picard displays this as 'Compilation (iTunes)' and set it to 1, the album does show up under compilations. So apparently Kodi ignores the 'compilation' field in the MUSICBRAINZ ALBUM TYPE (which is set by Picard when it retrieves the data from MB) but instead uses the 'compilations' tag which is so ancient as to be practically obsolete (correct me if I'm wrong).

Further experiments I did to make sure that this is the only thing going on here:
 
  • I tried id3v2 2.3 with UTF16 encoding vs. id3v2 2.4 with UTF8 encoding. No effect.
  • I tried removing the "album artist' , "album artist sort order' and 'Musicbrainz Release Artist Id' fields, just in case "If any of the songs assigned to the Album name have an Album Artist tag, then Kodi assumes the user knows what they're doing, and this album is also ruled out from being a compilation" (here) does not apply only to V17 and below. No effect.

In short, Picard retrieves album type data from MB that Kodi doesn't seem to process as one would expect. So what's going on here? Is this working as designed an am I just to thick to get it? Or is this indeed behavior that is not consistent with what the Wiki suggests and either the Wiki or Kodi could do with an update to fix this discrepancy?

If someone could clarify this a little I'd greatly appreciated it, because this has been driving me crazy for long time... Eek

FvW
Reply
#2
Nobody?
Reply
#3
You are correct that the musicbrainz release type in song tags is simply stored as a string and treated as a list / array for display decoration purposes.  The TCMP (Id3v2) or analogs in other formats is used to set the boolean "bCompilation".

Compilation boolean can also be set from album scraper / local album.nfo file or determined algorithmically from examining song artists and album artists associated with an album during tag scanning.

scott s.
.
Reply
#4
(2024-03-15, 23:50)scott967 Wrote: You are correct that the musicbrainz release type in song tags is simply stored as a string and treated as a list / array for display decoration purposes.  The TCMP (Id3v2) or analogs in other formats is used to set the boolean "bCompilation".

Compilation boolean can also be set from album scraper / local album.nfo file or determined algorithmically from examining song artists and album artists associated with an album during tag scanning.

scott s.
.

I see. So when the Wiki said that Kodi reads the Musicbrainz Release Type tag I was simply wrong in assuming it also did something useful with it rather than just it as decoration. Big Grin

So as a work-around I've whipped up a shell script using kid3-cli to set missing 'compilation' tags:
Quote:#!/bin/bash
#
# Set the 'Compilation' tag if the 'MusicBrainz Album Type' tag (as reported
# by kid3-cli) contains the string 'compilation' (as in "album / compilation"
# or "album; compilation; dj-mix").
# Processes audio files with .mp3, .flac, .m4a and .wma extensions.

echo "This will set the Compilation tag from the MusicBrainz Album Type tag."
read -p "Press any key to continue or Ctrl-C to abort..."

# Check for availability of kid3-cli:
if ! command -v kid3-cli &> /dev/null
then
  echo 'FATAL: kid3-cli not found.'
  exit 1
fi

# Defines:
KID3=`command -v kid3-cli`
IFS=$'\n'
COL_GRN='\033[0;32m'
COL_YEL_BOLD='\033[1;33m'
COL_DEFAULT='\033[0m'

# Run it:
for file in `find . \( -name "*.mp3" -o -name "*.flac" -o -name "*.m4a" -o -name "*.wma" \)`
do
  if $KID3 -c "get 'MusicBrainz Album Type'" $file | grep -iq 'compilation'
  then
    $KID3 -c "set Compilation 1" "$file"
    echo -e ${COL_YEL_BOLD}"$file": Compilation tag set to 1${COL_DEFAULT}
  else
    $KID3 -c "set Compilation 0" "$file"
    echo -e ${COL_GRN}"$file": not a compilation${COL_DEFAULT}
  fi
done
FWIW...



[/quote]
Reply

Logout Mark Read Team Forum Stats Members Help
Compilations seem not to behave as per the Wiki - bug or not?0