mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-18 09:24:19 +02:00
fix(navidrome): always filter by id instead of value
This commit is contained in:
@@ -100,9 +100,6 @@ const EXCLUDED_SONG_TAGS = new Set<string>(['disctotal', 'tracktotal']);
|
|||||||
const numericSortCollator = new Intl.Collator(undefined, { numeric: true });
|
const numericSortCollator = new Intl.Collator(undefined, { numeric: true });
|
||||||
const collator = new Intl.Collator();
|
const collator = new Intl.Collator();
|
||||||
|
|
||||||
// Tags that use IDs as values as opposed to the tag value
|
|
||||||
const ID_TAGS = new Set<string>(['albumversion', 'mood']);
|
|
||||||
|
|
||||||
const excludeMissing = (server?: null | ServerListItemWithCredential) => {
|
const excludeMissing = (server?: null | ServerListItemWithCredential) => {
|
||||||
if (!server) {
|
if (!server) {
|
||||||
return undefined;
|
return undefined;
|
||||||
@@ -965,13 +962,13 @@ export const NavidromeController: InternalControllerEndpoint = {
|
|||||||
if (!EXCLUDED_TAGS.has(tag.tagName)) {
|
if (!EXCLUDED_TAGS.has(tag.tagName)) {
|
||||||
if (tagsToValues.has(tag.tagName)) {
|
if (tagsToValues.has(tag.tagName)) {
|
||||||
tagsToValues.get(tag.tagName)!.push({
|
tagsToValues.get(tag.tagName)!.push({
|
||||||
id: ID_TAGS.has(tag.tagName) ? tag.id : tag.tagValue,
|
id: tag.id,
|
||||||
name: tag.tagValue,
|
name: tag.tagValue,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
tagsToValues.set(tag.tagName, [
|
tagsToValues.set(tag.tagName, [
|
||||||
{
|
{
|
||||||
id: ID_TAGS.has(tag.tagName) ? tag.id : tag.tagValue,
|
id: tag.id,
|
||||||
name: tag.tagValue,
|
name: tag.tagValue,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user