Skip to content

Commit da933ad

Browse files
committed
Merge remote-tracking branch 'origin/master' into prerelease
2 parents 064f31a + 2a3dada commit da933ad

File tree

6 files changed

+33
-22
lines changed

6 files changed

+33
-22
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
curl -L https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip > ninja.zip
9393
unzip ninja.zip
9494
mv ninja.exe build/
95-
curl -L https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-v3-20240304-git-9ac791c.7z/download > mpv.7z
95+
curl -L https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-20240304-git-9ac791c.7z/download > mpv.7z
9696
7z x mpv.7z
9797
mkdir mpv
9898
mv include mpv
@@ -136,7 +136,7 @@ jobs:
136136
curl -L https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip > ninja.zip
137137
unzip ninja.zip
138138
mv ninja.exe build/
139-
curl -L https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-20240304-git-9ac791c.7z/download > mpv.7z
139+
curl -L https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-v3-20240304-git-9ac791c.7z/download > mpv.7z
140140
7z x mpv.7z
141141
mkdir mpv
142142
mv include mpv
@@ -208,6 +208,7 @@ jobs:
208208

209209
build-ubuntu:
210210
strategy:
211+
fail-fast: false
211212
matrix:
212213
tag: [oracular, noble, jammy]
213214
runs-on: "ubuntu-latest"
@@ -230,6 +231,7 @@ jobs:
230231

231232
build-debian:
232233
strategy:
234+
fail-fast: false
233235
matrix:
234236
tag: [bookworm, trixie]
235237
runs-on: "ubuntu-latest"

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ project(JellyfinMediaPlayer CXX C)
1010
# we want this to be able to run clang-tidy
1111
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "" FORCE)
1212

13+
option(CHECK_FOR_UPDATES "Enable checking for new versions of Jellyfin Media Player" ON)
1314
option(OPENELEC "Make an OpenELEC build" OFF)
1415
option(LINUX_X11POWER "Enable non D-Bus screensaver management" OFF)
1516

17+
if (NOT CHECK_FOR_UPDATES)
18+
add_definitions(-DDISABLE_UPDATE_CHECK)
19+
endif()
20+
1621
if((NOT LINUX_X11POWER) AND (UNIX AND (NOT APPLE)))
1722
set(LINUX_DBUS ON)
1823
endif()
@@ -41,7 +46,6 @@ endmacro()
4146
set_policy(CMP0020 NEW)
4247
set_policy(CMP0017 NEW)
4348
set_policy(CMP0058 NEW)
44-
set_policy(CMP0026 OLD)
4549
set_policy(CMP0071 NEW)
4650
set_policy(CMP0072 NEW)
4751
set_policy(CMP0148 OLD)

CMakeModules/utils.cmake

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,22 @@ function(copy_resources target)
1717

1818
get_property(RESOURCE_LIST GLOBAL PROPERTY _${target}_RESOURCE_LIST)
1919

20-
# we read the LOCATION from the target instead of using a generator
21-
# here since add_custom_command doesn't support generator expresessions
22-
# in the output field, and this is still cleaner than hardcoding the path
23-
# of the output binary.
24-
#
25-
get_property(TARGET_LOC TARGET ${target} PROPERTY LOCATION)
26-
get_filename_component(TARGET_DIR ${TARGET_LOC} DIRECTORY)
27-
if(APPLE)
28-
set(TARGET_LOC ${TARGET_DIR}/..)
29-
else()
30-
set(TARGET_LOC ${TARGET_DIR})
31-
endif()
32-
3320
if(RESOURCE_LIST)
21+
set_policy(CMP0026 OLD)
22+
23+
# we read the LOCATION from the target instead of using a generator
24+
# here since add_custom_command doesn't support generator expresessions
25+
# in the output field, and this is still cleaner than hardcoding the path
26+
# of the output binary.
27+
#
28+
get_property(TARGET_LOC TARGET ${target} PROPERTY LOCATION)
29+
get_filename_component(TARGET_DIR ${TARGET_LOC} DIRECTORY)
30+
if(APPLE)
31+
set(TARGET_LOC ${TARGET_DIR}/..)
32+
else()
33+
set(TARGET_LOC ${TARGET_DIR})
34+
endif()
35+
3436
foreach(RF ${RESOURCE_LIST})
3537
string(REPLACE "|" ";" PARTS "${RF}")
3638
list(GET PARTS 0 SOURCE_FILE)

src/main.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,7 @@ void ShowLicenseInfo()
8282
/////////////////////////////////////////////////////////////////////////////////////////
8383
QStringList g_qtFlags = {
8484
"--disable-web-security",
85-
"--enable-gpu-rasterization",
86-
#ifdef Q_OS_LINUX
87-
"--disable-gpu"
88-
#endif
85+
"--enable-gpu-rasterization"
8986
};
9087

9188
/////////////////////////////////////////////////////////////////////////////////////////
@@ -110,7 +107,7 @@ int main(int argc, char *argv[])
110107
"the scale (DPI) of the desktop interface.");
111108
scaleOption.setValueName("scale");
112109
scaleOption.setDefaultValue("auto");
113-
110+
114111
auto platformOption = QCommandLineOption("platform", "Equivalant to QT_QPA_PLATFORM.");
115112
platformOption.setValueName("platform");
116113
platformOption.setDefaultValue("default");
@@ -173,7 +170,7 @@ int main(int argc, char *argv[])
173170
QApplication app(newArgc, newArgv);
174171
app.setApplicationName("Jellyfin Media Player");
175172

176-
#if defined(Q_OS_WIN)
173+
#if defined(Q_OS_WIN)
177174
// Setting window icon on OSX will break user ability to change it
178175
app.setWindowIcon(QIcon(":/images/icon.png"));
179176
#endif

src/settings/SettingsComponent.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,10 @@ void SettingsComponent::loadConf(const QString& path, bool storage)
305305
getSection(SETTINGS_SECTION_MAIN)->setValue("autodetectCertBundle", "true");
306306
}
307307
}
308+
309+
#ifdef DISABLE_UPDATE_CHECK
310+
getSection(SETTINGS_SECTION_MAIN)->setValueHidden("checkForUpdates", "true");
311+
#endif
308312
}
309313

310314
///////////////////////////////////////////////////////////////////////////////////////////////////

src/system/SystemComponent.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ QString SystemComponent::getNativeShellScript()
360360
/////////////////////////////////////////////////////////////////////////////////////////
361361
void SystemComponent::checkForUpdates()
362362
{
363+
#ifndef DISABLE_UPDATE_CHECK
363364
if (SettingsComponent::Get().value(SETTINGS_SECTION_MAIN, "checkForUpdates").toBool()) {
364365
#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
365366
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
@@ -374,6 +375,7 @@ void SystemComponent::checkForUpdates()
374375
emit updateInfoEmitted("SSL_UNAVAILABLE");
375376
#endif
376377
}
378+
#endif
377379
}
378380

379381
/////////////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)