diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 400eccac..36f8fd0e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install Qt 5.15.2 - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: "5.15.2" modules: "qtwebengine" @@ -33,7 +33,7 @@ jobs: brew install create-dmg create-dmg --volname "Jellyfin Media Player" --no-internet-enable "JellyfinMediaPlayer.dmg" "./build/output/Jellyfin Media Player.app" - name: Archive production artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: macos path: ${{ github.workspace }}/JellyfinMediaPlayer.dmg @@ -43,7 +43,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install Qt 5.15.2 - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: "5.15.2" arch: "win64_msvc2019_64" @@ -79,7 +79,7 @@ jobs: ninja windows_package shell: cmd - name: Archive production artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: windows path: ${{ github.workspace }}/build/JellyfinMediaPlayer-*.exe @@ -89,7 +89,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install Qt 5.15.2 - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: "5.15.2" arch: "win32_msvc2019" @@ -125,7 +125,7 @@ jobs: ninja windows_package shell: cmd - name: Archive production artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: windows-legacy32 path: ${{ github.workspace }}/build/JellyfinMediaPlayer-*.exe @@ -142,7 +142,7 @@ jobs: docker build -f deployment/Dockerfile.debian -t builddeb --build-arg TAG=${{ matrix.tag }} --build-arg IMG=ubuntu deployment docker run -v $(pwd)/deployment/dist:/dist -v $(pwd):/jellyfin -e TAG=${{ matrix.tag }} builddeb - name: Archive production artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ubuntu-${{ matrix.tag }} path: ${{ github.workspace }}/deployment/dist/* @@ -159,7 +159,7 @@ jobs: docker build -f deployment/Dockerfile.debian -t builddeb --build-arg TAG=${{ matrix.tag }} deployment docker run -v $(pwd)/deployment/dist:/dist -v $(pwd):/jellyfin -e TAG=${{ matrix.tag }} builddeb - name: Archive production artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: debian-${{ matrix.tag }} path: ${{ github.workspace }}/deployment/dist/* diff --git a/deployment/Dockerfile.debian b/deployment/Dockerfile.debian index 1a16d10a..f3ec1e31 100644 --- a/deployment/Dockerfile.debian +++ b/deployment/Dockerfile.debian @@ -1,5 +1,5 @@ ARG IMG=debian -ARG TAG=buster +ARG TAG=bookworm FROM $IMG:$TAG # Docker build arguments @@ -14,9 +14,9 @@ ENV IS_DOCKER=YES # Prepare Debian build environment RUN apt-get update \ - && DEBIAN_FRONTEND="noninteractive" TZ="America/New_York" \ - apt-get install -y debhelper mmv git curl devscripts equivs - + && DEBIAN_FRONTEND="noninteractive" TZ="America/New_York" \ + apt-get install --no-install-recommends -y \ + debhelper mmv git curl devscripts equivs # Link to build script RUN ln -sf ${SOURCE_DIR}/deployment/build.debian /build.sh diff --git a/src/main.cpp b/src/main.cpp index 40dea87a..11725687 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -30,7 +30,7 @@ #include "PFMoveApplication.h" #endif -#if defined(Q_OS_MAC) || defined(Q_OS_LINUX) +#if defined(Q_OS_MAC) || defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) #include "SignalManager.h" #endif @@ -175,7 +175,7 @@ int main(int argc, char *argv[]) app.setWindowIcon(QIcon(":/images/icon.png")); #endif -#if defined(Q_OS_LINUX) +#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) // Set window icon on Linux using system icon theme app.setWindowIcon(QIcon::fromTheme("com.github.iwalton3.jellyfin-media-player", QIcon(":/images/icon.png"))); // Set app id for Wayland compositor window icon diff --git a/src/player/OpenGLDetect.cpp b/src/player/OpenGLDetect.cpp index 56b79d44..a46feb3a 100644 --- a/src/player/OpenGLDetect.cpp +++ b/src/player/OpenGLDetect.cpp @@ -30,7 +30,7 @@ void detectOpenGLLate() { } -#elif defined(Q_OS_LINUX) +#elif defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) /////////////////////////////////////////////////////////////////////////////////////////////////// // Attempt to reuse mpv's code for detecting whether we want GLX or EGL (which diff --git a/src/player/PlayerComponent.cpp b/src/player/PlayerComponent.cpp index 5d6189d6..bf55aabc 100644 --- a/src/player/PlayerComponent.cpp +++ b/src/player/PlayerComponent.cpp @@ -1062,14 +1062,11 @@ void PlayerComponent::setAudioConfiguration() updateAudioDevice(); - QString resampleOpts = ""; bool normalize = SettingsComponent::Get().value(SETTINGS_SECTION_AUDIO, "normalize").toBool(); - resampleOpts += QString(":normalize=") + (normalize ? "yes" : "no"); + mpv::qt::set_property(m_mpv, "audio-normalize-downmix", normalize ? "yes" : "no"); // Make downmix more similar to PHT. - resampleOpts += ":o=[surround_mix_level=1]"; - - mpv::qt::set_property(m_mpv, "af-defaults", "lavrresample" + resampleOpts); + mpv::qt::set_property(m_mpv, "audio-swresample-o", "surround_mix_level=1"); m_passthroughCodecs.clear(); @@ -1123,7 +1120,7 @@ void PlayerComponent::setAudioConfiguration() } else { - mpv::qt::command(m_mpv, QStringList() << "af" << "del" << "@ac3"); + mpv::qt::command(m_mpv, QStringList() << "af" << "remove" << "@ac3"); } QVariant device = SettingsComponent::Get().value(SETTINGS_SECTION_AUDIO, "device"); @@ -1223,7 +1220,7 @@ void PlayerComponent::updateVideoAspectSettings() } mpv::qt::set_property(m_mpv, "video-unscaled", disableScaling); - mpv::qt::set_property(m_mpv, "video-aspect", forceAspect); + mpv::qt::set_property(m_mpv, "video-aspect-override", forceAspect); mpv::qt::set_property(m_mpv, "keepaspect", keepAspect); mpv::qt::set_property(m_mpv, "panscan", panScan); } @@ -1259,7 +1256,7 @@ void PlayerComponent::updateVideoSettings() #ifndef TARGET_RPI double displayFps = DisplayComponent::Get().currentRefreshRate(); - mpv::qt::set_property(m_mpv, "display-fps", displayFps); + mpv::qt::set_property(m_mpv, "display-fps-override", displayFps); #endif setAudioDelay(m_playbackAudioDelay); @@ -1546,7 +1543,7 @@ QString PlayerComponent::videoInformation() const << MPV_PROPERTY("video-params/dh") << "\n"; info << "FPS (container): " << MPV_PROPERTY("container-fps") << "\n"; info << "FPS (filters): " << MPV_PROPERTY("estimated-vf-fps") << "\n"; - info << "Aspect: " << MPV_PROPERTY("video-aspect") << "\n"; + info << "Aspect: " << MPV_PROPERTY("video-params/aspect") << "\n"; info << "Bitrate: " << MPV_PROPERTY("video-bitrate") << "\n"; double displayFps = DisplayComponent::Get().currentRefreshRate(); info << "Display FPS: " << MPV_PROPERTY("display-fps") diff --git a/src/settings/SettingsComponent.cpp b/src/settings/SettingsComponent.cpp index 81fa6358..29e2d491 100644 --- a/src/settings/SettingsComponent.cpp +++ b/src/settings/SettingsComponent.cpp @@ -655,6 +655,8 @@ Platform SettingsComponent::platformFromString(const QString& platformString) return PLATFORM_WINDOWS; else if (platformString == "linux") return PLATFORM_LINUX; + else if (platformString == "freebsd") + return PLATFORM_FREEBSD; else if (platformString == "oe") return PLATFORM_OE; else if (platformString == "oe_rpi") diff --git a/src/ui/KonvergoWindow.h b/src/ui/KonvergoWindow.h index 8c77cfc7..2a95c58d 100644 --- a/src/ui/KonvergoWindow.h +++ b/src/ui/KonvergoWindow.h @@ -50,7 +50,7 @@ class KonvergoWindow : public QQuickWindow bool isAlwaysOnTop() { Qt::WindowFlags forceOnTopFlags = Qt::WindowStaysOnTopHint; -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) forceOnTopFlags = forceOnTopFlags | Qt::X11BypassWindowManagerHint; #endif return (flags() & forceOnTopFlags); diff --git a/src/utils/Utils.cpp b/src/utils/Utils.cpp index 042d79bd..a2c88799 100644 --- a/src/utils/Utils.cpp +++ b/src/utils/Utils.cpp @@ -96,6 +96,8 @@ Platform Utils::CurrentPlatform() return PLATFORM_LINUX; #elif defined(Q_OS_WIN32) return PLATFORM_WINDOWS; +#elif defined(Q_OS_FREEBSD) + return PLATFORM_FREEBSD; #else return PLATFORM_UNKNOWN; #endif diff --git a/src/utils/Utils.h b/src/utils/Utils.h index 06caae66..abc96f39 100644 --- a/src/utils/Utils.h +++ b/src/utils/Utils.h @@ -43,8 +43,9 @@ class FatalException : public QException PLATFORM_OE_X86 = (1 << 2), PLATFORM_OE_RPI = (1 << 3), PLATFORM_WINDOWS = (1 << 4), + PLATFORM_FREEBSD = (1 << 5), PLATFORM_OE = (PLATFORM_OE_RPI | PLATFORM_OE_X86), - PLATFORM_ANY = (PLATFORM_OSX | PLATFORM_WINDOWS | PLATFORM_LINUX | PLATFORM_OE) + PLATFORM_ANY = (PLATFORM_OSX | PLATFORM_WINDOWS | PLATFORM_LINUX | PLATFORM_OE | PLATFORM_FREEBSD) }; #define PLATFORM_ANY_EXCEPT(x) (PLATFORM_ANY & (~(x)))