Skip to content

Commit

Permalink
Merge pull request #11 from Smiley-McSmiles/dev
Browse files Browse the repository at this point in the history
Jellyfin v1.5.5
  • Loading branch information
Smiley-McSmiles authored Aug 23, 2022
2 parents 3b3391f + 3b96308 commit a1c69f8
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 37 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
![jellyman](.github/banner-shadow.png?raw=true "Jellyman Logo")
======

> v1.5.4 - A Jellyfin Manager for the Jellyfin generic linux amd64, arm64, and armhf tar.gz packages
> v1.5.5 - A Jellyfin Manager for the Jellyfin generic linux amd64, arm64, and armhf tar.gz packages
> Tested on Fedora 34/35/36, Ubuntu 22.04, Manjaro 21.3.6, Linux Mint 21, and Rocky Linux 9.0
> Tested on Fedora 34/35/36, Ubuntu 22.04, Manjaro 21.3.6, EndeavourOS Artemis Neo, Linux Mint 21, and Rocky Linux 9.0
> Should work on Any Debian, Arch, or RHEL Based Distribution
Expand Down
2 changes: 1 addition & 1 deletion conf/jellyfin.service
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Unit]
Description=Jellyfin Server is a personal media server.
Description=Jellyfin Media Server - Installed by Jellyman
After=network.target

[Service]
Expand Down
2 changes: 1 addition & 1 deletion jellyman.1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.B Jellyman - a Jellyfin Manager for the Jellyfin generic linux amd64.tar.gz package

.SH VERSION
.B Jellyman - The Jellyfin Manager - v1.5.4
.B Jellyman - The Jellyfin Manager - v1.5.5

.SH SYNOPSIS
.B jellyman
Expand Down
73 changes: 49 additions & 24 deletions scripts/jellyman
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

jellymanVersion="1.5.5"

###############################################################################
# FUNCTIONS #
###############################################################################
Expand Down Expand Up @@ -58,9 +60,14 @@ Check_disk_free()
{
source /opt/jellyfin/config/jellyman.conf
if [[ $defaultPath != /* ]]; then
echo "No default directory found..."
echo "Please enter the root directory for your Media Library..."
echo "DO NOT ENTER YOUR USER DIRECTORY AS IT WILL RESET PERMISSIONS OF THE ENTERED DIRECTORY TO YOUR JELLYFIN USER"
echo "|-----------------------------------------------|"
echo "| No default directory found... |"
echo "| Please enter the root directory for |"
echo "| your Media Library |"
echo "| DO NOT ENTER YOUR USER DIRECTORY AS IT |"
echo "| WILL RESET PERMISSIONS OF THE ENTERED |"
echo "| DIRECTORY TO YOUR JELLYFIN USER |"
echo "|-----------------------------------------------|"
read defaultPath
sed -i -e "s|defaultPath=.*|defaultPath=$defaultPath|g" /opt/jellyfin/config/jellyman.conf
df -h $defaultPath
Expand All @@ -74,6 +81,7 @@ Get_version()
Has_sudo
source /opt/jellyfin/config/jellyman.conf
echo "$currentVersion"
echo "Jellyman v$jellymanVersion"
}

Download_version()
Expand Down Expand Up @@ -147,7 +155,7 @@ Remove_version()
Help()
{
# Display Help
echo "Jellyman - The Jellyfin Manager v1.5.4"
echo "Jellyman - The Jellyfin Manager v$jellymanVersion"
echo "-Created by Smiley McSmiles"
echo
echo "Syntax: jellyman -[COMMAND] [PARAMETER]"
Expand Down Expand Up @@ -180,7 +188,7 @@ Help()
echo
echo "To browse Jellyfin versions please use this link."
echo "***WARNING*** ONLY USE COMBINED(Web & Server) PACKAGES"
echo https://repo.jellyfin.org/releases/server/linux/versions/
echo "https://repo.jellyfin.org/releases/server/linux/versions/"
}

Import()
Expand Down Expand Up @@ -300,7 +308,8 @@ Http_port_change()
elif [ -x "$(command -v firewall-cmd)" ]; then
firewall-cmd --permanent --zone=public --add-port=$port/tcp
firewall-cmd --reload
else echo "FAILED TO OPEN PORT $port! ERROR NO 'ufw' OR 'firewall-cmd' COMMAND FOUND!";
else
echo "FAILED TO OPEN PORT $port! ERROR NO 'ufw' OR 'firewall-cmd' COMMAND FOUND!";
fi
else
exit
Expand All @@ -324,7 +333,8 @@ Https_port_change()
elif [ -x "$(command -v firewall-cmd)" ]; then
firewall-cmd --permanent --zone=public --add-port=$port/tcp
firewall-cmd --reload
else echo "FAILED TO OPEN PORT $port! ERROR NO 'ufw' OR 'firewall-cmd' COMMAND FOUND!";
else
echo "FAILED TO OPEN PORT $port! ERROR NO 'ufw' OR 'firewall-cmd' COMMAND FOUND!";
fi
else
exit
Expand Down Expand Up @@ -554,20 +564,27 @@ Rename_tv()
clear
nameOfTestFile=$(ls -1 $directoryToCorrect | head -1)

name2=$(echo $nameOfTestFile | cut -d "/" -f 2)
name3=$(echo $nameOfTestFile | cut -d "/" -f 3)
name4=$(echo $nameOfTestFile | cut -d "/" -f 4)
name5=$(echo $nameOfTestFile | cut -d "/" -f 5)
name6=$(echo $nameOfTestFile | cut -d "/" -f 6)
echo "2:$name2"
echo "3:$name3"
echo "4:$name4"
echo "5:$name5"
echo "6:$name6"
echo
echo
testDirCount=$(echo $directoryToCorrect | grep -o "/" | wc -w)
echo $testDirCount

if [[ $directoryToCorrect != *"/" ]]; then
testDirCount=$(($testDirCount + 1))
fi

iteration=2
number=1

while [ $number -lt $testDirCount ]; do
testName=$(echo $directoryToCorrect | cut -d "/" -f $iteration)
echo "$number : $testName"
iteration=$(($iteration + 1))

number=$(($number + 1))
done

echo "Please enter the number that corresponds with the show's name above"
read directoryNumber
directoryNumber=$(($directoryNumber + 1))
nameOfShow=$(dirname "$directoryToCorrect" | cut -d "/" -f $directoryNumber)
echo "You chose $nameOfShow"

Expand Down Expand Up @@ -643,11 +660,19 @@ Uninstall()
Update-jellyman()
{
Has_sudo
echo "Updating Jellyman - The Jellyfin Manager"
git clone https:/Smiley-McSmiles/jellyman
cd jellyman
chmod ug+x setup.sh
sudo ./setup.sh -U
wget -O /opt/jellyfin/config/jellyman_version https://raw.githubusercontent.com/Smiley-McSmiles/jellyman/main/jellyman.1
currentJellymanVersion=$(cat /opt/jellyfin/config/jellyman_version | grep " - v" | cut -d "v" -f2)
rm -f /opt/jellyfin/config/jellyman_version
if [[ $currentJellymanVersion == $jellymanVersion ]]; then
echo "Jellyman is up to date. No new versions available."
exit
else
echo "Updating Jellyman - The Jellyfin Manager from $jellymanVersion to v$currentJellymanVersion"
git clone https:/Smiley-McSmiles/jellyman
cd jellyman
chmod ug+x setup.sh
sudo ./setup.sh -U
fi
}

Change_Media_Directory()
Expand Down
33 changes: 24 additions & 9 deletions setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ Install_dependancies()
linuxmint) apt install $packagesNeededDebian -y ;;
elementary) apt install $packagesNeededDebian -y ;;
arch) pacman -Syu $packagesNeededArch ;;
endeavouros) pacman -Syu $packagesNeededArch ;;
manjaro) pacman -Syu $packagesNeededArch ;;
opensuse*) zypper install $packagesNeededOpenSuse ;;
esac
Expand All @@ -159,12 +160,20 @@ Setup()
{
echo "Fetching newest stable Jellyfin version..."
Get_Architecture
wget https://repo.jellyfin.org/releases/server/linux/stable/combined/
jellyfin_archive=$(grep "$architecture.tar.gz" index.html | cut -d '"' -f 2 | sed -r "s|.sha256sum||g" | head -1)
rm index.html
wget https://repo.jellyfin.org/releases/server/linux/stable/combined/$jellyfin_archive
jellyfin=$(echo $jellyfin_archive | sed -r "s|_$architecture.tar.gz||g")

jellyfin=
jellyfin_archive=

if [ ! -f *"tar.gz" ]; then
wget https://repo.jellyfin.org/releases/server/linux/stable/combined/
jellyfin_archive=$(grep "$architecture.tar.gz" index.html | cut -d '"' -f 2 | sed -r "s|.sha256sum||g" | head -1)
rm index.html
wget https://repo.jellyfin.org/releases/server/linux/stable/combined/$jellyfin_archive
jellyfin=$(echo $jellyfin_archive | sed -r "s|_$architecture.tar.gz||g")
else
jellyfin_archive=$(ls *.tar.gz)
jellyfin=$(echo $jellyfin_archive | sed -r "s|_$architecture.tar.gz||g")
fi

mkdir /opt/jellyfin
clear

Expand All @@ -188,7 +197,7 @@ Setup()
cp scripts/jellyman /bin/
cp scripts/jellyfin.sh /opt/jellyfin/
touch /opt/jellyfin/config/jellyman.conf
mv $jellyfin_archive /opt/jellyfin/
cp $jellyfin_archive /opt/jellyfin/
jellyfinServiceLocation=

if [ -d /usr/lib/systemd/system ]; then
Expand Down Expand Up @@ -239,8 +248,6 @@ Setup()
echo "|-------------------------------------------------------------------|"
fi

echo "Removing git cloned directory:$DIRECTORY..."
rm -rf $DIRECTORY
echo
echo
echo "DONE"
Expand Down Expand Up @@ -274,6 +281,14 @@ Setup()
echo
read -p " Press ENTER to continue" ENTER
jellyman -t
echo
read -p "Would you like to remove the git cloned directory $DIRECTORY? [Y/n] :" deleteOrNot
if [[ $deleteOrNot == [nN]* ]]; then
echo "Okay, keeping $DIRECTORY"
else
echo "Removing git cloned directory:$DIRECTORY..."
rm -rf $DIRECTORY
fi
}

Pre_setup()
Expand Down

0 comments on commit a1c69f8

Please sign in to comment.