Jellyfin Forum
10.11.1 - MKA issue - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: 10.11.1 - MKA issue (/t-10-11-1-mka-issue)



10.11.1 - MKA issue - 34626 - 2025-11-02

Im currently working thru my entire music library, so the music is converted from .WAV to .flac, and then stored in a .MKA container.
This seems to work just fine and save about 33% space and bandwidth.
The issue i belive to experience is somewhat the same as this topic:
https://forum.jellyfin.org/t-mka-tags-recognized-by-jellyfin
I have a bash script that should add some user defined metadata + track number.
Example:
Bon Jovi/Crush (2000)/01 - It’s My Life.mka
When adding to Jellyfin it will look loke this:
Bon Jovi/Crush (2000)/It’s My Life

And the order of the songs is then messed up. Why dont i just add the 01. to the name of the songs metadata?
When i create a playlist, i really like just the title of each song, i dont need their track numbers there, besides of the order of the songs in the playlist

Below is the bash script i run to add Artist, Album, Year and track numbers:


Quote:#!/bin/bash
# sudo apt install mkvtoolnix-gui jq
ARTIST="Bon Jovi"
ALBUM="Crush"
YEAR="2000"

for f in *.mka; do
    echo "Processing '$f' ..."

    TRACK_UID=$(mkvmerge -J "$f" | jq -r '.tracks[0].properties.uid')
    BASENAME="${f%.mka}"

    if [[ "$BASENAME" =~ ^([0-9]{1,2})[[:space:]]*[-\.][[:space:]]*(.*)$ ]]; then
        TRACKNUMBER="${BASH_REMATCH[1]}"
        TITLE="${BASH_REMATCH[2]}"
        CONTAINER_TITLE="${TRACKNUMBER} - ${TITLE}"
    else
        TRACKNUMBER=""
        TITLE="$BASENAME"
        CONTAINER_TITLE="$TITLE"
    fi

    XMLFILE=$(mktemp)
    cat > "$XMLFILE" <<EOL
<?xml version="1.0"?>
<Tags>
  <Tag>
    <Targets>
      <TrackUID>$TRACK_UID</TrackUID>
    </Targets>
    <Simple><Name>ARTIST</Name><String>$ARTIST</String></Simple>
    <Simple><Name>ALBUM</Name><String>$ALBUM</String></Simple>
    <Simple><Name>YEAR</Name><String>$YEAR</String></Simple>
    <Simple><Name>TITLE</Name><String>$TITLE</String></Simple>
  </Tag>
</Tags>
EOL

    mkvpropedit "$f" --tags all:"$XMLFILE"

    mkvpropedit "$f" --edit info --set "title=$CONTAINER_TITLE"

    rm "$XMLFILE"
done

echo "Done!"