Skip to content

Commit

Permalink
Merge pull request #1 from Xameon42/master
Browse files Browse the repository at this point in the history
Update to latest master
  • Loading branch information
Xameon42 authored Feb 18, 2024
2 parents 43c469f + d05f06d commit 56d9549
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 26 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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/*
Expand All @@ -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/*
8 changes: 4 additions & 4 deletions deployment/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG IMG=debian
ARG TAG=buster
ARG TAG=bookworm
FROM $IMG:$TAG

# Docker build arguments
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/player/OpenGLDetect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 6 additions & 9 deletions src/player/PlayerComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 2 additions & 0 deletions src/settings/SettingsComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion src/ui/KonvergoWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions src/utils/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/utils/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 56d9549

Please sign in to comment.