kodi-control


Namekodi-control JSON
Version 1.0 PyPI version JSON
download
home_page
Summaryinteractive tty-based remote control for Kodi
upload_time2023-04-09 05:18:38
maintainer
docs_urlNone
author
requires_python>=3.6
license
keywords kodi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Kodi Control — Interactive TTY-based remote control for Kodi
============================================================

.. image:: https://pepy.tech/badge/kodi-control/month
    :target: https://pepy.tech/project/kodi-control

.. ignore:

    ..  image:: https://github.com/KenKundert/kodi-control/actions/workflows/build.yaml/badge.svg
        :target: https://github.com/KenKundert/kodi-control/actions/workflows/build.yaml

    .. image:: https://coveralls.io/repos/github/KenKundert/kodi-control/badge.svg?branch=master
        :target: https://coveralls.io/github/KenKundert/kodi-control?branch=master

.. image:: https://img.shields.io/pypi/v/kodi-control.svg
    :target: https://pypi.python.org/pypi/kodi-control

.. image:: https://img.shields.io/pypi/pyversions/kodi-control.svg
    :target: https://pypi.python.org/pypi/kodi-control/

:Author: Ken Kundert
:Version: 1.0
:Released: 2023-04-08

*Kodi Control* can be used to control a running instance of *Kodi* from 
a terminal.  You can use it to interactively control the app and the players by 
opening a terminal and typing individual characters to perform various actions.

Getting Started
---------------

Install using::

    pip3 install --user kodi-control

Then, you need to create a file containing the settings.  In 
~/.config/kodi-control/settings.nt (a `NestedText <https://nestedtext.org>`_ 
file) that takes the following form::

    hostname: localhost
    port: 8080
    username: kodi
    password: password

All the values are optional with the defaults shown (except for password which 
is empty by default).

Before using *Kodi Control* you must first enable the JSONRPC over HTTP 
interface.  To do so, open *Kodi* and navigate to *Settings* → *Services* 
→ *Control* and enable "Allow remote control via HTTP".  While there you can add 
a username and password if desired.  Do not enable SSL.

You can run *Kodi Control* on a host different from the one that runs *Kodi*, 
you just need to give the hostname for the machine that is running *Kodi*, and 
of course that machine must be accessible over the network from the machine 
running *Kodi Control*.  In this case, some functionality, such as volume 
control and starting and killing *Kodi*, is not available.  Alternately, *Kodi* 
can be run locally (best with two screens) or you can open an SSH terminal and 
run *Kodi Control* on the *Kodi* host.  In this case all functionality is 
available.  To control a remote *Kodi* while using an SSH terminal, you must 
specify the name of your display in your ``settings.nt`` file.  The typical 
value is ``:0`` or ``:0``, but you can examine your DISPLAY environment variable 
and specify whatever it contains::

    display: :0

However you choose to do it, you would start *Kodi Control* in a terminal::

    > kodi-control
    Enter desired actions, use 'q' to terminate.

    Navigation Keys:
        BS: go back                h: move left
        ENT: select                j: move down
        ESC: go to to home screen  k: move up
        H: go to to home screen    l: move right
        c: context menu

    Player Keys:
         : toggle play/pause     7: go to 70%             i: show info
        0: go to 0%              8: go to 80%             n: toggle navigation
        1: go to 10%             9: go to 90%             p: toggle play/pause
        2: go to 20%             P: toggle player on top  s: go to start
        3: go to 30%             T: show subtitles        t: hide subtitles
        4: go to 40%             b: skip backward         x: stop player
        5: go to 50%             e: go to end
        6: go to 60%             f: skip forward

    Sound Keys:
        M: temporary mute  m: toggle mute
        d: volume down     u: volume up

    Kodi Keys:
        ': enter text  K: kill kodi   S: start kodi

As it starts, it immediately prints a list of available actions.  Then you 
simply type individual characters to run the desired action.

The temporary mute action (``M``) engages mute for settable number of seconds.  
This can be used to turn off the sound during commercials.  Once engaged you 
will see a count down with the sound being re-enabled when the count reaches 0.  
During the interim all input is ignore except ``ctrl-C`` which immediately 
terminates the count-down and immediately re-activates the sound.  You can 
specify the duration of the temporary mute with the following setting::

    temporary mute duration: 30

You can specify the path to the *Kodi* executable in your settings file::

    kodi: kodi-standalone

``kodi`` holds the command used to start *Kodi*.  It can be just the command 
name, in which case it must be on your path, or it can be the full path to the 
command.  By default it is simply *kodi*.

Older versions of *Kodi* have a bug that interferes with proper operation of 
forward seeks of less than 60 seconds.  *Kodi Control* works around this issue 
if you specify the version number of *Kodi* in the settings file::

    kodi version: 18.7

Currently, the workaround is disabled if the version is 19 or later.

If you have any trouble, you can enable the log file and examine it for clues.  
To enable the log file, add the following to your settings file::

    log: yes

The log file can then be found at ``~/.local/share/kodi-control/log``.

Feel free to post questions or bug report to `GitHub Issues 
<https://github.com/KenKundert/kodi-control/issues>`_.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "kodi-control",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "kodi",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/37/3f/490eeefed38605c061eb3a0e5f233f7c840cc593e7622da260fbb193bbf7/kodi-control-1.0.tar.gz",
    "platform": null,
    "description": "Kodi Control \u2014 Interactive TTY-based remote control for Kodi\n============================================================\n\n.. image:: https://pepy.tech/badge/kodi-control/month\n    :target: https://pepy.tech/project/kodi-control\n\n.. ignore:\n\n    ..  image:: https://github.com/KenKundert/kodi-control/actions/workflows/build.yaml/badge.svg\n        :target: https://github.com/KenKundert/kodi-control/actions/workflows/build.yaml\n\n    .. image:: https://coveralls.io/repos/github/KenKundert/kodi-control/badge.svg?branch=master\n        :target: https://coveralls.io/github/KenKundert/kodi-control?branch=master\n\n.. image:: https://img.shields.io/pypi/v/kodi-control.svg\n    :target: https://pypi.python.org/pypi/kodi-control\n\n.. image:: https://img.shields.io/pypi/pyversions/kodi-control.svg\n    :target: https://pypi.python.org/pypi/kodi-control/\n\n:Author: Ken Kundert\n:Version: 1.0\n:Released: 2023-04-08\n\n*Kodi Control* can be used to control a running instance of *Kodi* from \na terminal.  You can use it to interactively control the app and the players by \nopening a terminal and typing individual characters to perform various actions.\n\nGetting Started\n---------------\n\nInstall using::\n\n    pip3 install --user kodi-control\n\nThen, you need to create a file containing the settings.  In \n~/.config/kodi-control/settings.nt (a `NestedText <https://nestedtext.org>`_ \nfile) that takes the following form::\n\n    hostname: localhost\n    port: 8080\n    username: kodi\n    password: password\n\nAll the values are optional with the defaults shown (except for password which \nis empty by default).\n\nBefore using *Kodi Control* you must first enable the JSONRPC over HTTP \ninterface.  To do so, open *Kodi* and navigate to *Settings* \u2192 *Services* \n\u2192 *Control* and enable \"Allow remote control via HTTP\".  While there you can add \na username and password if desired.  Do not enable SSL.\n\nYou can run *Kodi Control* on a host different from the one that runs *Kodi*, \nyou just need to give the hostname for the machine that is running *Kodi*, and \nof course that machine must be accessible over the network from the machine \nrunning *Kodi Control*.  In this case, some functionality, such as volume \ncontrol and starting and killing *Kodi*, is not available.  Alternately, *Kodi* \ncan be run locally (best with two screens) or you can open an SSH terminal and \nrun *Kodi Control* on the *Kodi* host.  In this case all functionality is \navailable.  To control a remote *Kodi* while using an SSH terminal, you must \nspecify the name of your display in your ``settings.nt`` file.  The typical \nvalue is ``:0`` or ``:0``, but you can examine your DISPLAY environment variable \nand specify whatever it contains::\n\n    display: :0\n\nHowever you choose to do it, you would start *Kodi Control* in a terminal::\n\n    > kodi-control\n    Enter desired actions, use 'q' to terminate.\n\n    Navigation Keys:\n        BS: go back                h: move left\n        ENT: select                j: move down\n        ESC: go to to home screen  k: move up\n        H: go to to home screen    l: move right\n        c: context menu\n\n    Player Keys:\n         : toggle play/pause     7: go to 70%             i: show info\n        0: go to 0%              8: go to 80%             n: toggle navigation\n        1: go to 10%             9: go to 90%             p: toggle play/pause\n        2: go to 20%             P: toggle player on top  s: go to start\n        3: go to 30%             T: show subtitles        t: hide subtitles\n        4: go to 40%             b: skip backward         x: stop player\n        5: go to 50%             e: go to end\n        6: go to 60%             f: skip forward\n\n    Sound Keys:\n        M: temporary mute  m: toggle mute\n        d: volume down     u: volume up\n\n    Kodi Keys:\n        ': enter text  K: kill kodi   S: start kodi\n\nAs it starts, it immediately prints a list of available actions.  Then you \nsimply type individual characters to run the desired action.\n\nThe temporary mute action (``M``) engages mute for settable number of seconds.  \nThis can be used to turn off the sound during commercials.  Once engaged you \nwill see a count down with the sound being re-enabled when the count reaches 0.  \nDuring the interim all input is ignore except ``ctrl-C`` which immediately \nterminates the count-down and immediately re-activates the sound.  You can \nspecify the duration of the temporary mute with the following setting::\n\n    temporary mute duration: 30\n\nYou can specify the path to the *Kodi* executable in your settings file::\n\n    kodi: kodi-standalone\n\n``kodi`` holds the command used to start *Kodi*.  It can be just the command \nname, in which case it must be on your path, or it can be the full path to the \ncommand.  By default it is simply *kodi*.\n\nOlder versions of *Kodi* have a bug that interferes with proper operation of \nforward seeks of less than 60 seconds.  *Kodi Control* works around this issue \nif you specify the version number of *Kodi* in the settings file::\n\n    kodi version: 18.7\n\nCurrently, the workaround is disabled if the version is 19 or later.\n\nIf you have any trouble, you can enable the log file and examine it for clues.  \nTo enable the log file, add the following to your settings file::\n\n    log: yes\n\nThe log file can then be found at ``~/.local/share/kodi-control/log``.\n\nFeel free to post questions or bug report to `GitHub Issues \n<https://github.com/KenKundert/kodi-control/issues>`_.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "interactive tty-based remote control for Kodi",
    "version": "1.0",
    "split_keywords": [
        "kodi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d2828d5830a2da08d441d55b630a5fac780c96b00d9b28024d89b014dfeb3725",
                "md5": "adbc8deb02141c2ea7a01665be84ac71",
                "sha256": "fcd6705a3ca0fee6946c157ce728901ee0d77c798f3791dcb157f7a41d496477"
            },
            "downloads": -1,
            "filename": "kodi_control-1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "adbc8deb02141c2ea7a01665be84ac71",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 8475,
            "upload_time": "2023-04-09T05:18:35",
            "upload_time_iso_8601": "2023-04-09T05:18:35.955518Z",
            "url": "https://files.pythonhosted.org/packages/d2/82/8d5830a2da08d441d55b630a5fac780c96b00d9b28024d89b014dfeb3725/kodi_control-1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "373f490eeefed38605c061eb3a0e5f233f7c840cc593e7622da260fbb193bbf7",
                "md5": "4c90b73287bb7e433b40c97daeeb5ad9",
                "sha256": "313de016ac92e4490175ec08de004f6dd49b1c5cfa63f7e48ad8082f1452ac62"
            },
            "downloads": -1,
            "filename": "kodi-control-1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4c90b73287bb7e433b40c97daeeb5ad9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 8563,
            "upload_time": "2023-04-09T05:18:38",
            "upload_time_iso_8601": "2023-04-09T05:18:38.038226Z",
            "url": "https://files.pythonhosted.org/packages/37/3f/490eeefed38605c061eb3a0e5f233f7c840cc593e7622da260fbb193bbf7/kodi-control-1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-09 05:18:38",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "kodi-control"
}
        
Elapsed time: 0.49717s