Radio v2.0.0.0 ALPHA 1 – Open for testing

Decided to release Radio version 2 for alpha testing right now. Currently open to the public but requires the complete package to function correctly.

Download the complete package directly from here.

Plugins included:
Dynamic by Neuro_Toxin from here – Awesome plugin used to store the stations and genres (This is essential for plugin functionality to store data).
Using CURL right now for HTTP requests but SteamWorks is also supported for the ShoutCast auto-updating playlists.
SourceMod Updater by GoD-Tony – Official thread can be found here (Plugin won’t run without this installed. Want to make sure this time round that everything is kept up to date, especially on an Alpha or Beta release schedule. Had problems last time round with servers getting hit quite heavy from a small error on an outdated plugin).

Play Type and Playlist Changes:
Right now we have 3 methods to load stations using the console variable sm_radio_play_type.

1.0 = Direct – This is the very first method released on Radio that used a direct webplayer from your favourite station.
2.0 = Volume – Came around in v1.0.0.16 that utilised a wrapper page to load stations and could access streams directly
3.0 = ShoutCast – This is a new method in version 2, that loads everything through radio.dubbeh.net utilising the ShoutCast.com API and auto-updating playlists on a weekly basis.

The old method of station loading is no longer valid – so old playlists won’t work anymore, will have to be converted to the new format. Everything has now switched to Keyvalues and storing data with Dynamic by Neuro_Toxin.

Genres are supported with child-genres using:

“Has Children” “1”

Inside the root Genre Node, example:


"Radio Stations"
{
    "Off Page" "about:blank"
    "Volume Wrapper" "https://dubbeh.net/sm/rvw.html"
    "Browse Fix" "https://dubbeh.net/sm/rbf.php"
    "Shoutcast Player" "https://radio.dubbeh.net/index.php"
    "ShoutCast Version" "1473253537"
    "Use Genres" "1"

    "Alternative"
    {
        "Genre ID" "1"
        "Has Children" "1"

        "Adult Alternative"
        {
            "Genre ID" "2"
            "Has Children" "0"
            "Cherry FM"
            {
                "Station ID" "1"
                "Stream URL" "http://listen.com/stream"
            }
        }
    }
}

Can see an example of this inside the ShoutCast auto-updated playlist for full effect, just make sure to add the “Stream URL” for the station – So the station knows what the Stream URL is for the current station outside of ShoutCast mode.

This is another example with base genres only:


"Radio Stations"
{
    "Off Page" "about:blank"
    "Volume Wrapper" "https://dubbeh.net/sm/rvw.html"
    "Browse Fix" "https://dubbeh.net/sm/rbf.php"
    "Shoutcast Player" "https://radio.dubbeh.net/index.php"
    "ShoutCast Version" "1473253537"
    "Use Genres" "1"

    "Alternative"
    {
        "Genre ID" "1"
        "Has Children" "0"
        "Cherry FM"
        {
            "Station ID" "1"
            "Stream URL" "http://listen.com/stream"
        }
    }
}

Now the parser will take the following section as an actual station because “Has Children” is set to 0.

Final example is stations without utilising any type of genres:


"Radio Stations"
{
    "Off Page" "about:blank"
    "Volume Wrapper" "https://dubbeh.net/sm/rvw.html"
    "Browse Fix" "https://dubbeh.net/sm/rbf.php"
    "Shoutcast Player" "https://radio.dubbeh.net/index.php"
    "ShoutCast Version" "1473253537"
    "Use Genres" "0"

    "Cherry FM"
    {
        "Station ID" "1"
        "Stream URL" "http://listen.com/stream"
    }
}

All we have to do is set “Use Genres” “0” and each section from that point on-wards is read as a station.
Don’t worry about having to add a Genre ID/Station ID for each individual entry, if one isn’t found then the plugin will generate a random one using the SourceMods built in random function.

Last final thing about the station config changes. All files are stored inside the “sourcemod/configs/” folder.

sm_radio_play_type config files are as follows:
1.0 – Direct – sourcemod/configs/radiodirect.txt
2.0 – Volume – sourcemod/configs/radiovolume.txt
3.0 – ShoutCast – sourcemod/configs/radioshoutcast.txt

This is to make things much easier when using different radio play types and not having to change the config file everytime.

Will keep this updated if i think of anything else that needs to be added, before the final release.

Enjoy

Edit…
Added a complete download package and dropped GitHub. Too many repos to manage with GitHub/Local/Online to update. Switched back to the standard Local and Online.

Edit 2…
Track query is supported for some stations under ShoutCast mode with SteamWorks. Planning on adding cURL support in Alpha 2
Just need to type in chat “!radio track” or “!radio song” to get the currently playing song (This is fixed on a 60s internal update timer).

2 thoughts on “Radio v2.0.0.0 ALPHA 1 – Open for testing

Leave a Reply to Neuro ToxinCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.