Skip to content

Commit

Permalink
v9.5
Browse files Browse the repository at this point in the history
- DietPi-Software | Jellyfin: Since a while FFmpeg 6 is available for Jellyfin, but on old installs with the old FFmpeg 5 package, it is not upgraded automatically by APT. This DietPi update applies the FFmpeg upgrade to all affected systems. Many thanks to @gioxx and @WolfganP for reporting this issue: #7080
- DietPi-Software | Jellyfin: Resolved an issue where the intended HTTP port change could not be applied, since the network config file is not created anymore at service start. We do now pre-create a minimal one, which is complemented with defaults automatically. There was a related issue: #5559. However, now, indeed network.xml is never created, intentionally, which is fine, since Jellyfin internally applies defaults for all non-defined settings, and stores them back to the config file when completing the web UI setup or saving network settings in web UI. So we can perfectly pre-create a minimal config with just the settings we need to have changed from defaults. Also XML syntax can be minimal, no XML meta data or schemes needed. No need to wait for config files to be created while setting the service start up.
  • Loading branch information
MichaIng committed May 22, 2024
1 parent 896166d commit 5e01b39
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -1633,6 +1633,13 @@ Patch_9_5()
{
# Update MPD flag on Bookworm and above: https://github.com/MusicPlayerDaemon/MPD/commit/ce77b14
(( $G_DISTRO > 6 )) && [[ -f '/etc/systemd/system/mpd.service.d/dietpi.conf' ]] && G_EXEC sed -i 's/no-daemon/systemd/' /etc/systemd/system/mpd.service.d/dietpi.conf

# Migrate jellyfin-ffmpeg5 => jellyfin-ffmpeg6
if dpkg-query -s jellyfin &> /dev/null && dpkg-query -s jellyfin-ffmpeg5
then
G_DIETPI-NOTIFY 2 'Migrating to Jellyfin FFmpeg 6'
G_AGI jellyfin
fi
}

# v6.35 => v7 migration
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
v9.5
(2024-06-08)

Enhancements:
- DietPi-Software | Jellyfin: Since a while FFmpeg 6 is available for Jellyfin, but on old installs with the old FFmpeg 5 package, it is not upgraded automatically by APT. This DietPi update applies the FFmpeg upgrade to all affected systems. Many thanks to @gioxx and @WolfganP for reporting this issue: https://github.com/MichaIng/DietPi/issues/7080

Bug fixes:
- DietPi-Config | Resolved an issue where Advanced Options were not accessible on some SBCs. Many thanks to @thuehlinger for reporting this issue: https://github.com/MichaIng/DietPi/issues/6663#issuecomment-2108351878
- DietPi-Software | Snapcast Server: Resolved on issue where on RISC-V systems, the web interface was not available, since it is not included in the "snapserver" package from Debian. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073
- DietPi-Software | Snapcast Server: Resolved an issue where on Bookworm systems, which installed the Snapcast Server before DietPi v9.4 and reinstalled it afterwards, the server failed to start due to a permissions issue, since the services of both packages use different users. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073
- DietPi-Software | Shairport Sync: Resolved a DietPi v9.4 regression, where the AirPlay 2 choice did not have an effect, but the AirPlay 1 package was always installed. Additionally, uninstalling Shairport Sync will now also purge the AirPlay 2 package. Many thanks to @pulpe for fixing this bug: https://github.com/MichaIng/DietPi/pull/7082
- DietPi-Software | Box64: Resolved an issue where an invalid build target was used on Raspberry Pi 5 with 16k page size kernel. This target was removed with latest Box64, as page size handling is now done at runtime.
- DietPi-Software | Jellyfin: Resolved an issue where the intended HTTP port change could not be applied, since the network config file is not created anymore at service start. We do now pre-create a minimal one, which is complemented with defaults automatically.

As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME

Expand Down
19 changes: 9 additions & 10 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -10923,21 +10923,14 @@ _EOF_

# APT meta package: Server, web component and FFmpeg implementation
G_AGI jellyfin
if [[ -d '/mnt/dietpi_userdata/jellyfin' || -f '/etc/jellyfin/network.xml' ]]
then
G_EXEC systemctl stop jellyfin
else
CREATE_CONFIG_CONTENT='AddPeopleQueryIndex' Create_Config '/etc/jellyfin/migrations.xml' jellyfin 60
fi
G_EXEC systemctl stop jellyfin

# Grant dietpi group permissions and assure video access
Create_User -G dietpi,video,render -d /mnt/dietpi_userdata/jellyfin jellyfin

# Config: Only apply on fresh install, assumed when /mnt/dietpi_userdata/jellyfin does not yet exist
if [[ ! -d '/mnt/dietpi_userdata/jellyfin' ]]
then
# Start service until /etc/jellyfin/network.xml exists
Create_Config '/etc/jellyfin/network.xml' jellyfin
# Data dir
# shellcheck disable=SC2015
[[ -d '/var/lib/jellyfin' ]] && G_EXEC mv /var/lib/jellyfin /mnt/dietpi_userdata/jellyfin || G_EXEC mkdir /mnt/dietpi_userdata/jellyfin
Expand All @@ -10950,8 +10943,14 @@ _EOF_
[[ -d '/var/cache/jellyfin' ]] && G_EXEC mv /var/cache/jellyfin /mnt/dietpi_userdata/jellyfin/cache || G_EXEC mkdir /mnt/dietpi_userdata/jellyfin/cache
G_CONFIG_INJECT 'JELLYFIN_CACHE_DIR=' 'JELLYFIN_CACHE_DIR=/mnt/dietpi_userdata/jellyfin/cache' /etc/default/jellyfin
# Change default port due to conflict with Emby
G_CONFIG_INJECT '<PublicPort>' '<PublicPort>8097</PublicPort>' /etc/jellyfin/network.xml
G_CONFIG_INJECT '<HttpServerPortNumber>' ' <HttpServerPortNumber>8097</HttpServerPortNumber>' /etc/jellyfin/network.xml
# - This config file is not generated at service start, but only when saving network settings via web UI. This also complements any existing config with defaults, hence we pre-create one with only the changes we need.
cat << '_EOF_' > /etc/jellyfin/network.xml
<NetworkConfiguration>
<InternalHttpPort>8097</InternalHttpPort>
<PublicHttpPort>8097</PublicHttpPort>
</NetworkConfiguration>
_EOF_
G_EXEC chown jellyfin: /etc/jellyfin/network.xml
fi

# Permissions
Expand Down

3 comments on commit 5e01b39

@gioxx
Copy link

@gioxx gioxx commented on 5e01b39 May 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Admit it @MichaIng, I am "the one who opens the weird issues," which however you promptly then correct in the new DietPi releases! 😁

@MichaIng
Copy link
Owner Author

@MichaIng MichaIng commented on 5e01b39 May 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And thanks for doing so! Even that it is not exactly a problem with DietPi, we can and do solve many such kind of issues for our users with the 3rd party software we have implemented into dietpi-software. So always good to report just right away, and we'll see whether/what we can do. In this case, while testing, I was able to recognise and fix another install bug due to changed behaviour of Jellyfin, so doubled beneficial 🙂.

@gioxx
Copy link

@gioxx gioxx commented on 5e01b39 May 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love use DietPi, and I feel it is my duty to contribute as and when I can. I will not stop bothering you unless you explicitly ask for it 😄

Please sign in to comment.