Only one %catalognumber%

How to do it to generate only one or only the first catalog number in albums with several catalog numbers?

Example:

$if(%catalognumber%, [%catalognumber%])
Generates:
obraz
Desired effect:
obraz

Any ideas? I tried with &left / &right /&ne but it does not work as it should.

You can use the regex search to choose only the first value before a multi-value separator (the default is "; ").

$if(%catalognumber%,[$rsearch(%catalognumber%,\(.+?\)\(?:; |\$\))])

Here’s the plain regex without escape characters (and the same on regex101.com)

(.+?)(?:; |$)

This solution isn’t 100% perfect because if a catalog number itself includes the separator, the value gets split up like if it was two values: "c4t4; l0gnumb3r" would give us "c4t4" instead of the whole value.

The above restriction seems unavoidable with the default functions. I just happened to make a plugin which gets past the mentioned restriction but in practice, the regex method works almost as well. [.]

PLUGIN_NAME = "Get Multi-value Subset"
PLUGIN_AUTHOR = "Joel Lintunen"
PLUGIN_DESCRIPTION = """Returns a subset of values from a multi-value tag.
<br /><br />
Examples:
<ul>
  <li><i>$getmultirange(catalognumber,0)</i> returns the first value if it exists</li>
  <li><i>$getmultirange(writer,2:4,\, )</i> returns the third and fourth values if they exist, separated by a
      comma</li>
</ul>
Arguments:
<ol>
  <li>Multi-value tag.</li>
  <li>List index or slicer. For example <i>"0"</i>, <i>":2"</i>, <i>"::2"</i> or <i>"-1"</i>.</li>
  <li>Separator which will be used to divide the values. The default is <i>"; "</i>.</li>
</ol>
"""
PLUGIN_VERSION = "1.0.0"
PLUGIN_API_VERSIONS = ["2.0", "2.1", "2.2"]
PLUGIN_LICENSE = "GPL-2.0"
PLUGIN_LICENSE_URL = "https://www.gnu.org/licenses/gpl-2.0.html"

from picard.metadata import MULTI_VALUED_JOINER
from picard.script import (
    normalize_tagname,
    register_script_function)


def func_get_multi_range(parser, multi, range, separator=MULTI_VALUED_JOINER):
    # Check inputs to prevent crashes on the options page
    if not multi or not range or not all(x.isdigit() or x in [':', '-', '+'] for x in range):
        return ""

    multi_values = parser.context.getall(normalize_tagname(multi))
    try:
        # Check if range is an index instead of a slicer
        if len(range.split(':')) == 1:
                return multi_values[int(range)]
        return separator.join(eval("{0}[{1}]".format(multi_values, range)))
    except (IndexError, SyntaxError, ValueError):
        return ""


register_script_function(func_get_multi_range, "getmultirange")

7 Likes

Oh my… quick test and looks like that it wooooorks like a charm! @Harakku THANK YOU. Thanks to you, my script is finally completed.

2 Likes

That’s a really neat little plugin. :slight_smile: It would be great if you’d submit it to the picard-plugins repository for wider usage:

6 Likes

Hi

It’s been a few years since I created my script. Recently I wanted to get back to tagging music and from what I noticed, the command related to

$if($ne_all(%catalognumber%,none,[none]),$if(%catalognumber%, $upper([$replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($rsearch(%catalognumber%,\(.+?\)\(?:; |\$\)+),_,),⋅,),/,),:,),*,),?,),",),<,),>,),|,), ,)]))))

even if I simplify it

$if(%catalognumber%, [%catalognumber%])

it still doesn’t work, is there a bug in the program or am I doing something wrong?

Additionally, I noticed that after turning on the program and going to the options, the formatting is correct, but it is enough to add, for example, one album and the formatting related to catalognumber disappears:

I am using version: 2.12.3
Plugins: Additional Artists Variables 1.0

The above Harraku mod doesn’t work either.

1 Like

This indicates the catalognumber might not be set. Check the tags of the files you are tagging if this is actually set. The “View script variables” plugin can be useful to debug something like this.

2 Likes

The Ben Bohmer album example shown above has a catalognumber:

Not sure, I tested it with this release and adding $if(%catalognumber%, [%catalognumber%]) to a naming script, and the cat. no. shows up.

Can you check what the “Show scripting variables” plugin shows for those files?

You mean data from Debug log with installed “Show scripting variables” plugin?:

D: 10:36:47,108 tagger.add_files:910: Adding files [<FLACFile '01. Ben Böhmer - Begin Again.flac'>, <FLACFile '02. Ben Böhmer - Beyond Beliefs.flac'>, <FLACFile '03. Ben Böhmer - Home (feat. JONAH).flac'>, <FLACFile '04. Ben Böhmer - Erase (feat. lau.ra).flac'>, <FLACFile '05. Ben Böhmer - Strangers.flac'>, <FLACFile '06. Ben Böhmer - Escalate (feat. JONAH).flac'>, <FLACFile '07. Ben Böhmer - A Matter of Time.flac'>, <FLACFile '08. Ben Böhmer - Revelation (feat. PBSR).flac'>, <FLACFile '09. Ben Böhmer - Fade to Blue.flac'>, <FLACFile '10. Ben Böhmer - Once….flac'>, <FLACFile '11. Ben Böhmer - Slow Wave (feat. Gordi).flac'>]
D: 10:36:47,109 formats/vorbis._load:134: Loading file 'F:\\###\\Ben Böhmer\\Ben Böhmer - Begin Again [2021] [Album] FLAC\\01. Ben Böhmer - Begin Again.flac'
D: 10:36:47,112 formats/vorbis._load:134: Loading file 'F:\\###\\Ben Böhmer\\Ben Böhmer - Begin Again [2021] [Album] FLAC\\02. Ben Böhmer - Beyond Beliefs.flac'
D: 10:36:47,112 formats/vorbis._load:134: Loading file 'F:\\###\\Ben Böhmer\\Ben Böhmer - Begin Again [2021] [Album] FLAC\\03. Ben Böhmer - Home (feat. JONAH).flac'
D: 10:36:47,112 formats/vorbis._load:134: Loading file 'F:\\###\\Ben Böhmer\\Ben Böhmer - Begin Again [2021] [Album] FLAC\\05. Ben Böhmer - Strangers.flac'
D: 10:36:47,112 formats/vorbis._load:134: Loading file 'F:\\###\\Ben Böhmer\\Ben Böhmer - Begin Again [2021] [Album] FLAC\\04. Ben Böhmer - Erase (feat. lau.ra).flac'
D: 10:36:47,113 formats/vorbis._load:134: Loading file 'F:\\###\\Ben Böhmer\\Ben Böhmer - Begin Again [2021] [Album] FLAC\\06. Ben Böhmer - Escalate (feat. JONAH).flac'
D: 10:36:47,115 tagger._file_loaded:803: <FLACFile '01. Ben Böhmer - Begin Again.flac'> has release (a7899fa9-cb47-499d-8eb4-a960c68d2d43) and recording (637bbedd-8a86-4414-b6a7-fdf6a9018696) MBIDs, moving to track…
D: 10:36:47,120 ui/mainwindow.set_statusbar_message:472: Loading album a7899fa9-cb47-499d-8eb4-a960c68d2d43 …
D: 10:36:47,121 file.move:641: Moving <FLACFile '01. Ben Böhmer - Begin Again.flac'> from None to <Cluster a7899fa9-cb47-499d-8eb4-a960c68d2d43 '/Unmatched Files'>
D: 10:36:47,123 formats/vorbis._load:134: Loading file 'F:\\###\\Ben Böhmer\\Ben Böhmer - Begin Again [2021] [Album] FLAC\\07. Ben Böhmer - A Matter of Time.flac'
D: 10:36:47,123 formats/vorbis._load:134: Loading file 'F:\\###\\Ben Böhmer\\Ben Böhmer - Begin Again [2021] [Album] FLAC\\08. Ben Böhmer - Revelation (feat. PBSR).flac'
D: 10:36:47,123 formats/vorbis._load:134: Loading file 'F:\\###\\Ben Böhmer\\Ben Böhmer - Begin Again [2021] [Album] FLAC\\09. Ben Böhmer - Fade to Blue.flac'
D: 10:36:47,124 formats/vorbis._load:134: Loading file 'F:\\###\\Ben Böhmer\\Ben Böhmer - Begin Again [2021] [Album] FLAC\\10. Ben Böhmer - Once….flac'
D: 10:36:47,124 formats/vorbis._load:134: Loading file 'F:\\###\\Ben Böhmer\\Ben Böhmer - Begin Again [2021] [Album] FLAC\\11. Ben Böhmer - Slow Wave (feat. Gordi).flac'
D: 10:36:47,131 webservice/ratecontrol.get_delay_to_next_request:127: ('musicbrainz.org', 443): Last request was 26493 ms ago, starting another one
D: 10:36:47,131 webservice/ratecontrol.increment_requests:147: ('musicbrainz.org', 443): Incrementing requests to: 1
D: 10:36:47,132 tagger._file_loaded:803: <FLACFile '04. Ben Böhmer - Erase (feat. lau.ra).flac'> has release (a7899fa9-cb47-499d-8eb4-a960c68d2d43) and recording (62a53799-6877-4acb-9206-72544ea6c261) MBIDs, moving to track…
D: 10:36:47,133 tagger.load_album:1041: Album a7899fa9-cb47-499d-8eb4-a960c68d2d43 already loaded.
D: 10:36:47,133 file.move:641: Moving <FLACFile '04. Ben Böhmer - Erase (feat. lau.ra).flac'> from None to <Cluster a7899fa9-cb47-499d-8eb4-a960c68d2d43 '/Unmatched Files'>
D: 10:36:47,134 tagger._file_loaded:803: <FLACFile '02. Ben Böhmer - Beyond Beliefs.flac'> has release (a7899fa9-cb47-499d-8eb4-a960c68d2d43) and recording (8276542b-6d55-4d26-8473-ae91a79e89c7) MBIDs, moving to track…
D: 10:36:47,135 tagger.load_album:1041: Album a7899fa9-cb47-499d-8eb4-a960c68d2d43 already loaded.
D: 10:36:47,135 file.move:641: Moving <FLACFile '02. Ben Böhmer - Beyond Beliefs.flac'> from None to <Cluster a7899fa9-cb47-499d-8eb4-a960c68d2d43 '/Unmatched Files'>
D: 10:36:47,137 tagger._file_loaded:803: <FLACFile '03. Ben Böhmer - Home (feat. JONAH).flac'> has release (a7899fa9-cb47-499d-8eb4-a960c68d2d43) and recording (8e1e7f8e-dad7-4ba8-8d57-2fdd559fd070) MBIDs, moving to track…
D: 10:36:47,137 tagger.load_album:1041: Album a7899fa9-cb47-499d-8eb4-a960c68d2d43 already loaded.
D: 10:36:47,138 file.move:641: Moving <FLACFile '03. Ben Böhmer - Home (feat. JONAH).flac'> from None to <Cluster a7899fa9-cb47-499d-8eb4-a960c68d2d43 '/Unmatched Files'>
D: 10:36:47,139 tagger._file_loaded:803: <FLACFile '06. Ben Böhmer - Escalate (feat. JONAH).flac'> has release (a7899fa9-cb47-499d-8eb4-a960c68d2d43) and recording (9f201025-074e-4978-9018-ffc283ae312e) MBIDs, moving to track…
D: 10:36:47,139 tagger.load_album:1041: Album a7899fa9-cb47-499d-8eb4-a960c68d2d43 already loaded.
D: 10:36:47,140 file.move:641: Moving <FLACFile '06. Ben Böhmer - Escalate (feat. JONAH).flac'> from None to <Cluster a7899fa9-cb47-499d-8eb4-a960c68d2d43 '/Unmatched Files'>
D: 10:36:47,141 tagger._file_loaded:803: <FLACFile '05. Ben Böhmer - Strangers.flac'> has release (a7899fa9-cb47-499d-8eb4-a960c68d2d43) and recording (d15e7e6e-7433-4c90-956e-63d76ed03802) MBIDs, moving to track…
D: 10:36:47,142 tagger.load_album:1041: Album a7899fa9-cb47-499d-8eb4-a960c68d2d43 already loaded.
D: 10:36:47,142 file.move:641: Moving <FLACFile '05. Ben Böhmer - Strangers.flac'> from None to <Cluster a7899fa9-cb47-499d-8eb4-a960c68d2d43 '/Unmatched Files'>
D: 10:36:47,143 tagger._file_loaded:803: <FLACFile '08. Ben Böhmer - Revelation (feat. PBSR).flac'> has release (a7899fa9-cb47-499d-8eb4-a960c68d2d43) and recording (95a9b566-5858-43bd-9381-1a0e7caa03e3) MBIDs, moving to track…
D: 10:36:47,144 tagger.load_album:1041: Album a7899fa9-cb47-499d-8eb4-a960c68d2d43 already loaded.
D: 10:36:47,144 file.move:641: Moving <FLACFile '08. Ben Böhmer - Revelation (feat. PBSR).flac'> from None to <Cluster a7899fa9-cb47-499d-8eb4-a960c68d2d43 '/Unmatched Files'>
D: 10:36:47,146 tagger._file_loaded:803: <FLACFile '07. Ben Böhmer - A Matter of Time.flac'> has release (a7899fa9-cb47-499d-8eb4-a960c68d2d43) and recording (38f1a355-3619-47cd-8dc1-a8cd9a36e8db) MBIDs, moving to track…
D: 10:36:47,147 tagger.load_album:1041: Album a7899fa9-cb47-499d-8eb4-a960c68d2d43 already loaded.
D: 10:36:47,147 file.move:641: Moving <FLACFile '07. Ben Böhmer - A Matter of Time.flac'> from None to <Cluster a7899fa9-cb47-499d-8eb4-a960c68d2d43 '/Unmatched Files'>
D: 10:36:47,148 tagger._file_loaded:803: <FLACFile '09. Ben Böhmer - Fade to Blue.flac'> has release (a7899fa9-cb47-499d-8eb4-a960c68d2d43) and recording (d17606df-fe9f-4eb6-8513-f35a87d174fb) MBIDs, moving to track…
D: 10:36:47,149 tagger.load_album:1041: Album a7899fa9-cb47-499d-8eb4-a960c68d2d43 already loaded.
D: 10:36:47,149 file.move:641: Moving <FLACFile '09. Ben Böhmer - Fade to Blue.flac'> from None to <Cluster a7899fa9-cb47-499d-8eb4-a960c68d2d43 '/Unmatched Files'>
D: 10:36:47,152 tagger._file_loaded:803: <FLACFile '10. Ben Böhmer - Once….flac'> has release (a7899fa9-cb47-499d-8eb4-a960c68d2d43) and recording (6346c8d9-fe84-49b8-a10d-71333922b59f) MBIDs, moving to track…
D: 10:36:47,152 tagger.load_album:1041: Album a7899fa9-cb47-499d-8eb4-a960c68d2d43 already loaded.
D: 10:36:47,153 file.move:641: Moving <FLACFile '10. Ben Böhmer - Once….flac'> from None to <Cluster a7899fa9-cb47-499d-8eb4-a960c68d2d43 '/Unmatched Files'>
D: 10:36:47,154 tagger._file_loaded:803: <FLACFile '11. Ben Böhmer - Slow Wave (feat. Gordi).flac'> has release (a7899fa9-cb47-499d-8eb4-a960c68d2d43) and recording (4b9f7fb5-8288-4599-a57b-6e386e71b59c) MBIDs, moving to track…
D: 10:36:47,155 tagger.load_album:1041: Album a7899fa9-cb47-499d-8eb4-a960c68d2d43 already loaded.
D: 10:36:47,155 file.move:641: Moving <FLACFile '11. Ben Böhmer - Slow Wave (feat. Gordi).flac'> from None to <Cluster a7899fa9-cb47-499d-8eb4-a960c68d2d43 '/Unmatched Files'>
D: 10:36:47,357 webservice/ratecontrol.decrement_requests:155: ('musicbrainz.org', 443): Decrementing requests to: 0
D: 10:36:47,357 webservice._handle_reply:559: Received reply for https://musicbrainz.org/ws/2/release/a7899fa9-cb47-499d-8eb4-a960c68d2d43?inc=aliases%2Bannotation%2Bartist-credits%2Bartist-rels%2Bartists%2Bcollections%2Bdiscids%2Bgenres%2Bisrcs%2Blabels%2Bmedia%2Brecording-rels%2Brecordings%2Brelease-group-level-rels%2Brelease-groups%2Brelease-rels%2Bseries-rels%2Burl-rels%2Buser-collections%2Bwork-rels -> HTTP 200 (OK) 
D: 10:36:47,359 webservice._handle_reply:572: Response received: {'genres': [], 'media': [{'format-id': '9712d52a-4509-3d4b-a1a2-67c88c643e31', 'track-count': 11, 'position': 1, 'track-offset': 0, 'tracks': [{'number': '1', 'length': 161760, 'recording': {'disambiguation': '', 'aliases': [], 'length': 161000, 'isrcs': ['GBEWA2103550'], 'id': '637bbedd-8a86-4414-b6a7-fdf6a9018696', 'artist-credit': [{'joinphrase': '', 'artist': {'sort-name': 'Böhmer, Ben', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'name': 'Ben Böhmer', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'disambiguation': '', 'type': 'Person'}, 'name': 'Ben Böhmer'}], 'title': 'Begin Again', 'first-release-date': '2021-09-24', 'video': False, 'genres': []}, 'position': 1, 'id': '734e9f89-f192-4964-81fd-06ea8b08da02', 'artist-credit': [{'name': 'Ben Böhmer', 'joinphrase': '', 'artist': {'sort-name': 'Böhmer, Ben', 'aliases': [{'sort-name': 'Böhmer‐Bärtels, Ben', 'locale': None, 'type': 'Legal name', 'primary': None, 'ended': False, 'name': 'Ben Böhmer‐Bärtels', 'begin': None, 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf', 'end': None}], 'disambiguation': '', 'type': 'Person', 'name': 'Ben Böhmer', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df'}}], 'title': 'Begin Again'}, {'length': 313586, 'number': '2', 'recording': {'isrcs': ['GBEWA2103551'], 'length': 313000, 'aliases': [], 'disambiguation': '', 'genres': [], 'video': False, 'first-release-date': '2021-07-07', 'title': 'Beyond Beliefs', 'artist-credit': [{'artist': {'sort-name': 'Böhmer, Ben', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'disambiguation': '', 'type': 'Person', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'name': 'Ben Böhmer'}, 'joinphrase': '', 'name': 'Ben Böhmer'}], 'id': '8276542b-6d55-4d26-8473-ae91a79e89c7'}, 'id': 'a3eba72d-5926-43f1-80b2-144c107b6218', 'position': 2, 'artist-credit': [{'name': 'Ben Böhmer', 'joinphrase': '', 'artist': {'disambiguation': '', 'type': 'Person', 'sort-name': 'Böhmer, Ben', 'aliases': [{'locale': None, 'primary': None, 'type': 'Legal name', 'sort-name': 'Böhmer‐Bärtels, Ben', 'name': 'Ben Böhmer‐Bärtels', 'begin': None, 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf', 'end': None, 'ended': False}], 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'name': 'Ben Böhmer', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d'}}], 'title': 'Beyond Beliefs'}, {'recording': {'artist-credit': [{'name': 'Ben Böhmer', 'joinphrase': ' feat. ', 'artist': {'sort-name': 'Böhmer, Ben', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'name': 'Ben Böhmer', 'type': 'Person', 'disambiguation': '', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df'}}, {'name': 'JONAH', 'artist': {'type-id': 'e431f5f6-b5d2-343d-8b36-72607fffb74b', 'type': 'Group', 'disambiguation': 'German singer-songwriter duo Angelo Mammone & Christian Steenken', 'name': 'Jonah', 'id': 'ac2f5cf9-dce5-49a2-90cd-fe543ccc51fe', 'sort-name': 'Jonah'}, 'joinphrase': ''}], 'id': '8e1e7f8e-dad7-4ba8-8d57-2fdd559fd070', 'title': 'Home', 'first-release-date': '2021-09-24', 'genres': [], 'video': False, 'disambiguation': '', 'length': 213000, 'aliases': [], 'isrcs': ['GBEWA2103552']}, 'number': '3', 'length': 213506, 'title': 'Home', 'position': 3, 'id': '6a52b7c7-89a5-478c-908f-0925ef6c37f1', 'artist-credit': [{'name': 'Ben Böhmer', 'joinphrase': ' feat. ', 'artist': {'sort-name': 'Böhmer, Ben', 'aliases': [{'sort-name': 'Böhmer‐Bärtels, Ben', 'locale': None, 'primary': None, 'type': 'Legal name', 'ended': False, 'name': 'Ben Böhmer‐Bärtels', 'begin': None, 'end': None, 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf'}], 'type': 'Person', 'disambiguation': '', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'name': 'Ben Böhmer', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d'}}, {'artist': {'genres': [], 'id': 'ac2f5cf9-dce5-49a2-90cd-fe543ccc51fe', 'name': 'Jonah', 'type-id': 'e431f5f6-b5d2-343d-8b36-72607fffb74b', 'sort-name': 'Jonah', 'aliases': [], 'type': 'Group', 'disambiguation': 'German singer-songwriter duo Angelo Mammone & Christian Steenken'}, 'joinphrase': '', 'name': 'JONAH'}]}, {'title': 'Erase', 'position': 4, 'id': '3c1bb27b-31a8-48ce-af9d-833e5062cb8b', 'artist-credit': [{'name': 'Ben Böhmer', 'artist': {'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'name': 'Ben Böhmer', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'disambiguation': '', 'type': 'Person', 'aliases': [{'locale': None, 'primary': None, 'type': 'Legal name', 'sort-name': 'Böhmer‐Bärtels, Ben', 'name': 'Ben Böhmer‐Bärtels', 'end': None, 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf', 'begin': None, 'ended': False}], 'sort-name': 'Böhmer, Ben'}, 'joinphrase': ' feat. '}, {'artist': {'disambiguation': 'UK producer/DJ/vocalist Laura Bettinson', 'type': 'Person', 'sort-name': 'lau.ra', 'aliases': [{'locale': None, 'type': 'Legal name', 'primary': None, 'sort-name': 'Bettinson, Laura', 'name': 'Laura Bettinson', 'begin': None, 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf', 'end': None, 'ended': False}], 'id': 'b506a9db-0129-47d5-9ee1-cd78a73213f4', 'name': 'lau.ra', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'genres': [{'count': 1, 'id': 'e5bba957-8c91-496a-a675-c6d0c6b51c33', 'name': 'dance', 'disambiguation': ''}, {'count': 1, 'disambiguation': '', 'id': '89255676-1f14-4dd8-bbad-fca839d6aff4', 'name': 'electronic'}, {'disambiguation': '', 'name': 'house', 'id': 'a2782cb6-1cd0-477c-a61d-b3f8b42dd1b3', 'count': 1}]}, 'joinphrase': '', 'name': 'lau.ra'}], 'recording': {'first-release-date': '2021-08-25', 'genres': [], 'video': False, 'artist-credit': [{'joinphrase': ' feat. ', 'artist': {'sort-name': 'Böhmer, Ben', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'type': 'Person', 'disambiguation': '', 'name': 'Ben Böhmer', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d'}, 'name': 'Ben Böhmer'}, {'joinphrase': '', 'artist': {'name': 'lau.ra', 'id': 'b506a9db-0129-47d5-9ee1-cd78a73213f4', 'disambiguation': 'UK producer/DJ/vocalist Laura Bettinson', 'type': 'Person', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'sort-name': 'lau.ra'}, 'name': 'lau.ra'}], 'id': '62a53799-6877-4acb-9206-72544ea6c261', 'title': 'Erase', 'length': 253000, 'aliases': [], 'isrcs': ['GBEWA2103553'], 'disambiguation': ''}, 'length': 253240, 'number': '4'}, {'title': 'Strangers', 'artist-credit': [{'joinphrase': '', 'artist': {'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'name': 'Ben Böhmer', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'disambiguation': '', 'type': 'Person', 'aliases': [{'ended': False, 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf', 'end': None, 'begin': None, 'name': 'Ben Böhmer‐Bärtels', 'sort-name': 'Böhmer‐Bärtels, Ben', 'primary': None, 'type': 'Legal name', 'locale': None}], 'sort-name': 'Böhmer, Ben'}, 'name': 'Ben Böhmer'}], 'position': 5, 'id': '208ea646-3ef0-474e-a9dd-cb2bff26bd7a', 'recording': {'aliases': [], 'length': 271000, 'isrcs': ['GBEWA2103554'], 'disambiguation': '', 'first-release-date': '2021-09-24', 'video': False, 'genres': [], 'id': 'd15e7e6e-7433-4c90-956e-63d76ed03802', 'artist-credit': [{'joinphrase': '', 'artist': {'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'type': 'Person', 'disambiguation': '', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'name': 'Ben Böhmer', 'sort-name': 'Böhmer, Ben'}, 'name': 'Ben Böhmer'}], 'title': 'Strangers'}, 'number': '5', 'length': 271773}, {'recording': {'genres': [], 'video': False, 'first-release-date': '2021-08-04', 'title': 'Escalate', 'artist-credit': [{'name': 'Ben Böhmer', 'joinphrase': ' feat. ', 'artist': {'type': 'Person', 'disambiguation': '', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'name': 'Ben Böhmer', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'sort-name': 'Böhmer, Ben'}}, {'name': 'Jonah', 'artist': {'sort-name': 'Jonah', 'name': 'Jonah', 'id': 'ac2f5cf9-dce5-49a2-90cd-fe543ccc51fe', 'type': 'Group', 'disambiguation': 'German singer-songwriter duo Angelo Mammone & Christian Steenken', 'type-id': 'e431f5f6-b5d2-343d-8b36-72607fffb74b'}, 'joinphrase': ''}], 'id': '9f201025-074e-4978-9018-ffc283ae312e', 'isrcs': ['GBEWA2103555'], 'length': 235000, 'aliases': [], 'disambiguation': ''}, 'number': '6', 'length': 235146, 'title': 'Escalate', 'position': 6, 'id': '37760715-aa82-4c4a-b9de-5d9b2a3c24d5', 'artist-credit': [{'name': 'Ben Böhmer', 'joinphrase': ' feat. ', 'artist': {'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'name': 'Ben Böhmer', 'disambiguation': '', 'type': 'Person', 'sort-name': 'Böhmer, Ben', 'aliases': [{'name': 'Ben Böhmer‐Bärtels', 'end': None, 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf', 'begin': None, 'ended': False, 'locale': None, 'primary': None, 'type': 'Legal name', 'sort-name': 'Böhmer‐Bärtels, Ben'}]}}, {'name': 'JONAH', 'artist': {'genres': [], 'name': 'Jonah', 'id': 'ac2f5cf9-dce5-49a2-90cd-fe543ccc51fe', 'type-id': 'e431f5f6-b5d2-343d-8b36-72607fffb74b', 'aliases': [], 'sort-name': 'Jonah', 'type': 'Group', 'disambiguation': 'German singer-songwriter duo Angelo Mammone & Christian Steenken'}, 'joinphrase': ''}]}, {'recording': {'disambiguation': '', 'aliases': [], 'length': 235000, 'isrcs': ['GBEWA2103556'], 'id': '38f1a355-3619-47cd-8dc1-a8cd9a36e8db', 'artist-credit': [{'artist': {'sort-name': 'Böhmer, Ben', 'name': 'Ben Böhmer', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'disambiguation': '', 'type': 'Person', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df'}, 'joinphrase': '', 'name': 'Ben Böhmer'}], 'title': 'A Matter of Time', 'first-release-date': '2021-09-15', 'video': False, 'genres': []}, 'number': '7', 'length': 235586, 'title': 'A Matter of Time', 'id': 'b9f4d67d-16e5-451c-85e9-292b98e7c8c9', 'position': 7, 'artist-credit': [{'name': 'Ben Böhmer', 'joinphrase': '', 'artist': {'disambiguation': '', 'type': 'Person', 'aliases': [{'locale': None, 'primary': None, 'type': 'Legal name', 'sort-name': 'Böhmer‐Bärtels, Ben', 'name': 'Ben Böhmer‐Bärtels', 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf', 'end': None, 'begin': None, 'ended': False}], 'sort-name': 'Böhmer, Ben', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'name': 'Ben Böhmer'}}]}, {'id': 'de80c6f9-ceea-4a15-96ba-7946b9339b29', 'position': 8, 'artist-credit': [{'name': 'Ben Böhmer', 'artist': {'name': 'Ben Böhmer', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'sort-name': 'Böhmer, Ben', 'aliases': [{'name': 'Ben Böhmer‐Bärtels', 'begin': None, 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf', 'end': None, 'ended': False, 'locale': None, 'primary': None, 'type': 'Legal name', 'sort-name': 'Böhmer‐Bärtels, Ben'}], 'type': 'Person', 'disambiguation': ''}, 'joinphrase': ' feat. '}, {'joinphrase': '', 'artist': {'genres': [], 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'id': '0b6873ad-4e0d-451e-a56b-16851880878e', 'name': 'PBSR', 'aliases': [{'locale': None, 'type': 'Legal name', 'primary': None, 'sort-name': 'Serrano, Pablo', 'name': 'Pablo Serrano', 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf', 'end': None, 'begin': None, 'ended': False}], 'sort-name': 'PBSR', 'disambiguation': 'electronic composer/producer', 'type': 'Person'}, 'name': 'PBSR'}], 'title': 'Revelation', 'number': '8', 'length': 252093, 'recording': {'id': '95a9b566-5858-43bd-9381-1a0e7caa03e3', 'artist-credit': [{'joinphrase': ' feat. ', 'artist': {'sort-name': 'Böhmer, Ben', 'name': 'Ben Böhmer', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'type': 'Person', 'disambiguation': ''}, 'name': 'Ben Böhmer'}, {'name': 'PBSR', 'joinphrase': '', 'artist': {'sort-name': 'PBSR', 'id': '0b6873ad-4e0d-451e-a56b-16851880878e', 'name': 'PBSR', 'type': 'Person', 'disambiguation': 'electronic composer/producer', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df'}}], 'title': 'Revelation', 'first-release-date': '2021-09-24', 'video': False, 'genres': [], 'disambiguation': '', 'aliases': [], 'length': 252000, 'isrcs': ['GBEWA2103557']}}, {'recording': {'disambiguation': '', 'isrcs': ['GBEWA2103558'], 'length': 288000, 'aliases': [], 'title': 'Fade to Blue', 'artist-credit': [{'name': 'Ben Böhmer', 'joinphrase': '', 'artist': {'name': 'Ben Böhmer', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'type': 'Person', 'disambiguation': '', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'sort-name': 'Böhmer, Ben'}}], 'id': 'd17606df-fe9f-4eb6-8513-f35a87d174fb', 'genres': [], 'video': False, 'first-release-date': '2021-09-24'}, 'length': 288600, 'number': '9', 'title': 'Fade to Blue', 'id': 'd5bdfaa3-71e3-44c0-a4d9-dc6727ca6a4d', 'position': 9, 'artist-credit': [{'name': 'Ben Böhmer', 'artist': {'type': 'Person', 'disambiguation': '', 'aliases': [{'type': 'Legal name', 'primary': None, 'locale': None, 'sort-name': 'Böhmer‐Bärtels, Ben', 'end': None, 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf', 'begin': None, 'name': 'Ben Böhmer‐Bärtels', 'ended': False}], 'sort-name': 'Böhmer, Ben', 'name': 'Ben Böhmer', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df'}, 'joinphrase': ''}]}, {'recording': {'isrcs': ['GBEWA2103559'], 'length': 240000, 'aliases': [], 'disambiguation': '', 'genres': [], 'video': False, 'first-release-date': '2021-09-24', 'title': 'Once…', 'artist-credit': [{'name': 'Ben Böhmer', 'artist': {'sort-name': 'Böhmer, Ben', 'disambiguation': '', 'type': 'Person', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'name': 'Ben Böhmer', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d'}, 'joinphrase': ''}], 'id': '6346c8d9-fe84-49b8-a10d-71333922b59f'}, 'number': '10', 'length': 240293, 'title': 'Once…', 'artist-credit': [{'name': 'Ben Böhmer', 'joinphrase': '', 'artist': {'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'name': 'Ben Böhmer', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'disambiguation': '', 'type': 'Person', 'aliases': [{'begin': None, 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf', 'end': None, 'name': 'Ben Böhmer‐Bärtels', 'ended': False, 'type': 'Legal name', 'primary': None, 'locale': None, 'sort-name': 'Böhmer‐Bärtels, Ben'}], 'sort-name': 'Böhmer, Ben'}}], 'id': 'cd3e8df7-1460-4001-8863-b6d8c38f3eee', 'position': 10}, {'length': 206520, 'number': '11', 'recording': {'length': 206000, 'aliases': [], 'isrcs': ['GBEWA2103560'], 'disambiguation': '', 'first-release-date': '2021-09-24', 'genres': [], 'video': False, 'artist-credit': [{'joinphrase': ' feat. ', 'artist': {'sort-name': 'Böhmer, Ben', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'disambiguation': '', 'type': 'Person', 'name': 'Ben Böhmer', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d'}, 'name': 'Ben Böhmer'}, {'joinphrase': '', 'artist': {'sort-name': 'Gordi', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'disambiguation': '', 'type': 'Person', 'id': 'b7732e25-d347-46cc-8668-605c8b773c71', 'name': 'Gordi'}, 'name': 'Gordi'}], 'id': '4b9f7fb5-8288-4599-a57b-6e386e71b59c', 'title': 'Slow Wave'}, 'position': 11, 'id': '40a040f2-8a33-4bdb-9c4b-e93f3b843d2e', 'artist-credit': [{'artist': {'type': 'Person', 'disambiguation': '', 'sort-name': 'Böhmer, Ben', 'aliases': [{'ended': False, 'name': 'Ben Böhmer‐Bärtels', 'begin': None, 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf', 'end': None, 'sort-name': 'Böhmer‐Bärtels, Ben', 'locale': None, 'type': 'Legal name', 'primary': None}], 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'name': 'Ben Böhmer'}, 'joinphrase': ' feat. ', 'name': 'Ben Böhmer'}, {'joinphrase': '', 'artist': {'genres': [{'count': 1, 'disambiguation': '', 'id': 'ec5a14c7-7793-46dc-b858-470183eb63f7', 'name': 'folktronica'}, {'name': 'indie pop', 'id': 'f390be72-360b-41bb-a310-6a2e638779d2', 'disambiguation': '', 'count': 1}, {'count': 1, 'id': '455f264b-db00-4716-991d-fbd32dc24523', 'name': 'singer-songwriter', 'disambiguation': ''}], 'name': 'Gordi', 'id': 'b7732e25-d347-46cc-8668-605c8b773c71', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'aliases': [{'end': None, 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf', 'begin': None, 'name': 'Sophie Payten', 'ended': False, 'type': 'Legal name', 'primary': None, 'locale': None, 'sort-name': 'Payten, Sophie'}], 'sort-name': 'Gordi', 'type': 'Person', 'disambiguation': ''}, 'name': 'Gordi'}], 'title': 'Slow Wave'}], 'discs': [{'id': '0bPX.4TaK1KuFsAyVbulgY5Zxz4-', 'offset-count': 11, 'offsets': [150, 12282, 35801, 51814, 70807, 91190, 108826, 126495, 145402, 167047, 185069], 'sectors': 200558}], 'title': '', 'format': 'CD'}], 'title': 'Begin Again', 'quality': 'normal', 'asin': None, 'release-group': {'genres': [{'id': '7fa479e7-3d35-40d1-96f7-b619a5ca9d9f', 'name': 'deep house', 'disambiguation': '', 'count': 1}, {'count': 1, 'name': 'electronic', 'id': '89255676-1f14-4dd8-bbad-fca839d6aff4', 'disambiguation': ''}, {'id': 'a2782cb6-1cd0-477c-a61d-b3f8b42dd1b3', 'name': 'house', 'disambiguation': '', 'count': 1}, {'disambiguation': '', 'id': '70adb285-e1f7-458a-823f-5cbda5e291c4', 'name': 'progressive house', 'count': 1}], 'title': 'Begin Again', 'secondary-types': [], 'first-release-date': '2021-09-24', 'id': 'df82a0e4-24b1-4584-9447-87a1aaf9316e', 'artist-credit': [{'artist': {'name': 'Ben Böhmer', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'sort-name': 'Böhmer, Ben', 'aliases': [{'ended': False, 'name': 'Ben Böhmer‐Bärtels', 'begin': None, 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf', 'end': None, 'sort-name': 'Böhmer‐Bärtels, Ben', 'locale': None, 'primary': None, 'type': 'Legal name'}], 'disambiguation': '', 'type': 'Person'}, 'joinphrase': '', 'name': 'Ben Böhmer'}], 'relations': [{'source-credit': '', 'type': 'artists and repertoire', 'ended': False, 'attributes': [], 'type-id': '25dd0db4-189f-436c-a610-aacb979f13e2', 'artist': {'id': '7486363a-c872-4eae-8b87-cc12b6bf555e', 'name': 'Daniel Curpen', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'type': 'Person', 'disambiguation': '', 'sort-name': 'Curpen, Daniel'}, 'target-type': 'artist', 'attribute-values': {}, 'target-credit': '', 'attribute-ids': {}, 'direction': 'backward', 'end': None, 'begin': None}, {'ended': False, 'artist': {'sort-name': 'McGrath, Allan', 'disambiguation': '', 'type': 'Person', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'name': 'Allan McGrath', 'id': 'cb659197-7d57-4116-ae06-943e2a9718e8'}, 'type-id': 'e035ac25-a2ff-48a6-9fb6-077692c67241', 'attributes': [], 'type': 'creative direction', 'source-credit': '', 'direction': 'backward', 'begin': None, 'end': None, 'attribute-values': {}, 'target-type': 'artist', 'attribute-ids': {}, 'target-credit': ''}, {'direction': 'forward', 'end': None, 'begin': None, 'attribute-values': {}, 'target-type': 'url', 'attribute-ids': {}, 'target-credit': '', 'ended': False, 'type-id': '38320e40-9f4a-3ae7-8cb2-3f3c9c5d856d', 'attributes': [], 'url': {'resource': 'https://www.offiziellecharts.de/charts/album-details-484918', 'id': 'a00e5cb8-bdad-4617-929c-fbb079c98fc1'}, 'type': 'other databases', 'source-credit': ''}], 'aliases': [], 'disambiguation': '', 'primary-type-id': 'f529b476-6e62-324f-b0aa-1f3e33d313fc', 'secondary-type-ids': [], 'primary-type': 'Album'}, 'collections': [], 'barcode': '5039060237229', 'artist-credit': [{'joinphrase': '', 'artist': {'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'name': 'Ben Böhmer', 'id': 'e4f12dfc-1ee7-4250-8e24-549b6d46676d', 'genres': [], 'type': 'Person', 'disambiguation': '', 'sort-name': 'Böhmer, Ben', 'aliases': [{'name': 'Ben Böhmer‐Bärtels', 'type-id': 'd4dcd0c0-b341-3612-a332-c0ce797b25cf', 'end': None, 'begin': None, 'ended': False, 'locale': None, 'type': 'Legal name', 'primary': None, 'sort-name': 'Böhmer‐Bärtels, Ben'}]}, 'name': 'Ben Böhmer'}], 'text-representation': {'language': 'eng', 'script': 'Latn'}, 'date': '2021-09-24', 'annotation': None, 'country': 'GB', 'cover-art-archive': {'artwork': False, 'front': False, 'darkened': False, 'back': False, 'count': 0}, 'status-id': '4e304316-386d-3409-af2e-78857eec5cfe', 'release-events': [{'date': '2021-09-24', 'area': {'type-id': None, 'id': '8a754a16-0027-3a29-b6d7-2b40ea0481ed', 'name': 'United Kingdom', 'sort-name': 'United Kingdom', 'type': None, 'disambiguation': '', 'iso-3166-1-codes': ['GB']}}], 'label-info': [{'label': {'name': 'Anjunadeep', 'id': '5b66608b-878d-4d7a-a96b-6da38356f6c8', 'type-id': '7aaa37fe-2def-3476-b359-80245850062d', 'genres': [], 'disambiguation': '', 'type': 'Original Production', 'aliases': [], 'label-code': None, 'sort-name': 'Anjunadeep'}, 'catalog-number': 'ANJCD101'}], 'relations': [{'direction': 'backward', 'begin': None, 'end': None, 'target-type': 'artist', 'attribute-values': {}, 'target-credit': '', 'attribute-ids': {}, 'ended': False, 'attributes': [], 'type-id': 'f3b80a09-5ebf-4ad2-9c46-3e6bce971d1b', 'artist': {'sort-name': 'Chadwick, Ben', 'name': 'Ben Chadwick', 'id': '1cd6b10f-2bca-45a1-a3c4-9c8bb072faa0', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'disambiguation': '', 'type': 'Person'}, 'source-credit': '', 'type': 'art direction'}, {'begin': None, 'end': None, 'direction': 'backward', 'attribute-ids': {}, 'target-credit': '', 'attribute-values': {}, 'target-type': 'artist', 'type-id': '9c02ea37-7680-4fb5-8555-e330c7aa885b', 'artist': {'disambiguation': '', 'type': 'Person', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'id': '1cd6b10f-2bca-45a1-a3c4-9c8bb072faa0', 'name': 'Ben Chadwick', 'sort-name': 'Chadwick, Ben'}, 'attributes': [], 'ended': False, 'type': 'design', 'source-credit': ''}, {'attribute-ids': {}, 'target-credit': '', 'attribute-values': {}, 'target-type': 'artist', 'end': None, 'begin': None, 'direction': 'backward', 'type': 'mastering', 'source-credit': '', 'type-id': '84453d28-c3e8-4864-9aae-25aa968bcf9e', 'artist': {'sort-name': 'LaPorta, Joe', 'disambiguation': "NYC mastering engineer & drum'n'bass producer", 'type': 'Person', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'id': '56ab5201-2470-41a7-8a81-5be5876e1502', 'name': 'Joe LaPorta'}, 'attributes': [], 'ended': False}, {'ended': False, 'artist': {'type': 'Person', 'disambiguation': '', 'type-id': 'b6e035f4-3ce9-331c-97df-83397230b0df', 'id': '1cd6b10f-2bca-45a1-a3c4-9c8bb072faa0', 'name': 'Ben Chadwick', 'sort-name': 'Chadwick, Ben'}, 'type-id': '0b58dc9b-9c49-4b19-bb58-9c06d41c8fbf', 'attributes': [], 'type': 'photography', 'source-credit': '', 'direction': 'backward', 'end': None, 'begin': None, 'attribute-values': {}, 'target-type': 'artist', 'attribute-ids': {}, 'target-credit': ''}, {'attribute-ids': {}, 'target-credit': '', 'attribute-values': {}, 'target-type': 'url', 'begin': None, 'end': None, 'direction': 'forward', 'type': 'discogs', 'url': {'resource': 'https://www.discogs.com/release/20358988', 'id': '146d692a-aa99-4bd2-9b7d-3559c3e52ea7'}, 'source-credit': '', 'type-id': '4a78823c-1c53-4176-a5f3-58026c76f2bc', 'attributes': [], 'ended': False}], 'packaging': 'Gatefold Cover', 'id': 'a7899fa9-cb47-499d-8eb4-a960c68d2d43', 'aliases': [], 'packaging-id': 'e724a489-a7e8-30a1-a17c-30dfd6831202', 'disambiguation': '', 'status': 'Official'}

No, right click on one of the files and choose “Show scripting variables” in the plugin menu.

Is there a value for “catalognumber”? If not, is it maybe spelled differently?

Ok, got it:

Link to video, showin whats happen:

I reinstalled the program, deleted user data and configured it again. The script adds catalognumber in all “releasetype” except “album”. I’m completely lost and honestly don’t know how to solve this problem.

Could you take a look at my script? Thank you.

$swapprefix($if2(%_artists_album_primary_std%,%artist%),The,Die,Le)
/$replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($swapprefix($if2(%albumartist%,%artist%),The,Die,Le),",''), meets , & ), X , & ), × , & ),; , & ), x , & ), | , & ), · , & ), • , & ), ⋅ , & ), and , & ),+,&), with , & ), _ , & ), vs , & ), vs. , & ) - $replace($replace($truncate(%album%,100),",''),:,-)
$if($in(%media%,CD),$if($gt(%totaldiscs%,1), %totaldiscs%CD),)
$if(%date%, [%date%],)
$if($eq(%releasestatus%,promotion), [Promo],)
$if($eq(%releasestatus%,bootleg), [Bootleg],)
$if($eq(%releasetype%,album), [Album],
$if($eq(%releasetype%,single), [Single],
$if($eq(%releasetype%,ep), [EP],
$if($eq(%releasetype%,broadcast), [FM],
$if($eq(%releasetype%,other), [Other],
$if($inmulti(%releasetype%,dj-mix), [DJ Mix],
$if($inmulti(%releasetype%,djmix), [DJ Mix],
$if($inmulti(%releasetype%,remix), [Remix],
$if($inmulti(%releasetype%,soundtrack), [OST],
$if($inmulti(%releasetype%,live), [Live],
$if($inmulti(%releasetype%,mixtape/street), [Mixtape],
$if($inmulti(%releasetype%,compilation), [Comp],)))))))))))
$if($ne_all(%catalognumber%,none,[none]),$if(%catalognumber%, $upper([$replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($rsearch(%catalognumber%,\(.+?\)\(?:; |\$\)+),_,),⋅,),/,),:,),*,),?,),",),<,),>,),|,), ,)]))))
$if($in(%media%,Digital Media), [WEB],)
$if($in(%media%,Vinyl), [VNL],)
$if($in(%media%,Cassette), [CASS],)
$if($ne(%_extension%,mp3), $upper(%_extension%))
$if($gt(%_bits_per_sample%,16), %_bits_per_sample%bit $div(%_sample_rate%,1000)kHz)
/$if($in(%media%,CD),$if($gt(%totaldiscs%,1),CD$num(%discnumber%,2)$if(%discsubtitle%, $title(- %discsubtitle%),)))
$if($in(%media%,Digital Media),$if($gt(%totaldiscs%,1),CD$num(%discnumber%,2)$if(%discsubtitle%, $title(- %discsubtitle%),)))
$if($in(%media%,Vinyl),$if($gt(%totaldiscs%,1),Vinyl $num(%discnumber%,2)$if(%discsubtitle%, $title(- %discsubtitle%),)))
/$if($in(%media%,Vinyl),%_musicbrainz_tracknumber%,$num(%tracknumber%,2)). $if($and(%_multiartist%,$or(%releasetype%,%compilation%,%djmix%)),%artist% - ,)$truncate(%title%,80)

It seems that the problem generally lies in line 7 of code. When I changed the order, catalognumber is added to the “album”. No matter what type of “releasetype” i set, if it is on line 7 “catalognumber” will not be added. Weird.