Do not apply global filters on artist an release views

This commit is contained in:
emeric
2025-12-08 21:00:44 +01:00
parent 40b4096ab0
commit d51ff0a03f
5 changed files with 3 additions and 19 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ The folder must follow a structure defined by Kodi, as detailed [here](https://k
__Note__: If no name is provided in the `artist.nfo` file, the name of the containing folder is used. __Note__: If no name is provided in the `artist.nfo` file, the name of the containing folder is used.
### Filtering ### Filtering
It is possible to apply global filters on your collection using `genre`, `mood`, `grouping`, `language`, and by music library. More tags, including custom ones, can be added in the database administration settings. It is possible to apply global filters on your collection using `genre`, `mood`, `grouping`, `language`, `codec`, and by music library. More tags, including custom ones, can be added in the database administration settings.
__Note__: You can use the `lms-audioinfo` tool to get an idea of the tags parsed by _LMS_. __Note__: You can use the `lms-audioinfo` tool to get an idea of the tags parsed by _LMS_.
+1 -8
View File
@@ -80,11 +80,6 @@ namespace lms::ui
refreshView(); refreshView();
}); });
filters.updated().connect([this] {
_needForceRefresh = true;
refreshView();
});
refreshView(); refreshView();
} }
@@ -96,13 +91,12 @@ namespace lms::ui
const auto artistId{ extractArtistIdFromInternalPath() }; const auto artistId{ extractArtistIdFromInternalPath() };
// consider everything is up to date is the same artist is being rendered // consider everything is up to date is the same artist is being rendered
if (!_needForceRefresh && artistId && *artistId == _artistId) if (artistId && *artistId == _artistId)
return; return;
clear(); clear();
_artistId = {}; _artistId = {};
_trackContainer = nullptr; _trackContainer = nullptr;
_needForceRefresh = false;
if (!artistId) if (!artistId)
throw ArtistNotFoundException{}; throw ArtistNotFoundException{};
@@ -236,7 +230,6 @@ namespace lms::ui
_releaseContainers.clear(); _releaseContainers.clear();
db::Release::FindParameters params; db::Release::FindParameters params;
params.setFilters(_filters.getDbFilters());
params.setArtist(_artistId, { db::TrackArtistLinkType::ReleaseArtist }, {}); params.setArtist(_artistId, { db::TrackArtistLinkType::ReleaseArtist }, {});
params.setSortMethod(LmsApp->getUser()->getUIArtistReleaseSortMethod()); params.setSortMethod(LmsApp->getUser()->getUIArtistReleaseSortMethod());
-1
View File
@@ -76,6 +76,5 @@ namespace lms::ui
ReleaseContainer _appearsOnReleaseContainer{}; ReleaseContainer _appearsOnReleaseContainer{};
InfiniteScrollingContainer* _trackContainer{}; InfiniteScrollingContainer* _trackContainer{};
db::ArtistId _artistId{}; db::ArtistId _artistId{};
bool _needForceRefresh{};
}; };
} // namespace lms::ui } // namespace lms::ui
+1 -8
View File
@@ -255,11 +255,6 @@ namespace lms::ui
refreshView(); refreshView();
}); });
_filters.updated().connect([this] {
_needForceRefresh = true;
refreshView();
});
refreshView(); refreshView();
} }
@@ -271,12 +266,11 @@ namespace lms::ui
const auto releaseId{ extractReleaseIdFromInternalPath() }; const auto releaseId{ extractReleaseIdFromInternalPath() };
// consider everything is up to date is the same release is being rendered // consider everything is up to date is the same release is being rendered
if (!_needForceRefresh && releaseId && *releaseId == _releaseId) if (releaseId && *releaseId == _releaseId)
return; return;
clear(); clear();
_releaseId = {}; _releaseId = {};
_needForceRefresh = false;
if (!releaseId) if (!releaseId)
throw ReleaseNotFoundException{}; throw ReleaseNotFoundException{};
@@ -451,7 +445,6 @@ namespace lms::ui
db::Track::FindParameters params; db::Track::FindParameters params;
params.setMedium(medium->getId()); params.setMedium(medium->getId());
params.setSortMethod(db::TrackSortMethod::TrackNumber); params.setSortMethod(db::TrackSortMethod::TrackNumber);
params.setFilters(_filters.getDbFilters()); // TODO: do we really want to hide all tracks when a release does not match the current label filter?
db::Track::find(LmsApp->getDbSession(), params, [&](const db::Track::pointer& track) { db::Track::find(LmsApp->getDbSession(), params, [&](const db::Track::pointer& track) {
const db::TrackId trackId{ track->getId() }; const db::TrackId trackId{ track->getId() };
-1
View File
@@ -57,6 +57,5 @@ namespace lms::ui
Filters& _filters; Filters& _filters;
PlayQueueController& _playQueueController; PlayQueueController& _playQueueController;
db::ReleaseId _releaseId; db::ReleaseId _releaseId;
bool _needForceRefresh{};
}; };
} // namespace lms::ui } // namespace lms::ui