Skip to content

Instantly share code, notes, and snippets.

@bonelifer
Forked from Gregwar/send_to_kodi.py
Created October 2, 2025 19:41
Show Gist options
  • Select an option

  • Save bonelifer/0bdad8136c900cdba672c172e7268ed5 to your computer and use it in GitHub Desktop.

Select an option

Save bonelifer/0bdad8136c900cdba672c172e7268ed5 to your computer and use it in GitHub Desktop.
Play URL to Kodi
# Can be use to send an url (e.g: http://.../movie.mp4) to your Kodi media center
# You have to enable HTTP control (without password)
# This can be used on an Android Phone with pyDroid (don't forget to pip install requests)
import requests
# Kodi IP address
kodi = "192.168.1.34"
url = input("Enter URL: ")
# Sending the request
payload = {"jsonrpc": "2.0", "id": 1, "method": "Player.Open", "params": {"item": {"file": url}}}
requests.post(f"http://{kodi}/jsonrpc", json=payload)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment