SubFire Radio

SubFire Radio, hosted at http://subfireplayer.net/radio/# is a playlist generator for the Subsonic music streaming server. It allows one to create 'stations' (implemented as shared playlists with a special JSON syntax in its comment), consisting of lists of generators, each a configuration of methods of the the Subsonic public API.

Using SubFire Radio

Start by logging in to your server. Once in, you can create a new station using the green '+' button in the corner. Name your station, then start adding and configuring generators. Save your station after adding your generators, then click 'generate' and the tool will fetch file references and produce a playlist.

Click on the generator's name in the editing card to change it.

Each generator can be limited to the number of files it includes, using the 'Limit' field. 0 or empty means all files found by the generator will be included in the shuffle.

Weight is not yet implemented, but when it is, you can add a priority percentage 00-99 to weight the generator. All generators with weights will be rated at their own percentages. All remaining generators will be mixed in and songs from them included at the remaining percentage. E.g., I have 4 generators, 2 with weights 30 and 20, the other two without rates. On average, this means that 30% of the songs will come from the first, 20% from the second, and 50% of the songs will come from the other two. If a generator runs out of songs while the others still have them, it will be ignored (which means the final percentages really depend on number of files found by each generator).

Generators

The Generators generally reflect the fetching methods from the Subsonic API.

  • Random Songs: fetches a random assortment of songs. Can be constrained by year, genre, and the top-level music folder. Limit defaults to 50 if unspecified.
  • Playlist: fetches all the songs from an existing playlist. Stations are not included in the available playlist list (this isn't THAT meta).
  • Album: fetches all the songs from a single album. You can search for the album or browse through the list of Artists (ID3 tagged)
  • Similar Songs: like the 'radio' mode of Subsonic, it uses the server to fetch a list of similar artists from last.fm, then shuffles all songs from those artists (plus the key artist). Limit defaults to 50 if unspecified.
  • Top Songs: fetches the top songs from an artist, based on last.fm info. Note: this is not 'random'. If you have more than one version of a song (live versions), there is no control over which one it will pick, but once it picks one, that is the one that will be used every time.
  • Artist Songs: fetches all the songs from all the albums of a particular artist (based on ID3 tag).
  • Music Directory Songs: fetches all the songs from every folder including and below the folder specified.
  • Music Directory Albums: similar to Music Directory Songs, but it will preserve the order of songs within an album. The album itself will be considered '1' item for the purposes of the shuffle. I use this for my classical music generators where I would rather "Beethoven's 5th" not be broken up and scattered about.

Security Concerns

Like SubFire, SubFireRadio is (currently) exclusively a CORS-based client. The communication to your Subsonic server goes directly from your browser to your server, without any proxy or intermediary other than what you may use yourself.

Since SubFireRadio is not embedded as an extension or deployed app, it will support HTTPS if you specify it, and should accept any unsigned certificate if your browser has already approved it as an exception. However, I am in no position to test that yet.

It can be accessed via an https link, https://subfireplayer.net/radio/, but it will not encrypt any communication to your server if it is http only. Instead, it will fail to connect. That is a browser restriction I have no control over.

Known Issues

Sometimes a generator may be 'duplicated' and any edits affect both (or all) of them. If this happens, just save it, reload the page, then go back and delete the duplicates.

I haven't replicated this in a while, but sometimes the Artist chooser may stop working if you were first in an Album search. Again, save what you have, reload, and continue working.

There is no 'delete' feature for a station. Simply delete the playlist in your Subsonic web UI.

You can not edit the station/playlist that belongs to someone else, but there is no warning that you may be attempting this.

There is no warning if the user account does not have permission to create or edit a playlist.

There's not nearly enough feedback if something goes wrong. *shrug*

Future Directions

  • Finish the 'Weight' feature.
  • Fetch Starred songs/albums
  • Preserve Album order/contents in Album or Artist generators.
  • Add ability to exclude a subfolder in the Music Directory searches
  • Add ability to exclude an album in the Artist All-Songs generator
  • A single button to regenerate all of your current stations
  • Ability in the SubFire app to generate a station on the fly, with or without committing it to the playlist
  • Get off the "CDNs". Currently, jquery, materializecss, and the font-icons are loaded by external URLs. This is not practical in the long run. I already had an issue yesterday where google's icons failed to load, freezing the page.

© 2016 Joseph W Shelby, JWSDev.net. All rights reserved. Released under the MIT License. Feedback may be submitted at the Subsonic forum, or at the support page.