Coder Social home page Coder Social logo

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

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

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

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.

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.