Skip to content
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7a4b72a
Fixed warnings
epoupon Sep 20, 2026
a781f68
Fill missing sort names within same audio file (and not only mbid)
epoupon Sep 21, 2026
2c93cc3
Fixed stale release artist sort name left over from v112, ref #870
epoupon Sep 23, 2026
7d8e736
Fixed badly escaped char
epoupon Oct 11, 2026
6f67b73
Refactored db filters to allow more combinations
epoupon Oct 25, 2026
6a9a4c4
Optimized some queries
epoupon Oct 25, 2026
b1d1f1f
Removed useless + bypass as it is worse on analyzed dbs
epoupon Oct 25, 2026
4794762
Simplified cluster group retrieval
epoupon Oct 25, 2026
51367d5
Added a bench
epoupon Oct 25, 2026
8e6a71a
Removed useless stuff
epoupon Oct 25, 2026
b8be026
Moved date range filter
epoupon Oct 25, 2026
ab7b220
Speed up artist name filters with uncorrelated IN subqueries
epoupon Oct 25, 2026
c315693
Speed up relation filters under NOT
epoupon Oct 25, 2026
e6a3187
Use CASE WHEN for all comparisons under NOT
epoupon Oct 25, 2026
10d0cbd
Simplified to filter tracks only: entities match using their tracks a…
epoupon Oct 29, 2026
b55e2ff
Do not apply filters on play buttons
epoupon Oct 30, 2026
0832e72
Prefixed web storage keys with the server instance and the user
epoupon Oct 31, 2026
75ff3e8
Replaced the artist relationship selector with a reusable checkbox list
epoupon Oct 31, 2026
ce6e268
Disabled cache form data
epoupon Nov 1, 2026
2da8ec1
Filters can now match one of several values or none of them, fixes #3…
epoupon Nov 1, 2026
b4ec794
Added missing change
epoupon Nov 1, 2026
6d668ec
Bumped version
epoupon Nov 1, 2026
5e958f7
sort alphabeticalByName album lists by sort name
avdept Oct 21, 2026
3caaca0
sort byGenre album lists by album sort name, like alphabeticalByName
epoupon Nov 1, 2026
e26d57a
use single quotes in admin password reset SQL, fixes #894
epoupon Nov 1, 2026
06f3d8e
Artist names and sort names are now resolved from their tags and arti…
epoupon Nov 2, 2026
d5b0824
Bumped versions in the official docker image
epoupon Nov 2, 2026
954b737
Bumped version for freebsd build
epoupon Nov 2, 2026
a0bf7e5
Fixed official docker image unable to work in read only mode, fixes #891
epoupon Nov 3, 2026
6de0490
Fixed badly applied analyze results
epoupon Nov 5, 2026
ee51ca6
Bumped package versions for automated builds
epoupon Nov 5, 2026
26a664b
Fixed format
epoupon Nov 5, 2026
49e1aaa
Bumped package versions for automated builds
epoupon Nov 5, 2026
95bd334
Added a basic favicon, fixes #585
epoupon Nov 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.12)

project(lms VERSION 3.81.0)
project(lms VERSION 3.82.0)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules/)

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile-release
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.24.1 AS build
FROM alpine:3.24.3 AS build

WORKDIR /tmp/workdir

Expand Down Expand Up @@ -80,7 +80,7 @@ RUN \
make -j$(nproc) install

# WT
ARG WT_VERSION=4.14.1
ARG WT_VERSION=4.15.0
ARG WT_DEBUG=OFF
RUN \
DIR=/tmp/wt && mkdir -p ${DIR} && cd ${DIR} && \
Expand Down Expand Up @@ -146,7 +146,7 @@ RUN \
rm -rf /tmp/fakeroot/share/Wt/resources/themes

## Release Stage
FROM alpine:3.24.1 AS release
FROM alpine:3.24.3 AS release
LABEL maintainer="Emeric Poupon <itmfr@yahoo.fr>"

ARG RUNTIME_PACKAGES=" \
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ sqlite3 /var/lms/lms.db
```
Now force reset the password of the admin user to `adminadmin`:
```sqlite3
UPDATE user SET password_salt="sliIgHUpEoAlBMquivH4VzKXbSzexlvS", password_hash="$2y$07$a0vnQUbGTV/DZyDqOizvbOdCaytNjDhkOPcGoBZup4V0MRKDzOpEG" WHERE id=1;
UPDATE user SET password_salt='sliIgHUpEoAlBMquivH4VzKXbSzexlvS', password_hash='$2y$07$a0vnQUbGTV/DZyDqOizvbOdCaytNjDhkOPcGoBZup4V0MRKDzOpEG' WHERE id=1;
.quit
```
## Deploy on non root path
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ _LMS_ supports an Artist information folder to manage metadata and images for ar

The folder must follow a structure defined by Kodi, as detailed [here](https://kodi.wiki/view/Artist_information_folder). `artist.nfo` files are used to define additional artist information such as biography, sort name, and MusicBrainz ArtistID. See the format [here](https://kodi.wiki/view/NFO_files/Artists).

The canonical artist name used by _LMS_ is the one specified in the `artist.nfo` file; If an `artist.nfo` exists but does not provide a name, the name of the containing folder is used.
If no artist info file is provided, _LMS_ will pick the artist name found on the latest release.
The canonical artist name used by _LMS_ is the one specified in the `artist.nfo` file; If an `artist.nfo` exists but does not provide a name, the name of the containing folder is used. The same goes for the sort name, when the `artist.nfo` file provides one.
Otherwise, _LMS_ picks the artist name and sort name found in the most recent album artist tags, then in the most recent artist tags of any kind, tags matched using a MusicBrainz ArtistID first. Artists without a MusicBrainz ArtistID keep their name, as it is what identifies them.

## Excluding files from scan
Place a `.lmsignore` file at the root of a media library to exclude files or directories from scanning.
Expand Down
17 changes: 9 additions & 8 deletions approot/explore.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,33 @@
</message>

<message id="Lms.Explore.template.filters">
${add-filter class="btn btn-sm btn-outline-primary me-2"}${clusters class="d-inline-block align-items-center"}
${add-filter class="btn btn-sm btn-outline-primary me-2"}${filters class="d-inline-block align-items-center Lms-filters"}
</message>

<message id="Lms.Explore.template.add-filter">
<div class="modal fade" tabindex="-1">
<div class="modal-dialog">
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">${tr:Lms.Explore.add-filter}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form class="row g-3">
<div class="row g-3">
<div class="col-12">
<label class="form-label" for="${id:type}">
${tr:Lms.Explore.type}
</label>
${type class="form-control"}
</div>
<div class="col-12">
<label class="form-label" for="${id:value}">
${tr:Lms.Explore.value}
</label>
${value class="form-control"}
${match class="form-control"}
</div>
<div class="col-12">
<div class="form-label">${tr:Lms.Explore.value}</div>
${value}
</div>
</form>
</div>
</div>
<div class="modal-footer">
${add-btn class="btn btn-primary me-1"}${cancel-btn class="btn btn-secondary"}
Expand Down
5 changes: 5 additions & 0 deletions approot/messages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@
<message id="Lms.Explore.download">Download</message>
<message id="Lms.Explore.duration">Duration</message>
<message id="Lms.Explore.filter-added">Filter added</message>
<message id="Lms.Explore.filter-none-of">is not one of</message>
<message id="Lms.Explore.filter-not">not {1}</message>
<message id="Lms.Explore.filter-one-of">is one of</message>
<message id="Lms.Explore.filter-or">{1} or {2}</message>
<message id="Lms.Explore.filter-tooltip">{1}: {2}</message>
<message id="Lms.Explore.filters">Filters</message>
<message id="Lms.Explore.genre">
<plural case="0">Genre</plural>
Expand Down
5 changes: 5 additions & 0 deletions approot/messages_es.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@
<message id="Lms.Explore.download">Descargar</message>
<message id="Lms.Explore.duration">Duración</message>
<message id="Lms.Explore.filter-added">Filtro añadido</message>
<message id="Lms.Explore.filter-none-of">no es uno de</message>
<message id="Lms.Explore.filter-not">excepto {1}</message>
<message id="Lms.Explore.filter-one-of">es uno de</message>
<message id="Lms.Explore.filter-or">{1} o {2}</message>
<message id="Lms.Explore.filter-tooltip">{1}: {2}</message>
<message id="Lms.Explore.filters">Filtros</message>
<message id="Lms.Explore.genre">
<plural case="0">Género</plural>
Expand Down
5 changes: 5 additions & 0 deletions approot/messages_fr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@
<message id="Lms.Explore.download">Télécharger</message>
<message id="Lms.Explore.duration">Durée</message>
<message id="Lms.Explore.filter-added">Filtre ajouté</message>
<message id="Lms.Explore.filter-none-of">n'est pas parmi</message>
<message id="Lms.Explore.filter-not">sauf {1}</message>
<message id="Lms.Explore.filter-one-of">est parmi</message>
<message id="Lms.Explore.filter-or">{1} ou {2}</message>
<message id="Lms.Explore.filter-tooltip">{1} : {2}</message>
<message id="Lms.Explore.filters">Filtres</message>
<message id="Lms.Explore.genre">
<plural case="0">Genre</plural>
Expand Down
5 changes: 5 additions & 0 deletions approot/messages_it.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@
<message id="Lms.Explore.download">Download</message>
<message id="Lms.Explore.duration">Durata</message>
<message id="Lms.Explore.filter-added">Filtro aggiunto</message>
<message id="Lms.Explore.filter-none-of">non è uno tra</message>
<message id="Lms.Explore.filter-not">tranne {1}</message>
<message id="Lms.Explore.filter-one-of">è uno tra</message>
<message id="Lms.Explore.filter-or">{1} o {2}</message>
<message id="Lms.Explore.filter-tooltip">{1}: {2}</message>
<message id="Lms.Explore.filters">Filtri</message>
<message id="Lms.Explore.genre">
<plural case="0">Genere</plural>
Expand Down
5 changes: 5 additions & 0 deletions approot/messages_pl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@
<message id="Lms.Explore.download">Pobierz</message>
<message id="Lms.Explore.duration">Długość</message>
<message id="Lms.Explore.filter-added">Filtr dodany</message>
<message id="Lms.Explore.filter-none-of">nie jest jednym z</message>
<message id="Lms.Explore.filter-not">oprócz {1}</message>
<message id="Lms.Explore.filter-one-of">jest jednym z</message>
<message id="Lms.Explore.filter-or">{1} lub {2}</message>
<message id="Lms.Explore.filter-tooltip">{1}: {2}</message>
<message id="Lms.Explore.filters">Filtry</message>
<message id="Lms.Explore.genre">
<plural case="0">Gatunek</plural>
Expand Down
5 changes: 5 additions & 0 deletions approot/messages_zh.xml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@
<message id="Lms.Explore.download">下载</message>
<message id="Lms.Explore.duration">时长</message>
<message id="Lms.Explore.filter-added">过滤器已添加</message>
<message id="Lms.Explore.filter-none-of">不是以下之一</message>
<message id="Lms.Explore.filter-not">排除 {1}</message>
<message id="Lms.Explore.filter-one-of">是以下之一</message>
<message id="Lms.Explore.filter-or">{1} 或 {2}</message>
<message id="Lms.Explore.filter-tooltip">{1}:{2}</message>
<message id="Lms.Explore.filters">过滤器</message>
<message id="Lms.Explore.genre">流派</message>
<message id="Lms.Explore.grouping">分组</message>
Expand Down
12 changes: 12 additions & 0 deletions approot/misc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
${loading-indicator}
</message>

<message id="Lms.check-list.template">
${search class="form-control mb-2"}
${rows}
</message>

<message id="Lms.check-list.template.rows">
${elements class="list-group"}
${loading-indicator}
</message>

<message id="Lms.check-list.template.row"><label class="d-block px-3 py-2">${checkbox class="form-check-input me-2"}${text}</label></message>

<message id="Lms.template.trash-btn"><i class="fa fa-fw fa-trash"></i></message>
<message id="Lms.template.delete-btn"><i class="fa fa-fw fa-times"></i></message>
<message id="Lms.template.edit-btn"><i class="fa fa-fw fa-edit"></i></message>
Expand Down
6 changes: 2 additions & 4 deletions approot/settings-ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
</div>
</div>
<div class="col-12">
<label class="form-label" for="${id:inline-artist-relationships}">
${tr:Lms.Settings.inline-artist-relationships}
</label>
${inline-artist-relationships class="form-control"}
<div class="form-label">${tr:Lms.Settings.inline-artist-relationships}</div>
${inline-artist-relationships}
<div class="invalid-feedback">
${inline-artist-relationships-info}
</div>
Expand Down
13 changes: 13 additions & 0 deletions docroot/css/lms.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ body {
cursor: pointer;
}

.Lms-badge-none-of {
outline: 2px solid var(--bs-danger);
outline-offset: 1px;
}

/* The full text is in the tooltip */
.Lms-filters .badge {
max-width: 30em;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: middle;
}

.Lms-entry-playing {
background-color: #0d4655!important;
}
Expand Down
18 changes: 0 additions & 18 deletions src/libs/audio/test/TestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,12 @@

#include <array>
#include <fstream>
#include <random>

#include "audio/IAudioDecoder.hpp"
#include "audio/PcmTypes.hpp"

namespace lms::audio::tests
{
ScopedTmpDirectory::ScopedTmpDirectory()
: _path{ std::filesystem::temp_directory_path() / ("lms-audio-test-" + std::to_string(std::random_device{}())) }
{
std::filesystem::create_directories(_path);
}

ScopedTmpDirectory::~ScopedTmpDirectory()
{
std::error_code ec;
std::filesystem::remove_all(_path, ec);
}

std::filesystem::path ScopedTmpDirectory::operator/(std::string_view fileName) const
{
return _path / fileName;
}

void writeFile(const std::filesystem::path& path, std::span<const std::byte> data)
{
std::ofstream os{ path, std::ios::binary };
Expand Down
19 changes: 3 additions & 16 deletions src/libs/audio/test/TestUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,13 @@
#include <cstdint>
#include <filesystem>
#include <span>
#include <string_view>
#include <vector>

#include "core/ScopedTmpDirectory.hpp"

namespace lms::audio::tests
{
// A private directory removed on destruction, for a test to write scratch files into
class ScopedTmpDirectory
{
public:
ScopedTmpDirectory();
~ScopedTmpDirectory();

ScopedTmpDirectory(const ScopedTmpDirectory&) = delete;
ScopedTmpDirectory& operator=(const ScopedTmpDirectory&) = delete;

std::filesystem::path operator/(std::string_view fileName) const;

private:
std::filesystem::path _path;
};
using core::ScopedTmpDirectory;

void writeFile(const std::filesystem::path& path, std::span<const std::byte> data);

Expand Down
1 change: 1 addition & 0 deletions src/libs/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ add_library(lmscore STATIC
impl/Path.cpp
impl/Random.cpp
impl/RecursiveSharedMutex.cpp
impl/ScopedTmpDirectory.cpp
impl/String.cpp
impl/TraceLogger.cpp
impl/UUID.cpp
Expand Down
47 changes: 47 additions & 0 deletions src/libs/core/impl/ScopedTmpDirectory.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright (C) 2026 Emeric Poupon
*
* This file is part of LMS.
*
* LMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/

#include "core/ScopedTmpDirectory.hpp"

#include <cstdlib>
#include <stdexcept>
#include <string>

namespace lms::core
{
ScopedTmpDirectory::ScopedTmpDirectory(std::string_view prefix)
{
std::string pathTemplate{ (std::filesystem::temp_directory_path() / (std::string{ prefix } + "XXXXXX")).string() };
if (!::mkdtemp(pathTemplate.data()))
throw std::runtime_error{ "Cannot create temporary directory from " + pathTemplate };

_path = pathTemplate;
}

ScopedTmpDirectory::~ScopedTmpDirectory()
{
std::error_code ec;
std::filesystem::remove_all(_path, ec);
}

std::filesystem::path ScopedTmpDirectory::operator/(std::string_view fileName) const
{
return _path / fileName;
}
} // namespace lms::core
9 changes: 9 additions & 0 deletions src/libs/core/impl/media/Codec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,13 @@ namespace lms::core::media

return *it;
}

std::optional<Codec> findCodec(std::string_view name)
{
const auto it{ std::find_if(codecDescs.begin(), codecDescs.end(), [name](const auto& desc) { return desc.name.str() == name; }) };
if (it == codecDescs.end())
return std::nullopt;

return it->type;
}
} // namespace lms::core::media
44 changes: 44 additions & 0 deletions src/libs/core/include/core/ScopedTmpDirectory.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright (C) 2026 Emeric Poupon
*
* This file is part of LMS.
*
* LMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#include <filesystem>
#include <string_view>

namespace lms::core
{
// A tmp directory removed on destruction
class ScopedTmpDirectory
{
public:
// The directory name is the prefix followed by a unique suffix
explicit ScopedTmpDirectory(std::string_view prefix = "lms-");
~ScopedTmpDirectory();

ScopedTmpDirectory(const ScopedTmpDirectory&) = delete;
ScopedTmpDirectory& operator=(const ScopedTmpDirectory&) = delete;

const std::filesystem::path& getPath() const { return _path; }
std::filesystem::path operator/(std::string_view fileName) const;

private:
std::filesystem::path _path;
};
} // namespace lms::core
Loading
Loading