Multi-value tags

  • John Glasson
    John Glasson

    I've been a Twonky Server user for the past 5 years but have long been disappointed that they offer no support for multi-value ID3 tags.  I recently installed MediaTomb on my WD MBMW to see if this offered a solution.

    I was most impressed at how easy it was to install the static binary and configure it.  Better still, I found that the scripting is very flexible; within a day I was able to customise the installation to do exactly what I'd been trying for so long to achieve on Twonky.

    My requirement for multi-value tags is because I have a classical collection with multiple artists per track.  I delimit the artists with a '/' character.  My import.js file conains the following:

    In the first section (reading in the data):

        var artist = obj.meta;
        var artists = artist.split("/")
        if (!artist)
            artist = 'Unknown';
            artist_full = null;
            artist_full = artist;
            desc = artists;

    In the second section (building the chains):

        var len=artists.length;
        for(var i=0; i<len; i++) {
    chain = new Array('Audio', 'Artists', abcbox(artists_, 9, '-'), artists, composer, album);
    obj.title = track + title;
    addCdsObject(obj, createContainerChain(chain), UPNP_CLASS_CONTAINER_MUSIC_ALBUM);
    chain = new Array('Audio', 'Composers', abcbox(composer,9,'-'), composer, genre, album, artists);
    addCdsObject(obj, createContainerChain(chain), UPNP_CLASS_CONTAINER_MUSIC_ALBUM);

    This results in a tree which looks like this:

                    CBC Radio Orchestra
                    CBC Vancouver Orchestra
                    Calgary Philharmonic Orchestra
                    Chamber Music
                        Oboe Sonata in B minor, BWV.1030
                            All Tracks
                            Douglas Boyd:oboe
                            Knut Johannessen:harpsichord
                        Six Suites for Cello
                        Sonata in A major for 2 violins and harpsicord

    If this is of interest to other users I can provide more detail_