No announcement yet.

Creating my first audio plugin: Melodice integration

  • Filter
  • Time
  • Show
Clear All
new posts

    Creating my first audio plugin: Melodice integration


    Return JSON with an id.

    Thematic background music playlists for Qwirkle board game.

    playlist/$id seems to return the HTML. In there you would find the songs
    array as outlined in my previous message. As long as they don't change
    that interface this should be pretty easy to parse :-). Good luck!

    Creating my first audio plugin: Melodice integration

    Hi everyone,

    I often use platforms like bandcamp, youtube and on my squeezebox devices and I love how well these integrations run. There's a website that I'd like to built such an integration for: Melodice. This website has a database of boardgames linked to youtube playlists and has been a staple of my weekly game nights. I'd love to have access to it from my squeezebox. Functionally all the plugin needs is a search box linked to their database and the ability to play youtube videos. But how do I go about setting something like that up? This is what I've gathered so far:

    wiki has a page builder template that functions as a rough outline of how a plugin is structured. I think I understand about 50% of it (beginner coder)

    reacts to id="search-input"
    button id="search-btn" type="submit"

    my questions to you is:
    - where do I start?
    - how much trouble is it to make an integration like this for a beginner like me? is it worth it?
    - do I need to contact the makers of this site ask them for an API? again: very new to all this

    Thanks for all the help!


      #3 is what I intend to use as the basis

      This is the site, its very basic so I hope that makes it easier to work with


        Creating my first audio plugin: Melodiceintegration

        > is what I
        > intend to use as the basis

        Unfortunately this quite a bit dated. I'd rather start based on
        Slim::Plugin::OPMLBased. This base class provides easy ways to create
        the navigation menus. But you'll have to learn from code doing so...

        The good news is there already is a Youtube plugin which should handle
        the hard part of getting playback of Youtube videos. From what I read
        this is painful. So be happy you don't have to deal with it :-).

        All you might have to do is get the playlist data from melodice, then
        convert it into something the YT plugin understands (might be URLs like
        youtube://some-identifier), and queue up those tracks.

        > This is the site, its very basic so I hope that makes it easier to work
        > with

        I'd ask them whether they have an API. Because parsing HTML is ugly and
        prone to errors. Though they seem to include the required data as a
        JavaScript object in the code. Eg. I found this for "qwirkle":

        songs = [
        'iid': '39676',
        'eid': 'eEYDnsLUHCA',
        'title': 'Though the Stars Still Stay Out',
        'iid': '10079',
        'eid': 'toXNVbvFXyk',
        'title': '"Resonant Chamber" -',
        'iid': '10082',
        'eid': 'M6r4pAqOBDY',
        'title': 'Animusic HD - Fiber Bundles (1080p)',
        'iid': '10081',
        'eid': 'YOQJxRCCpw8',
        'title': 'Animusic HD- Pogo Sticks (1080p)',
        'iid': '10084',
        'eid': 'Cgt4DEBQy50',
        'title': 'Animusic - Aqua Harp',
        'iid': '10085',
        'eid': 'OROAGNbsikQ',
        'title': 'Animusic - Acoustic Curves',
        'iid': '10080',
        'eid': 'hyCIpKAIFyo',
        'title': '"Pipe Dream" -',

        But as I said: an API would be much better and robust to use.

        "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
        (LMS: Settings/Information)


          Thanks for the advice! I'll get in contact with them and see what they've got.


            Already got a reply from melodice: they unfortunately have no API. They recommeded I "parse the HTML".
            So that's the plan: figure out how to parse this thing into my squeezebox


              For the initial request you will also have to set a HTTP header
              "X-Requested-With: XMLHttpRequest"
              otherwise they will respond with "fail".
              Paul Webster
              Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
              and, via the extra "Radio Now Playing" plugin lots more - see