From e9087d108ba47424a245666cfc5fad6a0ec94fa1 Mon Sep 17 00:00:00 2001 From: emeric Date: Sat, 22 Jul 2023 12:00:51 +0200 Subject: [PATCH 1/4] Added missing dependency in docs --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 96f92310..79022910 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -36,7 +36,7 @@ __Notes__: * a C++17 compiler is needed * ffmpeg version 4 minimum is required ```sh -apt-get install g++ cmake libboost-program-options-dev libboost-system-dev libavutil-dev libavformat-dev libstb-dev libconfig++-dev ffmpeg libtag1-dev libpam0g-dev libgtest-dev +apt-get install g++ cmake libboost-program-options-dev libboost-system-dev libavutil-dev libavformat-dev libstb-dev libconfig++-dev ffmpeg libtag1-dev libpam0g-dev libgtest-dev libarchive-dev ``` __Notes__: * libpam0g-dev is optional (only for using PAM authentication) From e92d8a13670f3e53b1cc4181eb29ca51f1996ad5 Mon Sep 17 00:00:00 2001 From: emeric Date: Sat, 22 Jul 2023 12:01:48 +0200 Subject: [PATCH 2/4] Correctly refresh artist and album views when filters change --- src/lms/ui/explore/ArtistView.cpp | 4 +++- src/lms/ui/explore/ArtistView.hpp | 1 + src/lms/ui/explore/ReleaseView.cpp | 4 +++- src/lms/ui/explore/ReleaseView.hpp | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lms/ui/explore/ArtistView.cpp b/src/lms/ui/explore/ArtistView.cpp index 13369377..d90dbc5e 100644 --- a/src/lms/ui/explore/ArtistView.cpp +++ b/src/lms/ui/explore/ArtistView.cpp @@ -76,6 +76,7 @@ Artist::Artist(Filters& filters, PlayQueueController& controller) filters.updated().connect([this] { + _needForceRefresh = true; refreshView(); }); @@ -111,12 +112,13 @@ Artist::refreshView() const auto artistId {extractArtistIdFromInternalPath()}; // consider everything is up to date is the same artist is being rendered - if (artistId && *artistId == _artistId) + if (!_needForceRefresh && artistId && *artistId == _artistId) return; clear(); _artistId = {}; _trackContainer = nullptr; + _needForceRefresh = false; if (!artistId) throw ArtistNotFoundException {}; diff --git a/src/lms/ui/explore/ArtistView.hpp b/src/lms/ui/explore/ArtistView.hpp index a08a197f..078b483a 100644 --- a/src/lms/ui/explore/ArtistView.hpp +++ b/src/lms/ui/explore/ArtistView.hpp @@ -80,6 +80,7 @@ namespace UserInterface ReleaseContainer _appearsOnReleaseContainer {}; InfiniteScrollingContainer* _trackContainer {}; Database::ArtistId _artistId {}; + bool _needForceRefresh {}; }; } // namespace UserInterface diff --git a/src/lms/ui/explore/ReleaseView.cpp b/src/lms/ui/explore/ReleaseView.cpp index 1060c7fc..7e538365 100644 --- a/src/lms/ui/explore/ReleaseView.cpp +++ b/src/lms/ui/explore/ReleaseView.cpp @@ -184,6 +184,7 @@ Release::Release(Filters& filters, PlayQueueController& playQueueController) _filters.updated().connect([this] { + _needForceRefresh = true; refreshView(); }); @@ -220,11 +221,12 @@ Release::refreshView() const auto releaseId {extractReleaseIdFromInternalPath()}; // consider everything is up to date is the same release is being rendered - if (releaseId && *releaseId == _releaseId) + if (!_needForceRefresh && releaseId && *releaseId == _releaseId) return; clear(); _releaseId = {}; + _needForceRefresh = false; if (!releaseId) throw ReleaseNotFoundException {}; diff --git a/src/lms/ui/explore/ReleaseView.hpp b/src/lms/ui/explore/ReleaseView.hpp index 270f5ed3..12c994d1 100644 --- a/src/lms/ui/explore/ReleaseView.hpp +++ b/src/lms/ui/explore/ReleaseView.hpp @@ -48,6 +48,7 @@ namespace UserInterface Filters& _filters; PlayQueueController& _playQueueController; Database::ReleaseId _releaseId; + bool _needForceRefresh {}; }; } // namespace UserInterface From 46d45caf3d08d5e8a848181a283917e483be9a1f Mon Sep 17 00:00:00 2001 From: emeric Date: Sat, 22 Jul 2023 14:35:13 +0200 Subject: [PATCH 3/4] Always consistenly use the widget's doJavaScript method, ref #327 --- src/lms/ui/MediaPlayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lms/ui/MediaPlayer.cpp b/src/lms/ui/MediaPlayer.cpp index f831506a..dfd9db66 100644 --- a/src/lms/ui/MediaPlayer.cpp +++ b/src/lms/ui/MediaPlayer.cpp @@ -311,7 +311,7 @@ MediaPlayer::loadTrack(Database::TrackId trackId, bool play, float replayGain) } LMS_LOG(UI, DEBUG) << "Running js = '" << oss.str() << "'"; - wApp->doJavaScript(oss.str()); + doJavaScript(oss.str()); _trackIdLoaded = trackId; trackLoaded.emit(*_trackIdLoaded); @@ -320,7 +320,7 @@ MediaPlayer::loadTrack(Database::TrackId trackId, bool play, float replayGain) void MediaPlayer::stop() { - wApp->doJavaScript("LMS.mediaplayer.stop()"); + doJavaScript("LMS.mediaplayer.stop()"); } void From 5a1d18d26ebcee7051c71f0d1377af3809ce331b Mon Sep 17 00:00:00 2001 From: emeric Date: Sun, 27 Aug 2023 15:52:29 +0200 Subject: [PATCH 4/4] Upgraded alpine for docker images --- Dockerfile-build-alpine | 2 +- Dockerfile-release | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile-build-alpine b/Dockerfile-build-alpine index ed896dfa..aef34b78 100644 --- a/Dockerfile-build-alpine +++ b/Dockerfile-build-alpine @@ -1,5 +1,5 @@ FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx -FROM --platform=$BUILDPLATFORM alpine:3.17 +FROM --platform=$BUILDPLATFORM alpine:3.18 ARG BUILD_PACKAGES="\ clang \ diff --git a/Dockerfile-release b/Dockerfile-release index 77d6b2af..918c5499 100644 --- a/Dockerfile-release +++ b/Dockerfile-release @@ -1,4 +1,4 @@ -FROM alpine:3.17 AS build +FROM alpine:3.18 AS build WORKDIR /tmp/workdir @@ -78,7 +78,7 @@ RUN \ make distclean # WT -ARG WT_VERSION=4.9.1 +ARG WT_VERSION=4.10.0 RUN \ DIR=/tmp/wt && mkdir -p ${DIR} && cd ${DIR} && \ curl -sLO https://github.com/emweb/wt/archive/${WT_VERSION}.tar.gz && \ @@ -133,7 +133,7 @@ RUN \ rm -rf /tmp/fakeroot/share/Wt/resources/themes ## Release Stage -FROM alpine:3.17 AS release +FROM alpine:3.18 AS release LABEL maintainer="Emeric Poupon " ARG RUNTIME_PACKAGES=" \ @@ -144,7 +144,7 @@ ARG RUNTIME_PACKAGES=" \ libogg \ opus \ libvorbis \ - lame \ + lame-libs \ zlib \ boost-filesystem \ boost-program_options \