Skip to content

Sleep timer, self-updating playlist downloads and smaller download qualities - #166

Merged
elcapitantommy merged 2 commits into
mainfrom
claude/project-thread-addypn
Oct 20, 2026
Merged

elcapitantommy merged 2 commits into
mainfrom
claude/project-thread-addypn

Conversation

@elcapitantommy

Copy link
Copy Markdown
Owner

Requested by Tom · project thread

Before: you couldn't make the music stop by itself. A downloaded playlist only picked up changes when you opened it and tapped Update download, and every download was saved as the original file, so a FLAC album filled a phone quickly.

After: Now Playing has a moon button for a sleep timer. It pauses after 15, 30 or 45 minutes, 1 or 1.5 hours, or at the end of the current song. Downloaded playlists update themselves: songs you add download, and songs you take out are deleted from the phone. The Downloads page has a Download quality choice of Original, High (MP3 320 kbps) or Space saver (MP3 128 kbps).

How:

  • Sleep timer (src/stores/sleepTimer.ts, src/components/SleepTimer.tsx). A timeout pauses playback, and every progress update also checks the clock, because phones hold back timers in hidden pages. With "End of this song" set, the player skips the early crossfade or gapless hand-over and then moves to the next song paused (next({ pause: true })). The timer is in memory only, and it's hidden while you're controlling another device.
  • Playlist sync (syncPlaylists in src/stores/downloads.ts). Each downloaded playlist is checked with getPlaylist when Tomify opens, comes back online, or returns to the foreground (at most once every 15 minutes). The check waits while the phone reports mobile data or data saver. Collections now store the playlist owner, so shared playlists can be checked too. A playlist the server no longer has keeps its downloaded songs.
  • Download quality (src/stores/downloadQuality.ts). The two smaller options use Navidrome's stream.view?format=mp3&maxBitRate=…. Each saved song records its quality. Songs already saved keep theirs, and a retried song uses the quality chosen at the time.
  • README and docs/ROADMAP.md are updated, and tests are added for all three features. The full suite passes, along with typecheck, lint and build.

Generated by Claude Code

Pauses this device after 15 to 90 minutes, or at the end of the song
playing now (no early crossfade; the next song is left ready to play).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3tfYRTe4gH7NkHvQymDWc
Downloaded playlists are checked against the server when Tomify opens,
comes back online or returns to the foreground: new songs download and
removed ones are let go. A per-device Download quality picks Original,
MP3 320 or MP3 128 (made by Navidrome) for new downloads.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3tfYRTe4gH7NkHvQymDWc
@elcapitantommy elcapitantommy self-assigned this Oct 20, 2026
@elcapitantommy
elcapitantommy merged commit 38c6bc3 into main Oct 20, 2026
2 checks passed
@elcapitantommy
elcapitantommy deleted the claude/project-thread-addypn branch October 20, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants