mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-03-14 10:21:09 +00:00
Merge pull request #2356 from aarron-lee/cr_plex_media_apps
feat(yafti): add Crunchyroll and Plex media apps to yafti
This commit is contained in:
commit
90267a5e68
@ -644,6 +644,7 @@ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
|
||||
systemctl --global enable systemd-tmpfiles-setup.service && \
|
||||
systemctl --global disable sunshine.service && \
|
||||
systemctl disable waydroid-container.service && \
|
||||
systemctl disable force-wol.service && \
|
||||
curl -Lo /etc/dxvk-example.conf https://raw.githubusercontent.com/doitsujin/dxvk/master/dxvk.conf && \
|
||||
curl -Lo /usr/bin/waydroid-choose-gpu https://raw.githubusercontent.com/KyleGospo/waydroid-scripts/main/waydroid-choose-gpu.sh && \
|
||||
chmod +x /usr/bin/waydroid-choose-gpu && \
|
||||
|
@ -53,9 +53,11 @@ screens:
|
||||
- Amazon Prime Video: ujust get-webapp "Amazon Prime Video"
|
||||
- Apple TV: ujust get-webapp "Apple TV"
|
||||
- Curiosity Stream: ujust get-webapp "Curiosity Stream"
|
||||
- Crunchyroll: ujust get-webapp "Crunchyroll"
|
||||
- GeForce Now: ujust get-webapp "GeForce Now"
|
||||
- HBO Max: ujust get-webapp "HBO Max"
|
||||
- Hulu: ujust get-webapp "Hulu"
|
||||
- Plex HTPC: ujust get-webapp "Plex HTPC"
|
||||
- Paramount Plus: ujust get-webapp "Paramount Plus"
|
||||
- Peacock: ujust get-webapp "Peacock"
|
||||
- Sling TV: ujust get-webapp "Sling TV"
|
||||
|
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Force Enable Wake-on-LAN
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/libexec/force-wol
|
||||
|
||||
[Install]
|
||||
WantedBy=network-online.target
|
5
system_files/desktop/shared/usr/libexec/force-wol
Executable file
5
system_files/desktop/shared/usr/libexec/force-wol
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/bash
|
||||
INTERFACE=$(ip link show | awk '/state UP/ {print $2}' | tr -d ':' | grep -E '^(en|eth)')
|
||||
if [ -n "$INTERFACE" ]; then
|
||||
/sbin/ethtool -s $INTERFACE wol g
|
||||
fi
|
@ -107,9 +107,9 @@ toggle-wol:
|
||||
CURRENT_STATE="Enabled"
|
||||
fi
|
||||
echo "Wake-on-LAN is currently: ${bold}${CURRENT_STATE}${normal}"
|
||||
echo "Enable, Disable Wake-on-LAN, Create Service, or Exit without saving?"
|
||||
echo "Note: Create service if Enabling is not persistent."
|
||||
OPTION=$(ugum choose Enable Disable Create-Service Exit)
|
||||
echo "Enable, Disable Wake-on-LAN, Force-Enable, or Exit without saving?"
|
||||
echo "Note: Force-Enable will make WOL persist across reboots"
|
||||
OPTION=$(ugum choose Enable Disable Force-Enable Exit)
|
||||
if [[ "${OPTION,,}" == "enable" ]]; then
|
||||
echo "You chose to enable Wake-on-LAN."
|
||||
echo "Requesting root privileges..."
|
||||
@ -127,23 +127,21 @@ toggle-wol:
|
||||
echo "Removing udev rule to disable persistence..."
|
||||
sudo rm -f "$CONFIG_FILE"
|
||||
fi
|
||||
if systemctl is-enabled force-wol.service &>/dev/null; then
|
||||
sudo systemctl disable force-wol.service
|
||||
echo "Force-WOL service has been disabled."
|
||||
fi
|
||||
echo "Wake-on-LAN has been ${red}${bold}disabled${normal}."
|
||||
elif [[ "${OPTION,,}" == "create-service" ]]; then
|
||||
echo "You chose to create a systemd service for enabling WOL at boot."
|
||||
elif [[ "${OPTION,,}" == "force-enable" ]]; then
|
||||
echo "You chose to force-enable wake on LAN."
|
||||
echo "Requesting root privileges..."
|
||||
sudo bash -c "cat > $SERVICE_FILE <<EOF
|
||||
[Unit]
|
||||
Description=Force Enable Wake-on-LAN
|
||||
After=network-online.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/sbin/ethtool -s $INTERFACE wol g
|
||||
[Install]
|
||||
WantedBy=network-online.target
|
||||
EOF"
|
||||
if [ -f "/etc/systemd/system/force-wol.service" ]; then
|
||||
echo "Removing deprecated service file"
|
||||
sudo rm "/etc/systemd/system/force-wol.service"
|
||||
fi
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now force-wol.service
|
||||
echo "Systemd service created and enabled at boot: ${green}${bold}force-wol.service${normal}"
|
||||
echo "Wake on LAN force-enabled: ${green}${bold}force-wol.service${normal}"
|
||||
else
|
||||
echo "No changes were made."
|
||||
fi
|
||||
|
@ -48,9 +48,11 @@ get-webapp service="":
|
||||
"Amazon Prime Video" \
|
||||
"Apple TV" \
|
||||
"Curiosity Stream" \
|
||||
"Crunchyroll" \
|
||||
"GeForce Now" \
|
||||
"HBO Max" \
|
||||
"Hulu" \
|
||||
"Plex HTPC" \
|
||||
"Paramount Plus" \
|
||||
"Peacock" \
|
||||
"Sling TV" \
|
||||
@ -72,6 +74,32 @@ get-webapp service="":
|
||||
steamos-add-to-steam "$script_path"
|
||||
echo "Added $1 to Steam successfully!"
|
||||
}
|
||||
|
||||
install_crunchyroll() {
|
||||
if grep -q 'it.mijorus.gearlever' <<< $(flatpak list); then
|
||||
wget \
|
||||
$(curl -s https://api.github.com/repos/aarron-lee/crunchyroll-linux/releases/latest | \
|
||||
jq -r ".assets[] | select(.name | test(\".*AppImage\")) | .browser_download_url") \
|
||||
-O $HOME/Downloads/Crunchyroll.AppImage
|
||||
chmod +x $HOME/Downloads/Crunchyroll.AppImage
|
||||
flatpak run it.mijorus.gearlever $HOME/Downloads/Crunchyroll.AppImage
|
||||
else
|
||||
wget \
|
||||
$(curl -s https://api.github.com/repos/aarron-lee/crunchyroll-linux/releases/latest | \
|
||||
jq -r ".assets[] | select(.name | test(\".*AppImage\")) | .browser_download_url") \
|
||||
-O $HOME/Desktop/Crunchyroll.AppImage
|
||||
chmod +x $HOME/Desktop/Crunchyroll.AppImage
|
||||
fi
|
||||
}
|
||||
|
||||
install_plex_htpc(){
|
||||
if grep -q 'tv.plex.PlexHTPC' <<< $(flatpak list); then
|
||||
echo "Plex HTPC is already installed"
|
||||
else
|
||||
flatpak install --system -y tv.plex.PlexHTPC
|
||||
fi
|
||||
}
|
||||
|
||||
# Process user choice
|
||||
case "$CHOICE" in
|
||||
"YouTube") create_script "youtube" "youtube" ;;
|
||||
@ -81,9 +109,11 @@ get-webapp service="":
|
||||
"Amazon Prime Video") create_script "prime-video" "amazonPrimeVideo" ;;
|
||||
"Apple TV") create_script "apple-tv" "appleTv" ;;
|
||||
"Curiosity Stream") create_script "curiosity-stream" "curiosityStream" ;;
|
||||
"Crunchyroll") install_crunchyroll ;;
|
||||
"GeForce Now") create_script "geforce-now" "geForceNow" ;;
|
||||
"HBO Max") create_script "hbo-max" "hboMax" ;;
|
||||
"Hulu") create_script "hulu" "hulu" ;;
|
||||
"Plex HTPC") install_plex_htpc ;;
|
||||
"Paramount Plus") create_script "paramount-plus" "paramountPlus" ;;
|
||||
"Peacock") create_script "peacock" "peacock" ;;
|
||||
"Sling TV") create_script "sling-tv" "slingTV" ;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user