From b7c6c693031b28a92b3df2afad0a7aae68df49c1 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Mon, 23 Jan 2023 11:40:34 -0300 Subject: First iteration of jellyfin and plex --- install.sh | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'install.sh') diff --git a/install.sh b/install.sh index d50a684..687a60c 100755 --- a/install.sh +++ b/install.sh @@ -57,7 +57,7 @@ running_services_location() { echo "Sonarr: http://$host_ip:8989/" echo "Prowlarr: http://$host_ip:9696/" echo "Bazarr: http://$host_ip:6767/" - echo "Emby: http://$host_ip:8096/" + echo "$media_service: http://$host_ip:$media_service_port/" } # ============================================================================================ @@ -110,6 +110,31 @@ if [ $media_folder_correct == "n" ]; then send_error_message "Media folder is not correct. Please, fix it and run the script again" fi +# Setting the preferred media service +echo +echo +echo +echo "Time to choose your media service." +echo "Your media service is the one responsible for serving your files to your network." +echo "By default, YAMS support 3 media services:" +echo "- emby (Recommended)" +echo "- jellyfin" +echo "- plex" +read -p "Choose your media service [emby]: " media_service +media_service=${media_service:-"emby"} +media_service=$(echo "$media_service" | sed -e 's/\(.*\)/\L\1/') + +media_service_port=8096 +if [ "$media_service" == "plex" ]; then + media_service_port=32400 +fi + +if echo "emby plex jellyfin" | grep -qw "$media_service"; then + echo "YAMS is going to install \"$media_service\" on port \"$media_service_port\"" +else + send_error_message "\"$media_service\" is not supported by YAMS. Are you sure you chose the correct service?" +fi + # Adding the VPN echo echo @@ -180,6 +205,10 @@ sed -i -e "s//$pgid/g" $filename # Set media_folder sed -i -e "s;;$media_folder;g" $filename +# Set media_service +sed -i -e "s;;$media_service;g" $filename +sed -i -e "s;;$media_service_port;g" $filename + # Set config folder sed -i -e "s;;$install_location;g" $filename -- cgit v1.2.3