Add files, one-by-one to SAME INSTANCE of Mp3tag

In my own test even a direct call like
mp3tag.exe playlist.m3u8
seems to work.

That does not work for me as it tries to search for it in the program folder.


This

mp3tag.exe "/fn:Lieblingssongs_lms.m3u8"

does work tho. Z: is a samba share mounted in Windows.

Sorry, in my simplified example I forgot to say that it would be best if you use the complete path to both parts
"C:\Program Files\Mp3tag\mp3tag.exe"
and
"C:\Temp\My new created Playlist - 2025.m3u8"
if you want to ensure to be able to call it from anywhere.

This works fine if you start it - for example in - %userprofile% as
"C:\Program Files\Mp3tag\mp3tag.exe" "C:\Temp\My new created Playlist - 2025.m3u8"

Good to know.
I chose to go a different route in my script. It first checks if Mp3tag is on PATH and if not, opens the Windows environment variable settings with instructions on how to add Mp3tag to PATH (if the OS is Windows). That way I don't have to assume where Mp3tag is installed and as long as it's on PATH, it doesn't matter.

I changed the method to use a temporary playlist in lyrict.

def add_to_mp3tag(match_categories):
    # Create a temporary .m3u8 file containing all songs with linked lyrics
    file_paths = set()  # Use a set to remove duplicates

    # Collect all file paths
    for audio_types in match_categories.values():
        for file_list in audio_types.values():
            file_paths.update(file_list)

    # Sort file paths
    sorted_paths = sorted(file_paths)

    # Write to .m3u8 file
    with open("lyrict_temp.m3u8", "w", encoding="utf-8") as f:
        f.write("#EXTM3U\n")  # M3U8 header
        for file in sorted_paths:
            f.write(f"{file}\n")
    try:
        print("Waiting for Mp3tag to close before removing lyrict_temp.m3u8.")
        subprocess.run(["mp3tag", "/fn:lyrict_temp.m3u8"])
    except subprocess.CalledProcessError:
        print(f"Error while opening lyrict_temp.m3u8 in Mp3tag.")
    try:
        os.remove("lyrict_temp.m3u8")
    except:
        print("Could not remove lyrict_temp.m3u8.")

Now Mp3tag no longer flickers and hogs the foreground while opening tracks one at a time and it's also far quicker.

@LyricsLover thanks again for pointing out that playlists can be used!