Skip to content

Commit

Permalink
Merge branch 'develop' for release v3.53.0
Browse files Browse the repository at this point in the history
  • Loading branch information
epoupon committed May 5, 2024
2 parents a8b3509 + c90d81a commit 860efa8
Show file tree
Hide file tree
Showing 108 changed files with 1,487 additions and 1,519 deletions.
36 changes: 1 addition & 35 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,12 @@ if(ENABLE_TESTS)
find_package(GTest REQUIRED)
endif()

# Common dependencies
find_package(PkgConfig REQUIRED)
find_package(Threads REQUIRED)
find_package(Filesystem REQUIRED)
find_package(Boost REQUIRED COMPONENTS system program_options iostreams)
find_package(Wt REQUIRED COMPONENTS Wt Dbo DboSqlite3 HTTP)
pkg_check_modules(Taglib REQUIRED IMPORTED_TARGET taglib)
pkg_check_modules(Config++ REQUIRED IMPORTED_TARGET libconfig++)
pkg_check_modules(GraphicsMagick++ IMPORTED_TARGET GraphicsMagick++)
pkg_check_modules(LIBAV IMPORTED_TARGET libavcodec libavutil libavformat)
pkg_check_modules(Archive REQUIRED IMPORTED_TARGET libarchive)
find_package(PAM)
find_package(STB)

# WT
if (NOT Wt_FOUND)
Expand All @@ -47,34 +41,6 @@ if (NOT TARGET Wt::HTTP)
message(FATAL_ERROR "Cannot find Wt::HTTP!")
endif ()

# PAM
option(USE_PAM "Use the PAM backend authentication API" ON)
if (USE_PAM AND NOT PAM_FOUND)
message(WARNING "PAM library not found: disabling")
set(USE_PAM OFF)
endif ()
if (USE_PAM)
message(STATUS "Using PAM authentication backend")
else ()
message(STATUS "NOT using PAM authentication backend")
endif ()

# IMAGE
if (STB_FOUND)
set(IMAGE_LIBRARY STB CACHE STRING "STB library")
elseif (GraphicsMagick++_FOUND)
set(IMAGE_LIBRARY GraphicsMagick++ CACHE STRING "GraphicsMagick++")
else ()
message(FATAL_ERROR "Cannot find suitable image library")
endif()
set_property(CACHE IMAGE_LIBRARY PROPERTY STRINGS GraphicsMagick++ STB)
if (IMAGE_LIBRARY STREQUAL GraphicsMagick++ AND NOT GraphicsMagick++_FOUND)
message(FATAL_ERROR "GraphicsMagick++ not found")
elseif (IMAGE_LIBRARY STREQUAL STB AND NOT STB_FOUND)
message(FATAL_ERROR "STB not found")
endif ()
message(STATUS "IMAGE_LIBRARY set to ${IMAGE_LIBRARY}")

# Benchmark
option(BUILD_BENCHMARKS "Build benchmarks" OFF)
if (BUILD_BENCHMARKS)
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-build-alpine
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
FROM --platform=$BUILDPLATFORM alpine:3.18
FROM --platform=$BUILDPLATFORM alpine:3.19

ARG BUILD_PACKAGES="\
clang \
Expand Down Expand Up @@ -36,7 +36,7 @@ ARG LMS_BUILD_TYPE="Release"
RUN \
DIR=/tmp/lms/build && mkdir -p ${DIR} && cd ${DIR} && \
xx-info is-cross && export BUILD_TESTS=OFF || export BUILD_TESTS=ON && \
PKG_CONFIG_PATH=/$(xx-info)/usr/lib/pkgconfig cmake /tmp/lms/ -DCMAKE_INCLUDE_PATH=${PREFIX}/include -DCMAKE_BUILD_TYPE=${LMS_BUILD_TYPE} $(xx-clang --print-cmake-defines) -DCMAKE_PREFIX_PATH=/$(xx-info)/usr/lib/cmake -DBUILD_TESTING=${BUILD_TESTS} -DBUILD_BENCHMARKS=ON && \
PKG_CONFIG_PATH=/$(xx-info)/usr/lib/pkgconfig cmake /tmp/lms/ -DCMAKE_INCLUDE_PATH=/$(xx-info)/usr/include -DCMAKE_BUILD_TYPE=${LMS_BUILD_TYPE} $(xx-clang --print-cmake-defines) -DCMAKE_PREFIX_PATH=/$(xx-info)/usr/lib/cmake -DBUILD_TESTING=${BUILD_TESTS} -DBUILD_BENCHMARKS=ON && \
VERBOSE=1 make -j$(nproc) && \
xx-verify src/lms/lms && \
(xx-info is-cross || make test)
2 changes: 1 addition & 1 deletion Dockerfile-build-arch
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ COPY . /tmp/lms/
ARG LMS_BUILD_TYPE="Release"
RUN \
DIR=/tmp/lms/build && mkdir -p ${DIR} && cd ${DIR} && \
cmake /tmp/lms/ -DCMAKE_BUILD_TYPE=${LMS_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_BENCHMARKS=ON && \
cmake /tmp/lms/ -DCMAKE_BUILD_TYPE=${LMS_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=/usr -DLMS_IMAGE_BACKEND=graphicsmagick -DBUILD_BENCHMARKS=ON && \
VERBOSE=1 make -j$(nproc) && \
make test
33 changes: 22 additions & 11 deletions Dockerfile-release
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.18 AS build
FROM alpine:3.19 AS build

WORKDIR /tmp/workdir

Expand Down Expand Up @@ -30,14 +30,14 @@ ARG BUILD_PACKAGES=" \
boost-dev \
libarchive-dev \
libconfig-dev \
taglib-dev \
utfcpp \
sqlite-dev \
gtest-dev"

RUN apk add --no-cache --update ${BUILD_PACKAGES}

# ffmpeg
ARG FFMPEG_VERSION=4.3.5
ARG FFMPEG_VERSION=6.1.1
RUN \
DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \
curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \
Expand Down Expand Up @@ -67,9 +67,9 @@ RUN \
--enable-libopus \
--enable-libvorbis \
--disable-everything \
--enable-decoder=aac*,ac3*,alac,als,flac,mp3*,libopus,pcm*,libvorbis,wavpack,wma*,libopenjpg,png \
--enable-decoder=aac*,ac3*,alac,als,dsd*,flac,mp3*,libopus,pcm*,libvorbis,wavpack,wma*,libopenjpg,png \
--enable-encoder=libmp3lame,libopus,libvorbis \
--enable-demuxer=aac,aiff,asf,flac,ipod,ogg,matroska,mov,mp3,mp4,wav,wv,webm \
--enable-demuxer=aac,aiff,asf,dsf,flac,ipod,ogg,matroska,mov,mp3,mp4,wav,wv,webm \
--enable-muxer=ogg,matroska,mp3,webm \
--enable-protocol=file,pipe \
--enable-filter=aresample \
Expand All @@ -79,7 +79,7 @@ RUN \
make distclean

# WT
ARG WT_VERSION=4.10.2
ARG WT_VERSION=4.10.4
RUN \
DIR=/tmp/wt && mkdir -p ${DIR} && cd ${DIR} && \
curl -sLO https://github.com/emweb/wt/archive/${WT_VERSION}.tar.gz && \
Expand All @@ -92,14 +92,27 @@ RUN \
make install

# STB
ARG STB_VERSION=5736b15f7ea0ffb08dd38af21067c314d6a3aae9
ARG STB_VERSION=ae721c50eaf761660b4f90cc590453cdb0c2acd0
RUN \
DIR=/tmp/stb && mkdir -p ${DIR} && cd ${DIR} && \
curl -sLO https://github.com/nothings/stb/archive/${STB_VERSION}.tar.gz && \
tar -x --strip-components=1 -f ${STB_VERSION}.tar.gz && \
mkdir -p ${PREFIX}/include/stb && \
cp ./*.h ${PREFIX}/include/stb

# TAGLIB
ARG TAGLIB_VERSION=v2.0.1
RUN \
DIR=/tmp/taglib && mkdir -p ${DIR} && cd ${DIR} && \
curl -sLO https://github.com/taglib/taglib/archive/${TAGLIB_VERSION}.tar.gz && \
tar -x --strip-components=1 -f ${TAGLIB_VERSION}.tar.gz

RUN \
DIR=/tmp/taglib && mkdir -p ${DIR} && cd ${DIR} && \
CXXFLAGS="-I/usr/include/utf8cpp" cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${PREFIX} -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF -DBUILD_BINDINGS=OFF -DBUILD_TESTING=OFF -DTRACE_IN_RELEASE=OFF -DWITH_ZLIB=ON && \
make -j$(nproc) && \
make install

# LMS
COPY . /tmp/lms/
RUN \
Expand Down Expand Up @@ -134,7 +147,7 @@ RUN \
rm -rf /tmp/fakeroot/share/Wt/resources/themes

## Release Stage
FROM alpine:3.18 AS release
FROM alpine:3.19 AS release
LABEL maintainer="Emeric Poupon <[email protected]>"

ARG RUNTIME_PACKAGES=" \
Expand All @@ -154,8 +167,7 @@ ARG RUNTIME_PACKAGES=" \
boost-thread \
libarchive \
libconfig++ \
sqlite-libs \
taglib"
sqlite-libs"

ARG LMS_USER=lms
ARG LMS_GROUP=lms
Expand All @@ -179,4 +191,3 @@ COPY --from=build /tmp/fakeroot/share/lms/lms.conf /etc/lms.conf
EXPOSE 5082

ENTRYPOINT ["/usr/bin/lms"]

2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
```
__Notes__:
* you can customize the installation directory using `-DCMAKE_INSTALL_PREFIX=path` (defaults to `/usr/local`).
* you can customize the image library using `-DIMAGE_LIBRARY=<STB|GraphicsMagick++>`
* you can customize the image library using `-DLMS_IMAGE_BACKEND=<stb|graphicsmagick>` (defaults to `stb`)
```sh
make
```
Expand Down
50 changes: 25 additions & 25 deletions approot/artists.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,11 @@
<!--FORMS message blocks-->

<message id="Lms.Explore.Artists.template">
<div class="mb-3">
<ul class="nav nav-pills mb-2">
<li class="nav-item">
${random class="nav-link"}
</li>
<li class="nav-item">
${starred class="nav-link"}
</li>
<li class="nav-item">
${recently-played class="nav-link"}
</li>
<li class="nav-item">
${most-played class="nav-link"}
</li>
<li class="nav-item">
${recently-added class="nav-link"}
</li>
<li class="nav-item">
${all class="nav-link"}
</li>
</ul>
<div class="row">
<div class="col-lg-3">
${link-type class="form-select"}
</div>
<div class="d-flex justify-content-between align-items-center mb-3">
${link-type class="me-1"}
<div class="d-flex">
${search class="form-control form-control-sm me-1" type="search"}
${sort-mode}
</div>
</div>
${artists}
Expand All @@ -42,4 +22,24 @@
${loading-indicator}
</message>

<message id="Lms.Explore.Artists.template.track-artist-link-type-selector">
<div class="dropdown">
<button class="btn btn-sm btn-outline-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
${selected-item}
</button>
<ul class="dropdown-menu">
<li>${link-type-all class="dropdown-item"}</li>
<li>${link-type-artist class="dropdown-item"}</li>
<li>${link-type-releaseartist class="dropdown-item"}</li>
<li>${link-type-composer class="dropdown-item"}</li>
<li>${link-type-conductor class="dropdown-item"}</li>
<li>${link-type-lyricist class="dropdown-item"}</li>
<li>${link-type-mixer class="dropdown-item"}</li>
<li>${link-type-performer class="dropdown-item"}</li>
<li>${link-type-producer class="dropdown-item"}</li>
<li>${link-type-remixer class="dropdown-item"}</li>
</ul>
</div>
</message>

</messages>
15 changes: 15 additions & 0 deletions approot/explore.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,20 @@
</div>
</message>

<message id="Lms.Explore.template.sort-mode-selector">
<div class="dropdown">
<button class="btn btn-sm btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
${selected-item}
</button>
<ul class="dropdown-menu">
<li>${random class="dropdown-item"}</li>
<li>${starred class="dropdown-item"}</li>
<li>${recently-played class="dropdown-item"}</li>
<li>${most-played class="dropdown-item"}</li>
<li>${recently-added class="dropdown-item"}</li>
<li>${all class="dropdown-item"}</li>
</ul>
</div>
</message>

</messages>
11 changes: 3 additions & 8 deletions approot/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@
<message id="Lms.main.template.navbar">
<nav class="navbar navbar-expand-md navbar-dark bg-dark mb-3">
<div class="container">
<div class="d-flex">
${search class="form-control" type="search"}
</div>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto align-items-md-center mb-lg-0">
<ul class="navbar-nav align-items-md-center me-md-2 mb-2 mb-md-0">
<li class="nav-item">
${releases class="nav-link"}
</li>
Expand All @@ -34,11 +31,9 @@
<li class="nav-item">
${tracklists class="nav-link"}
</li>
<li class="nav-item">
${filters class="nav-link d-flex align-items-center"}
</li>
</ul>
<div class="navbar-nav align-items-md-center mb-lg-0">
${filters class="d-flex align-items-center me-auto mb-2 mb-md-0"}
<div class="navbar-nav align-items-md-center">
${<if-is-admin>}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false" title="${tr:Lms.administration}">
Expand Down
1 change: 1 addition & 0 deletions approot/messages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
<message id="Lms.Explore.duration">Duration</message>
<message id="Lms.Explore.filter-added">Filter added</message>
<message id="Lms.Explore.filters">Filters</message>
<message id="Lms.Explore.media-library">Music Library</message>
<message id="Lms.Explore.most-played">Most played</message>
<message id="Lms.Explore.musicbrainz-artist">MusicBrainz Artist</message>
<message id="Lms.Explore.musicbrainz-release">MusicBrainz Release</message>
Expand Down
1 change: 1 addition & 0 deletions approot/messages_fr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
<message id="Lms.Explore.duration">Durée</message>
<message id="Lms.Explore.filter-added">Filtre ajouté</message>
<message id="Lms.Explore.filters">Filtres</message>
<message id="Lms.Explore.media-library">Bibliothèque musicale</message>
<message id="Lms.Explore.most-played">Plus joués</message>
<message id="Lms.Explore.musicbrainz-artist">MusicBrainz Artist</message>
<message id="Lms.Explore.musicbrainz-release">MusicBrainz Release</message>
Expand Down
2 changes: 2 additions & 0 deletions approot/messages_it.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
<message id="Lms.Admin.ScannerController.status-in-progress">Scansione: passo {1}/{2}</message>
<message id="Lms.Admin.ScannerController.step-checking-for-duplicate-files">Controllo duplicati... {1} files</message>
<message id="Lms.Admin.ScannerController.step-checking-for-missing-files">Controllo file... {1}%</message>
<message id="Lms.Admin.ScannerController.step-compact">Compattazione del database...</message>
<message id="Lms.Admin.ScannerController.step-compute-cluster-stats">Calcolo statistiche... {1}%</message>
<message id="Lms.Admin.ScannerController.step-discovering-files">File trovati: {1} files</message>
<message id="Lms.Admin.ScannerController.step-fetching-track-features">Recupero metadati da AcousticBrainz: {1}/{2} tracce ({3}%)...</message>
Expand Down Expand Up @@ -157,6 +158,7 @@
<message id="Lms.Explore.duration">Durata</message>
<message id="Lms.Explore.filter-added">Filtro aggiunto</message>
<message id="Lms.Explore.filters">Filtri</message>
<message id="Lms.Explore.media-library">Libreria musicale</message>
<message id="Lms.Explore.most-played">Più ascoltati</message>
<message id="Lms.Explore.musicbrainz-artist">Artista MusicBrainz</message>
<message id="Lms.Explore.musicbrainz-release">Album MusicBrainz</message>
Expand Down
1 change: 1 addition & 0 deletions approot/messages_zh.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@

<message id="Lms.Explore.filter-added">过滤器已添加</message>
<message id="Lms.Explore.filters">过滤器</message>

<message id="Lms.Explore.most-played">播放最多</message>
<message id="Lms.Explore.musicbrainz-artist">MusicBrainz 歌手</message>
<message id="Lms.Explore.musicbrainz-release">MusicBrainz 专辑</message>
Expand Down
2 changes: 1 addition & 1 deletion approot/notifications.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<messages xmlns:if="Wt.WTemplate.conditions">

<message id="Lms.notifications.template.entry">
<div class="toast align-items-center ${bg-color} text-${text-color} border-0" role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="${duration}">
<div class="toast align-items-center ${bg-color} text-${text-color} border-0 m-1" role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="${duration}">
<div class="d-flex">
<div class="toast-body">
${message}
Expand Down
28 changes: 6 additions & 22 deletions approot/releases.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,8 @@
<messages xmlns:if="Wt.WTemplate.conditions">

<message id="Lms.Explore.Releases.template">
<div class="mb-3">
<ul class="nav nav-pills mb-2">
<li class="nav-item">
${random class="nav-link"}
</li>
<li class="nav-item">
${starred class="nav-link"}
</li>
<li class="nav-item">
${recently-played class="nav-link"}
</li>
<li class="nav-item">
${most-played class="nav-link"}
</li>
<li class="nav-item">
${recently-added class="nav-link"}
</li>
<li class="nav-item">
${all class="nav-link"}
</li>
</ul>
<div class="btn-group">
<div class="d-flex justify-content-between align-items-start mb-3">
<div class="btn-group me-1">
${play-btn class="btn btn-primary"}
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"/>
<ul class="dropdown-menu">
Expand All @@ -33,6 +13,10 @@
<li>${play-shuffled class="dropdown-item"}</li>
</ul>
</div>
<div class="d-flex">
${search class="form-control form-control-sm me-1" type="search"}
${sort-mode}
</div>
</div>
${releases}
</message>
Expand Down
Loading

0 comments on commit 860efa8

Please sign in to comment.