nawar / kodi-cli Goto Github PK
View Code? Open in Web Editor NEWKodi/XBMC bash script to send Kodi commands from the command line
License: GNU General Public License v2.0
Kodi/XBMC bash script to send Kodi commands from the command line
License: GNU General Public License v2.0
I'm running kodi off my Raspberry pi and it's local IP is 192.168.0.15, so I set it as such, but this doesn't work.
play/pause seems to work only for videos, not for music.
Hi!
Thank you for kodi-cli, it really makes my life simpler. ๐
One feature I'd like to see is a command that prints, in my terminal, information about the item being currently played. Something like:
If playing music:
$ kodi-cli --info
Artist - Song
If playing video:
$ kodi-cli --info
Video_name
Do you see where I am getting at?
It could be a nice feature, and I did try reading about it, but I did not managed to get it working.
I did all the changes as I did when adding the volume control, and I used the following function:
function play_next {
# Get Active players first
output=`xbmc_req '{"jsonrpc": "2.0", "method": "Player.GetActivePlayers", "id": 99}' true`
player_id=`echo $output | parse_json "playerid"`
echo "Skipping to next item in playlist in the player with ID => $player_id"
xbmc_req '{"jsonrpc": "2.0", "method": "Player.GoNext", "params": { "playerid": '$player_id' }, "id": 1}'
}
When I extracted and exectured the command on a command line, and I got "Method not found" error. The syntax should have been ok, because Player.Stop worked fine from command line.
Have you got any idea why it did not work?
It would be great if I could use this to tell Kodi to fetch a video URL and play it.
Without KODI_* variables or a .kodirc,
/usr/bin/kodi-cli: line 40: show_help: command not found
is shown instead of the help text. Given that the help text itself doesn't address configuration, would it be better to have a separate error message, or expand and move show_help()
to make bash happy?
Thank you for a great script!
It helped me so much!
I did some searching and I was able to add volume control to your script, and it works like a charm mapped on a key press in fluxbox.
Would you be interested in adding it to your script?
could u add a queue option to add multiple youtube videos without stopping the current playing one.
something like
kodi-cli -q "https://www.youtube.com/watch?11111111"
kodi-cli -q "https://www.youtube.com/watch?2222222"
kodi-cli -q "https://www.youtube.com/watch?3333333"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.