Skip to content

Commit 74344e7

Browse files
authored
Add jellyfin
1 parent 1dce7f8 commit 74344e7

File tree

2 files changed

+93
-3
lines changed

2 files changed

+93
-3
lines changed

programs/x86_64-apps

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@
264264
◆ chat-gpt : ChatGPT Desktop Application (Mac, Windows and Linux).
265265
◆ chatgpt-next-web : A cross-platform ChatGPT/Gemini UI.
266266
◆ chatpad-ai : Not just another ChatGPT user-interface.
267-
◆ chatterino2 : Second installment of the Twitch chat client.
268267
◆ chatterino2-nightly : Second installment of the Twitch chat client.
268+
◆ chatterino2 : Second installment of the Twitch chat client.
269269
◆ cheat : Create and view interactive cheatsheets on the command-line.
270270
◆ chemcanvas : A very intuitive 2D chemical drawing tool.
271271
◆ cherrytree : A hierarchical note taking application.
@@ -474,8 +474,8 @@
474474
◆ electron-app-store : Simple App Store for Apps Built with Electron.
475475
◆ electron-cash : Lightweight Bitcoin Cash Client.
476476
◆ electron-mail : Unofficial ProtonMail Desktop App.
477-
◆ electronreact : Desktop application using Electron and React.
478477
◆ electron-react-boilerplate : A Foundation for Scalable Cross-Platform Apps.
478+
◆ electronreact : Desktop application using Electron and React.
479479
◆ electron-ssr : Install electron-ssr from appimage.
480480
◆ electron-utils : Electron Utils for every day usage as a dev.
481481
◆ electron-wechat : Wechat desktop application.
@@ -845,6 +845,7 @@
845845
◆ jdreplace : With jdReplace you can replace a text in all files of a directory.
846846
◆ jdtextedit : jdTextEdit is a powerful texteditor with a lot of features.
847847
◆ jellyamp : A client for listening to music from a Jellyfin server.
848+
◆ jellyfin : Media player. Stream to any device from your own server.
848849
◆ jetbrains-toolbox : Essential tools for software developers and teams.
849850
◆ jexiftoolgui : Java/Swing graphical frontend for ExifTool.
850851
◆ jfcord : An Jellyfin rich presence client for Discord.
@@ -1927,8 +1928,8 @@
19271928
◆ vhc-viewer-wayland : Vulkan Hardware Capability Viewer.
19281929
◆ vhc-viewer-x11 : Vulkan Hardware Capability Viewer.
19291930
◆ vhs : Your CLI home video recorder.
1930-
◆ via : Your keyboard's best friend.
19311931
◆ vial : GUI and a QMK fork for configuring your keyboard in real time.
1932+
◆ via : Your keyboard's best friend.
19321933
◆ viber : Proprietary cross-platform IM and VoIP software.
19331934
◆ vidcutter : Simple and fast video cutter and joiner.
19341935
◆ video-hub : A fastest way to browse and search for videos on your computer.

programs/x86_64/jellyfin

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#!/bin/sh
2+
3+
# AM INSTALL SCRIPT VERSION 3.5
4+
set -u
5+
APP=jellyfin
6+
SITE="https://jellyfin.org"
7+
8+
# CREATE DIRECTORIES AND ADD REMOVER
9+
[ -n "$APP" ] && mkdir -p "/opt/$APP/tmp" "/opt/$APP/icons" && cd "/opt/$APP/tmp" || exit 1
10+
printf "#!/bin/sh\nset -e\nrm -f /usr/local/bin/$APP\nrm -R -f /opt/$APP" > ../remove
11+
printf '\n%s' "rm -f /usr/local/share/applications/$APP-AM.desktop" >> ../remove
12+
chmod a+x ../remove || exit 1
13+
14+
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
15+
version=$(echo "https://repo.jellyfin.org/files/server/linux/latest-stable/amd64/$(curl -Ls https://repo.jellyfin.org/files/server/linux/latest-stable/amd64/ | tr '"' '\n' | grep -i "tar.gz$" | head -1)")
16+
wget "$version" || exit 1
17+
[ -e ./*7z ] && 7z x ./*7z && rm -f ./*7z
18+
[ -e ./*tar.* ] && tar fx ./*tar.* && rm -f ./*tar.*
19+
[ -e ./*zip ] && unzip -qq ./*zip 1>/dev/null && rm -f ./*zip
20+
cd ..
21+
if [ -d ./tmp/* 2>/dev/null ]; then mv ./tmp/*/* ./; else mv ./tmp/* ./"$APP" 2>/dev/null || mv ./tmp/* ./; fi
22+
rm -R -f ./tmp || exit 1
23+
echo "$version" > ./version
24+
chmod a+x ./$APP || exit 1
25+
26+
# LINK TO PATH
27+
ln -s "/opt/$APP/$APP" "/usr/local/bin/$APP"
28+
29+
# SCRIPT TO UPDATE THE PROGRAM
30+
cat >> ./AM-updater << 'EOF'
31+
#!/bin/sh
32+
set -u
33+
APP=jellyfin
34+
SITE="https://jellyfin.org"
35+
version0=$(cat "/opt/$APP/version")
36+
version=$(echo "https://repo.jellyfin.org/files/server/linux/latest-stable/amd64/$(curl -Ls https://repo.jellyfin.org/files/server/linux/latest-stable/amd64/ | tr '"' '\n' | grep -i "tar.gz$" | head -1)")
37+
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
38+
if [ "$version" != "$version0" ]; then
39+
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
40+
notify-send "A new version of $APP is available, please wait"
41+
wget "$version" || exit 1
42+
[ -e ./*7z ] && 7z x ./*7z && rm -f ./*7z
43+
[ -e ./*tar.* ] && tar fx ./*tar.* && rm -f ./*tar.*
44+
[ -e ./*zip ] && unzip -qq ./*zip 1>/dev/null && rm -f ./*zip
45+
cd ..
46+
if [ -d ./tmp/* 2>/dev/null ]; then mv --backup=t ./tmp/*/* ./; else mv --backup=t ./tmp/* ./"$APP" 2>/dev/null || mv --backup=t ./tmp/* ./; fi
47+
chmod a+x ./"$APP" || exit 1
48+
echo "$version" > ./version
49+
rm -R -f ./tmp ./*~
50+
notify-send "$APP is updated!"
51+
else
52+
echo "Update not needed!"
53+
fi
54+
EOF
55+
chmod a+x ./AM-updater || exit 1
56+
57+
# ICON
58+
mkdir -p icons
59+
wget https://raw.githubusercontent.com/jellyfin/jellyfin-media-player/master/resources/images/icon.png -O ./icons/"$APP" 2> /dev/null
60+
61+
# LAUNCHER
62+
echo "[Desktop Entry]
63+
Version=1.0
64+
Name=Jellyfin Media Player
65+
Comment=Desktop client for Jellyfin
66+
Exec=$APP
67+
Icon=/opt/$APP/icons/$APP
68+
Terminal=false
69+
Type=Application
70+
StartupWMClass=com.github.iwalton3.jellyfin-media-player
71+
Categories=AudioVideo;Video;Player;TV;
72+
73+
Actions=DesktopF;DesktopW;TVF;TVW
74+
75+
[Desktop Action DesktopF]
76+
Name=Desktop [Fullscreen]
77+
Exec=$APP --fullscreen --desktop
78+
79+
[Desktop Action DesktopW]
80+
Name=Desktop [Windowed]
81+
Exec=$APP --windowed --desktop
82+
83+
[Desktop Action TVF]
84+
Name=TV [Fullscreen]
85+
Exec=$APP --fullscreen --tv
86+
87+
[Desktop Action TVW]
88+
Name=TV [Windowed]
89+
Exec=$APP --windowed --tv" > /usr/local/share/applications/"$APP"-AM.desktop

0 commit comments

Comments
 (0)