From d00bf2cb2d5087164fa509a4f20a2be62a519044 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Tue, 21 Apr 2026 01:23:18 +0100 Subject: refactor: restructure to chezmoi source state Rename home/ contents to chezmoi naming conventions: - dot_ prefix for dotfiles and dot-dirs - private_dot_ for .gnupg and .ssh directories - private_ for 0600 files (nym.pub) - executable_ for scripts in .local/bin and display-toggle.sh - symlink_ for mimeapps.list symlink --- dot_local/bin/executable_tokodi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 dot_local/bin/executable_tokodi (limited to 'dot_local/bin/executable_tokodi') diff --git a/dot_local/bin/executable_tokodi b/dot_local/bin/executable_tokodi new file mode 100755 index 0000000..ce945de --- /dev/null +++ b/dot_local/bin/executable_tokodi @@ -0,0 +1,22 @@ +#!/usr/bin/env sh + +if [ -z "$1" ]; then + url=$(wl-paste) +elif [ "$1" = "-" ]; then + read -r url +else + url="$1" +fi + +case "$url" in +*.m3u8*) + prefix='' + ;; +*) + prefix='plugin://plugin.video.sendtokodi/?' + ;; +esac + +payload="$(printf '{"jsonrpc":"2.0", "id": 1, "method":"Player.Open","params": {"item": {"file":"%s%s"}}}' "$prefix" "$url")" + +curl -u kodi:kodi 'http://ruiflix.pulpo:8080/jsonrpc' -X POST --data-raw "$payload" -H 'Content-Type: application/json' -- cgit v1.2.3-70-g09d2