-
Notifications
You must be signed in to change notification settings - Fork 6
XBMC
This plug-in has commands for controlling XBMC/Kodi/OSMC. In order for this to
work, you must activate XBMC's JSON-RPC interface as described here.
Some features of this plug-in are not available without the library
plug-in.
You must set the xbmc.ip
config option in order to use this plug-in. Note that
playlists opened with the audios
and videos
commands use a timeout of 60
to allow for long playlist loading.
-
xbmc.ip
- the IP address and port of XBMC (default:'127.0.0.1:80'
) -
xbmc.username
- the username to login to XBMC (default:None
) -
xbmc.password
- the password to login to XBMC (default:None
) -
xbmc.timeout
- seconds to wait for XBMC requests (default:5
)
-
audio
: open a folder as a playlist - audios [include -exclude] [#track] [@match] -
audios
: search and open a folder as a playlist - audios [include -exclude] [track#] -
fullscreen
: toggle fullscreen -
hop
: move forward or back - hop [small|big] [back|forward] -
info
: display info about currently playing file -
jump
: jump to an item# in the playlist - jump # -
next
: go to next playlist item -
pause
: if xbmc is playing, pause -
play
: if xbmc is paused, resume playing -
prev
: go to previous playlist item -
random
: play random song - random [include -exclude] -
remote
: execute remote buttons in order - remote (lrudeb)[...] -
restart
: start playing again from 0:00 -
seek
: go to a specific time - seek [hh:]mm:ss -
shuffle
: enable/disable shuffling of the current player -
stop
: if xbmc is playing, stop -
stream
: stream from [YouTube, Twitch (Live)] - stream url -
subtitles
: change the subtitles - subtitles (info|on|off|next|prev|set) [index] -
tv
: pass command to cec-client - tv (on|standby|as) -
video
: search and play a single video - video [include -exclude] -
videos
: search and open a folder as a playlist - videos [include -exclude] [track#] -
volume
: set the player volume percentage - volume %
sibyl audio search1 [search2 search3 ...]
Search audio_dirs
and play the matching file. If there are multiple matches,
a list of paths is returned. In such a case, execute the command again with
additional search terms to select only a single file. Note that the search
terms are matched to the entire file path, not just the file name itself. A
file is considered a match if it contains all of the given search terms,
ignoring case. You can exclude a term instead of including a term by prefacing
it with -
as in -string
. Quote phrases with spaces in them are also
supported as in "two words"
which will match two words.mp3
but not
twowords.mp3
. Without quotes both would match.
sibyl audios [include -exclude] [#track] [@match]
As audio
but searches for a directory and plays its contents. If the last
parameter starts with #
then XBMC begins playing at the specified playlist
index (e.g. #12
). If the last parameter starts with @
then XBMC begins
playing at the matching file name (e.g. s01e12
). In this case, if multiple
files match the search, XBMC begins playing at the first file.
sibyl fullscreen
Toggles the fullscreen GUI.
sibyl hop [small|big] [back|forward]
Hop forward or backward based on XBMC's configured hop distances. The defaults
are small
and back
, so calling sibyl hop
is the same as sibyl hop small back
.
sibyl info
Responds with info about the currently playing file. Includes type, current time, and file name. Information may not be accurate for some streams.
sibyl jump [item#]
Jump to the specified item number in the playlist.
sibyl next
Play the next file in the playlist.
sibyl pause
Pause the currently playing file.
sibyl play [path]
If no parameters are given, it resumes playing from pause. If a path is
provided, XBMC attempts to play the file specified by path
.
sibyl prev
Play the previous file in the playlist.
Implementation note: this command actually does not use the "previous" command provided by XBMC as it exhibits unpredictable behavior on some systems. Instead, it finds the current playlist index and jumps to the one previous.
sibyl random [search1 search2 ...]
Play a random audio file. If search
is provided, the random file is chosen
using the same logic as in audio
.
sibyl remote [udlreb...]
Behaves like a remote, pressing the buttons in the order specified. Options:
-
u
- up -
d
- down -
l
- left -
r
- right -
e
- enter -
b
- back
For example, sibyl remote de
presses down then enter.
sibyl restart
Go back to the beginning of the current file (i.e. seek to 0:00).
sibyl seek [hh:m]m:ss
Seek to the given time in the current file.
`sibyl shuffle (check|on|off)
Control shuffling; note that there is a separate shuffle setting for the audio player and the video player. This command only works while something is playing.
-
check
- return whether shuffle is on or off -
on
- turn shuffle on for the current player -
off
- turn shuffle off for the current player
sibyl stop
Stop playing the current file.
sibyl stream URL
Open the given URL using a video Add-On. You must have the relevant XBMC addon installed. Supported streams:
- YouTube
- Twitch TV Live
You may want to install the updated YouTube plugin rather than the official one installed from within XBMC.
sibyl subtitles (info|on|off|next|prev|set) [index]
Controls the subtitle track being used in the currently playing video.
Subtitles are always displayed in the format track# - language - name
. This
command has the following options:
-
info
- reply with a list of all subtitles (current track inside()
) -
on
- turn on subtitles -
off
- turn off subtitles -
next
- change to the next subtitle track (by track#) -
prev
- change to the previous subtitle track (by track#) -
set
- change to the track specified byindex
sibyl video search1 [search2 search3 ...]
Same as audio
but uses video_dirs
to search.
sibyl videos search1 [search2 search3 ...] [item#]
Same as audios
but uses video_dirs
to search.
sibyl volume [percent]
If no arguments are passed, returns the current volume as a percent. If a
number is passed in [0,100]
it sets the volume to the specified percent
.
sibyl xbmc method [parameters]
This command is disabled by default. To enable it, set chat_ctrl
to True
.
This allows you to manually send JSON calls to Kodi. If passed, parameters must
be a dictionary i.e. {"item":{"file":"/audio/rickroll.mp3"}
would be valid for
the Player.Open
method. For more details visit the JSON-RPC API.