diff --git a/shell_jellyfin_actors_images_fix.sh b/shell_jellyfin_actors_images_fix.sh index e6b315a..ad1e5e8 100644 --- a/shell_jellyfin_actors_images_fix.sh +++ b/shell_jellyfin_actors_images_fix.sh @@ -1,14 +1,14 @@ #!/bin/bash -# API endpoint and your API key -# api_url="http://172.16.16.11:8096/emby" (dont forget the "/emby".. even though you use Jellyfin) -# api_key="xaxajsklujkjaskjaklsjokajss" -# user_id="kjkhkjahdjhsakjdhsakjdhkasd" - -api_url="http://server-ip:8096/emby" +api_url="http://server-ip:8096" api_key="" user_id="" +# Ensure '/emby' is appended to the URL if not already present +if [[ ! "$api_url" =~ /emby$ ]]; then + api_url="$api_url/emby" +fi + server_ip=$(echo "$api_url" | sed -E 's#^https?://([^:/]+).*$#\1#') # --- ANSI escape codes for colors ---