From f5e86849856f7085a07d8c5fd3d68136561fb74e Mon Sep 17 00:00:00 2001 From: Siina Mashek Date: Thu, 23 May 2024 03:00:38 +0300 Subject: [PATCH] Set up feishin script to install feishin and jellyfin-rpc if not detected --- apsalar/feishin | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/apsalar/feishin b/apsalar/feishin index 69cb7d7..4da512c 100755 --- a/apsalar/feishin +++ b/apsalar/feishin @@ -1,11 +1,54 @@ #!/bin/sh # Wrapper for Feishin to auto start/stop jellyfin-rpc +j_ver="1.1.0" +f_ver="0.7.1" + if [ ! -f "$HOME/.local/bin/jellyfin-rpc" ]; then - echo "Please ensure jellyfin-rpc is installed to ~/.local/bin/ and executable" + echo "jellyfin-rpc not found, downloading..." + curl -L https://github.com/radiicall/jellyfin-rpc/releases/download/$j_ver/jellyfin-rpc-x86_64-linux \ + -o $HOME/.local/bin/jellyfin-rpc + chmod +x $HOME/.local/bin/jellyfin-rpc + echo "jellyfin-rpc downloaded" +fi + +if [ ! -f "$HOME/.config/jellyfin-rpc/main.json" ]; then + cat > $HOME/.config/jellyfin-rpc/main.json <