fix(slint): include composer id in blacklist row stamp (match queue predicate)
cc
This commit is contained in:
4 files changed
+41
-6
No files matched your search
@@ -240,14 +240,24 @@ fn to_item(track: &Track) -> TrackItem {
|
||||
if let Some(v) = track.version.as_ref().filter(|v| !v.is_empty()) {
|
||||
title = format!("{title} ({v})");
|
||||
}
|
||||
// Blacklist key: the track's performer id (Qobuz mixes; Task 6).
|
||||
// Blacklist key: the track's performer OR composer id (Qobuz mixes; Task 6).
|
||||
// Composer included so the row greyout matches the queue predicate
|
||||
// (D-FEAT: performer OR composer).
|
||||
let performer_id = track
|
||||
.performer
|
||||
.as_ref()
|
||||
.map(|p| p.id.to_string())
|
||||
.unwrap_or_default();
|
||||
let composer_id = track
|
||||
.composer
|
||||
.as_ref()
|
||||
.map(|c| c.id.to_string())
|
||||
.unwrap_or_default();
|
||||
TrackItem {
|
||||
is_blacklisted: crate::artist_blacklist::stamp_row("qobuz", &[performer_id.as_str()]),
|
||||
is_blacklisted: crate::artist_blacklist::stamp_row(
|
||||
"qobuz",
|
||||
&[performer_id.as_str(), composer_id.as_str()],
|
||||
),
|
||||
id: track.id.to_string().into(),
|
||||
number: "".into(),
|
||||
title: title.into(),
|
||||
|
||||
Reference in new issue
Block a user