diff --git a/src/model/track.rs b/src/model/track.rs index 63c68fcb..95db9c60 100644 --- a/src/model/track.rs +++ b/src/model/track.rs @@ -34,6 +34,7 @@ pub struct Track { pub added_at: Option>, pub list_index: usize, pub is_local: bool, + pub is_playable: Option, } impl Track { @@ -71,6 +72,7 @@ impl Track { added_at: None, list_index: 0, is_local: track.is_local, + is_playable: track.is_playable, } } @@ -109,6 +111,7 @@ impl From<&SimplifiedTrack> for Track { added_at: None, list_index: 0, is_local: track.is_local, + is_playable: track.is_playable, } } } @@ -149,6 +152,7 @@ impl From<&FullTrack> for Track { added_at: None, list_index: 0, is_local: track.is_local, + is_playable: track.is_playable, } } } diff --git a/src/ui/listview.rs b/src/ui/listview.rs index 479101a7..485b659d 100644 --- a/src/ui/listview.rs +++ b/src/ui/listview.rs @@ -221,6 +221,7 @@ impl View for ListView { let currently_playing = item.is_playing(&self.queue) && self.queue.get_current_index() == Some(i); let is_local = item.track().map(|t| t.is_local).unwrap_or_default(); + let is_playable = item.track().map(|t| t.is_playable).unwrap_or_default(); let style = if self.selected == i { if currently_playing { @@ -241,7 +242,7 @@ impl View for ListView { ColorType::Color(*printer.theme.palette.custom("playing").unwrap()), ColorType::Color(*printer.theme.palette.custom("playing_bg").unwrap()), ) - } else if is_local { + } else if is_local || is_playable == Some(false) { ColorStyle::secondary() } else { ColorStyle::primary()