diff --git a/CHANGELOG.md b/CHANGELOG.md
index f51554c..0eed1fe 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,12 @@
One section per version, newest first.
+## v0.6.3 (2026-11-04)
+
+### Features
+
+- On the now-playing screen the cover flips around when the next track has a different picture, and settles with a small bounce. Tracks that share a picture do not flip, even on servers such as Navidrome that give every track its own cover id.
+
## v0.6.2 (2026-11-04)
### Bug fixes
diff --git a/Cargo.lock b/Cargo.lock
index 813724c..a369aee 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4385,7 +4385,7 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
[[package]]
name = "remus"
-version = "0.6.2"
+version = "0.6.3"
dependencies = [
"anyhow",
"directories",
diff --git a/Cargo.toml b/Cargo.toml
index 362a0c7..f7db2be 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "remus"
-version = "0.6.2"
+version = "0.6.3"
edition = "2024"
license = "MIT"
diff --git a/flatpak/me.anshorei.Fettleshed.Remus.metainfo.xml b/flatpak/me.anshorei.Fettleshed.Remus.metainfo.xml
index 0083013..a430109 100644
--- a/flatpak/me.anshorei.Fettleshed.Remus.metainfo.xml
+++ b/flatpak/me.anshorei.Fettleshed.Remus.metainfo.xml
@@ -20,6 +20,7 @@
+
diff --git a/src/app.rs b/src/app.rs
index 96cdd6d..3fb22ad 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -128,6 +128,9 @@ enum Setting {
/// How long the UI takes to change from one palette to the next.
const FADE: Duration = Duration::from_millis(800);
+/// How long the now-playing cover takes to turn edge-on, the `in` animation
+/// of the `turned` state in NowPlayingView. The turn back is in the .slint.
+const FLIP_OUT: Duration = Duration::from_millis(170);
/// The palette on screen and the one it is fading towards.
struct Fade {
@@ -199,6 +202,8 @@ struct Covers {
/// Per cover id, whatever size it was decoded at. None for a cover with
/// too little colour to base a palette on.
tones: LruCache>,
+ /// Hash of each decoded cover's pixels, to tell two ids with one picture.
+ prints: LruCache,
pending: HashSet,
failed: HashSet,
limit: Arc,
@@ -247,6 +252,20 @@ pub struct App {
icons: RefCell>>,
settings: Settings,
fade: Fade,
+ /// The now-playing art on screen, `None` when nothing is playing.
+ art_shown: Option,
+ /// Runs while the cover turns away; the new art goes up when it fires.
+ flip_timer: Timer,
+}
+
+/// What the now-playing art shows, to decide whether a track change flips it.
+/// Compared by picture, not by id: Navidrome gives every track its own cover
+/// id even when the whole album shares one image.
+struct ShownArt {
+ /// Cover id of the track the art belongs to.
+ id: Option,
+ /// Hash of the decoded cover, `None` for the letter placeholder.
+ print: Option,
}
impl App {
@@ -282,6 +301,7 @@ impl App {
covers: Covers {
images: LruCache::new(NonZeroUsize::new(400).unwrap()),
tones: LruCache::new(NonZeroUsize::new(400).unwrap()),
+ prints: LruCache::new(NonZeroUsize::new(400).unwrap()),
pending: HashSet::new(),
failed: HashSet::new(),
limit: Arc::new(Semaphore::new(6)),
@@ -302,6 +322,8 @@ impl App {
last_save: Instant::now(),
login_focus: 0,
toast_timer: Timer::default(),
+ art_shown: None,
+ flip_timer: Timer::default(),
prompts: Prompts::Keyboard,
icons: RefCell::default(),
settings: config::load_settings(),
@@ -1449,11 +1471,12 @@ impl App {
None
}
- fn cover_loaded(&mut self, key: CoverKey, result: Result<(SharedPixelBuffer, Option)>) {
+ fn cover_loaded(&mut self, key: CoverKey, result: Result<(SharedPixelBuffer, Option, u64)>) {
self.covers.pending.remove(&key);
match result {
- Ok((buf, tone)) => {
+ Ok((buf, tone, print)) => {
self.covers.images.put(key.clone(), Image::from_rgb8(buf));
+ self.covers.prints.put(key.clone(), print);
// The first size decoded decides: other sizes give a tone that
// differs in the last digits, which would restart the fade.
if !self.covers.tones.contains(&key.0) {
@@ -1463,7 +1486,16 @@ impl App {
}
Err(e) => {
log::debug!("cover {} failed: {e:#}", key.0);
+ // The playing track's art may be waiting on this to flip.
+ let playing = self
+ .current
+ .and_then(|i| self.queue.get(i))
+ .and_then(|s| s.cover_art.as_deref())
+ == Some(key.0.as_str());
self.covers.failed.insert(key);
+ if playing {
+ self.render_player();
+ }
// The playing track's cover failing means the brand palette.
self.update_theme();
return;
@@ -1773,18 +1805,16 @@ impl App {
self.ui.set_np_paused(self.paused);
match song {
Some(s) => {
- let px = self.now_playing_px();
- let cover = s.cover_art.as_deref().and_then(|id| self.cover(id, px));
- self.ui
- .set_np_letter(initial(s.album.as_deref().unwrap_or(&s.title)).into());
- self.ui.set_np_tint(tint(s.album.as_deref().unwrap_or(&s.title)));
- self.ui.set_np_has_cover(cover.is_some());
- self.ui.set_np_cover(cover.unwrap_or_default());
+ self.update_art(&s);
+ self.prefetch_next_cover();
self.ui.set_np_title(s.title.into());
self.ui.set_np_artist(s.artist.unwrap_or_default().into());
self.ui.set_np_album(s.album.unwrap_or_default().into());
}
None => {
+ self.flip_timer.stop();
+ self.ui.set_np_flip_out(false);
+ self.art_shown = None;
self.ui.set_np_has_cover(false);
self.ui.set_np_cover(Image::default());
self.ui.set_np_letter("".into());
@@ -1797,6 +1827,94 @@ impl App {
self.update_theme();
}
+ /// Shows the song's art, flipping the cover if it is a different picture
+ /// from the one on screen. While a changed track's cover loads, the old one
+ /// stays up: the load ends in a render either way, and decides then.
+ fn update_art(&mut self, s: &Song) {
+ if self.flip_timer.running() {
+ // Mid-turn: the midpoint puts up whatever is current then.
+ return;
+ }
+ let Some(shown) = &self.art_shown else {
+ // From nothing playing: no flip, the cover fades in when it loads.
+ self.render_art(s);
+ return;
+ };
+ if shown.id == s.cover_art || self.screen != Screen::NowPlaying {
+ self.render_art(s);
+ return;
+ }
+ let Some(print) = self.art_print(s) else { return };
+ if Some(print) == self.art_shown.as_ref().map(|a| a.print) {
+ log::debug!("same cover picture under a new id, no flip");
+ self.render_art(s);
+ } else {
+ log::debug!("cover picture changed, flipping");
+ self.ui.set_np_flip_out(true);
+ self.flip_timer
+ .start(slint::TimerMode::SingleShot, FLIP_OUT, || with_app(|app| app.flip_in()));
+ }
+ }
+
+ /// The picture the song's art will show: `Some(None)` for the placeholder,
+ /// `None` while its cover is still loading.
+ fn art_print(&mut self, s: &Song) -> Option