GithubHelp home page GithubHelp logo

psanford / kodi-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nawar/kodi-cli

0.0 2.0 0.0 92 KB

Kodi/XBMC bash script to send Kodi commands from the command line

License: GNU General Public License v2.0

Shell 100.00%

kodi-cli's Introduction

kodi-cli

Kodi/XBMC bash script to send Kodi commands using JSON RPC. It also allows sending YouTube videos to Kodi.

Usage

A sample usage would be

kodi-cli -[p|i|s|(y|q) youtube URL/ID|t "text to send"|o "youtube title"]

Please check the Arguments section on how to use the rest of the available options.

Setup

You must either put your Kodi setup (found under "Interfaces") in the first few lines of the script itself, or put a file named .kodirc in your $HOME directory. This file (example provided) contains only four lines in this specific order:

The Kodi Host
The port Kodi listens on (the webserver port)
Username
Password

If you don't want to add your kodi passwword, you might leave the password line empty and instead specify a command invocation in the next line that returns your password on stdout.

The Kodi Host
The port Kodi listens on (the webserver port)
Username

Commannd invocation that returns the password on stdout (e.g. pass mykodibox/kodi)

Arguments

 -p Play/Pause the current played video
 -s Stop the current played video
 -j Skip forward in the current played video     
 -k Skip backward in the current played video     
 -y Play YouTube video. Use either URL/ID (of video)
 -q Queue YouTube video to the current list. Use either URL/ID (of video). Use instead of -y.
 -o Play YouTube video directly on Kodi. Use the name of video.
 -v Interactive volume control
 -i Interactive navigation mode. Accept keyboard keys of Up, Down, Left, Right, Back,
    Context menu and information
 -l Play current playlist (most useful after using -q a few times)
 -t 'text to send'
 -u Increment the volume on Kodi
 -d Decrement the volume on Kodi
 -f Toggle fullscreen
 -m Update libraries
 -n Clean libraries
 -h Showing this help message

Dependencies

Optional dependencies

  • mps-youtube on the machine running Kodi for the -o option to work.

Advanced usage

With the addition of a few other tools, most notably

You can create a dialog to download and sequentially (and with confirmation) play entire playlists - defaulting to your Watch Later playlist - on your Kodi, acting like a kind of remote "casting" program. See the script playlist_to_kodi for an example.

kodi-cli's People

Contributors

djraw avatar elpraga avatar infothrill avatar jordanhillis avatar nawar avatar uriel1998 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.