Documentation ¶
Overview ¶
Configuration and methods for the basics of idok.
There are methods to check if user pressed CTRL+C, if Kodi/XBMC is playing, and so on
Index ¶
- Constants
- func CheckLocalConfigFiles() (string, bool)
- func GetLocalInterfaceIP() (string, error)
- func IsOtherScheme(query string) (isscheme bool, islocal bool)
- func IsYoutubeURL(query string) (bool, string)
- func LoadLocalConfig(filename string, config *Config)
- func OnQuit()
- func PlayYoutube(vidid string) <-chan int
- func PrintExampleConfig()
- func Send(scheme, host, file string, port int) <-chan int
- func SendBasicStream(uri string, local bool) <-chan int
- func SetTarget(conf *Config)
- func Usage()
- type Config
- type Release
Constants ¶
View Source
const ( // message to send to stop media STOPBODY = `{"id":1,"jsonrpc":"2.0","method":"Player.Stop","params":{"playerid": %d}}` // get player id GETPLAYERBODY = `{"id":1, "jsonrpc":"2.0","method":"Player.GetActivePlayers"}` // the message to lauch local media BODY = `{ "id":1,"jsonrpc":"2.0", "method":"Player.Open", "params": { "item": { "file": "%s" } } }` YOUTUBEAPI = `` /* 155-byte string literal not displayed */ )
View Source
const REPO = "https://api.github.com/repos/metal3d/idok/releases"
View Source
const TICK_CHECK = 1
Variables ¶
This section is empty.
Functions ¶
func GetLocalInterfaceIP ¶
return local ip that matches kodi network ignoring loopback and other net interfaces
func IsOtherScheme ¶
check other stream return values are "is other scheme" and "is local"
func IsYoutubeURL ¶
check if argument is a youtube url
func LoadLocalConfig ¶
func PrintExampleConfig ¶
func PrintExampleConfig()
Types ¶
type Config ¶
type Config struct { // target ip or hostname Target string // target jsonrpc port Targetport int // Kodi Username User string // Kodi password Password string // host url to jsonrpc JsonRPC string // Local port if computer should serve Localport int // SSH port Sshport int // SSH user Sshuser string // SSHPassord Sshpassword string // Use SSH to stream Ssh bool // Check for new release ReleaseCheck bool }
var GlobalConfig *Config
Click to show internal directories.
Click to hide internal directories.