CLI (command line interface)

Streamtuner2 is a graphical tool. But it also has a limited commandline interface, which can be used to query station information. This is useful for interfacing with other applications.

Open a terminal and call streamtuner2 help to get an overview over available commands.

Examples

streamtuner2 play "station"

This command looks through all channel plugins, and finds a station containing the mentioned title. You must put the station title in quotes in shell calls, if it contains e.g. spaces. You can optionally specify a channelname before the station title.

streamtuner2 url [channel] "station"

Just looks up the streaming URL for a given station. If no channel name is given, ST2 searches through all available channel plugins again.

streamtuner2 stream shoutcast "station"

Prints available station data as JSON

streamtuner2 category internet_radio_org_uk "Pop"

Loads fresh data from the specified channel service, and prints out JSON data for the whole category. Note that the category name must have the excact case.

streamtuner2 categories channel

Fetches the current list of available categories/genres for a channel service.

Specifying a channel name is often optional. If you add one, it should be all-lowercase. You can also give a list, like "shoutcast,xiph" which would be searched then.

GUI options

There are also a few command line flags, which influence the graphical runtime.

  • --gtk3

    Picks the Gtk3 toolkit. Which is default for Python3 runs. But could also be used for Python2 instead of pygtk.

  • --gtk2

    Fake option. Python2 runs on Gtk2 per default. And Py3 is bound to Gtk3/PyGObject anyway.

  • -D

    Enable debug output on the console. Identical to the debug configuration dialog option.

  • -d plugin

    Disable a named plugin. Useful if it hangs on startup. So -d xiph can temporarily disable it. Note that this flag gets set durably by clicking [save] in the config dialog.

  • -e plugin

    Enable a channel/feature plugin just once.

  • -h

    Print help list with all known command line flags. Note that this excludes details on the CLI action commands.

  • -x

    Exit right away. A flag only used for testing.