332 Commits
Author SHA1 Message Date
zarzet d91b3b4d76 feat(home): let Continue listening be left off Home
A tester asked to hide the card. Appearance > Layout gets a switch,
on by default, that removes the card from Home on every layout.
2026-11-17 14:13:37 +07:00
zarzet 7b266ba2e4 feat(downloads): save the album cover as folder.jpg in the album folder
Portable players often do not read the cover inside a song and look for a
folder.jpg beside it. A new Files setting, Save Album Covers (off by
default), saves the cover a download carries into the album's own folder,
with a size choice from the sizes of Embedded Cover Size. The rule of the
animated cover applies: only folders that hold one album get the file, and
one already there stays. A PNG cover is saved as folder.png; other image
formats are not saved.

The folder writing of the animated cover moved to SongFolderFile, which
both covers use for local folders, Android documents and network storage.

While the setting is on, Remove Empty Folders counts folder.jpg and
folder.png as leftovers of a deleted album. While it is off they keep
their folder, as before.

Issue #913
2026-11-17 11:55:17 +07:00
zarzet 7aa2f37496 chore: remove comments that restate the code
One-line doc comments and inline comments that only repeat the name, the
type or the next statement of what they describe, in the Dart, Kotlin and
desktop runner sources. Comments that state a reason, a constraint, a
unit, a value set or a platform quirk stay. No code changes.
2026-11-17 02:06:37 +07:00
zarzet 46011d26e1 feat(settings): name cars in Play when headphones connect
A car over Bluetooth already counted as a connecting output, but nobody
looking for it would open a headphones setting. The title, descriptions
and settings search now mention cars, in English and Indonesian. The
default stays Off.

The Indonesian settings test scrolled to the first segmented control of
the page instead of this one and failed on the Mornye style; it scrolls
to the title now.
2026-11-16 22:49:53 +07:00
zarzet d2669d13c4 feat(convert): choose the resampler quality with a slider
A lossless conversion that changes the sample rate could only pick SWR
or SoXR, each at one fixed setting. Add a quality slider under the
resampler choice, moved by dragging or by a tap anywhere on its track,
with the level named beside it and what it uses below.

SWR offers Fast, Medium, High, Very high and Best (16, 32, 64, 128 and
256 filter taps; the two highest also raise the Kaiser window's
rejection). SoXR offers Medium, High, Very high and Best (16, 20, 28 and
33 bits of precision; 20 and 28 are SoX's HQ and VHQ recipes).

The defaults are what a conversion used before: the library's own SWR
filter (Medium) and the most SoXR offers (Best). A conversion sent to a
paired computer carries the level; one from an older phone gets the
default.
2026-11-16 18:38:13 +07:00
zarzet b5e1117f2c feat(library): list a multi-value genre tag under each of its genres
A tag such as "Rock; Pop" was one genre of its own. Split a tag on
semicolons, commas, the NUL between ID3v2.4 values and the user's own
genre separator, the list rule the tag writer already follows. Slashes
and ampersands stay inside a genre, so "Hip-Hop/Rap" and "R&B" remain
one each.

A genre now counts and lists the songs of every tag that names it. The
song query takes those tags instead of a single one.
2026-11-16 18:00:11 +07:00
zarzet bc6bad5d8b feat(settings): add a Library choice for what tapping a song does
People asked that a tap on a Library song play it rather than open its
details. The owner made playing the new default, with a choice in
Library settings that brings back the old details tap. Saved settings
from before the choice load as Play, and backups carry it through the
settings JSON.
2026-11-16 17:19:17 +07:00
zarzet d5ac6ecf74 perf(lyrics): parse small lyrics without isolate hops
Each native lyrics parse spawned one isolate to UTF-8 encode the text
and another to rebuild the models from the decoded result. For lyrics
up to 64 KB (about 160 word-synced TTML lines) both steps now run on
the calling isolate: measured on the host at that size, encoding takes
about 0.16 ms and rebuilding about 0.2 ms, while sending the decoded map
to an isolate already copies it on the calling isolate and adds a spawn.
The bridge decodes results of this size inline already. Larger lyrics
keep both background steps, and the parsed models are unchanged.
2026-11-16 16:03:33 +07:00
zarzetanditzSho3aib 33fe55a8c7 fix(lyrics): read each lyric line in its own direction (#844)
Finish the right-to-left lyrics from PR #844 on the current lyrics code.

A line's direction now follows the Unicode paragraph rule: its first
strong letter decides, so a Latin line with one Arabic word stays left
to right, and digits, punctuation, marks, emoji or a byte order mark
decide nothing. A line without letters (an instrumental "..." or a gap)
takes its neighbour's direction. The scan is a rune loop over sorted
ranges with an ASCII fast path, in lib/utils/text_direction.dart, and
replaces the PR's any-RTL-character regex and its re-export from
player_lyrics.dart.

- The synced view works the directions out once per set of lyrics,
  with its line keys, and lays every row out in its line's direction,
  so the row cache, reveal, scale, backing vocals and duet alignment
  follow it. Mornye's line measurement uses the same directions.
- The word sweep orders a word's runs by the line's direction and
  sweeps each run the way it is laid out, so a Latin word inside an
  Arabic line fills from its left.
- A translation or pronunciation reads in its own direction and stays
  on its line's side, timed or not. Phrase-aligned pronunciation stays
  off for right-to-left lines.
- Plain lyrics keep one text when every line shares a direction and get
  a text a line when they mix; the directions are cached per lyrics.
- The lyric line under the header reads, and slides, in the line's
  direction: a long Arabic line moves right to bring its end in.
- The editor keeps each field's direction in a notifier that changes
  only with the first letter's script, instead of rebuilding the field
  on every keystroke.
- The share card and mini player use the same rule.

In a right-to-left app a Latin line now reads left to right from the
left edge; the repaint test records that.

Co-authored-by: itzSho3aib <mamomema123@gmail.com>
2026-11-15 23:35:34 +07:00
zarzet 962e582acc chore(flutter): move to Flutter 3.50.0 and the material_ui packages
Flutter 3.50 deprecates its built-in Material and Cupertino libraries in
favour of the material_ui and cupertino_ui packages. The imports move
with the official fix (dart fix, migrate_design_widgets); the app's old
two-library theme bridge collapses into one Theme type.

- MaterialExpressiveScope keeps the complete host theme nearest its
  child. The reduced copy made for the expressive widgets now shares the
  app's Theme type and would hide component themes and extensions.
- LegacyThemeBrightness hands the brightness to the glass package, which
  still reads Flutter's built-in theme.
- appLocalizationsDelegates lists the material_ui localization delegates;
  the generated list still names the built-in ones.
- Tests: findByTooltip and pageBack replace the flutter_test helpers that
  only know the built-in widgets, and several tests that had gone stale
  against earlier app changes are repaired.
2026-11-15 23:33:29 +07:00
zarzet fac1975704 feat(convert): offer ALAC as an automatic conversion format
Auto-convert now offers M4A (ALAC) next to MP3, AAC, Opus and FLAC
(issue 900). ALAC follows the FLAC rules: lossy and DSD sources are
kept, the maximum bit depth, sample rate and Smart Dither settings
apply, and an ALAC file within the limits is left alone. Only the
probed codec marks an .m4a as ALAC, so AAC is never taken for it.

The Dart finalizer reuses the manual ALAC converter and embeds tags as
M4A. The Android background finalizer encodes ALAC with planar
samples into the ipod muxer, keeping tags and artwork, and records the
.m4a container instead of falling back to MP3.
2026-11-15 17:43:22 +07:00
zarzet 09219f683f feat(lyrics): add a Best timing first switch to Lyrics settings
The switch sits under Lyrics Provider Priority and is on by default. On,
the backend takes word-synced lyrics over synced lyrics, and synced over
plain text, from any enabled provider, with provider order deciding
between equals. Off keeps provider order only: the first provider with
lyrics is used.

The setting reaches the backend as the prefer_best_timing fetch option,
so the player's online lyrics and the lyrics fetched for downloads follow
it alike. Settings search finds it next to the provider priority.
2026-11-15 17:30:49 +07:00
zarzet d25e8b3966 feat(player): ask before the volume bar goes above a chosen level
A tester's phone slipped and the volume bar went straight to the top
with earbuds in. A new Confirm loud volume switch in Playback (Volume
and transitions, off by default) picks a level of 60, 70, 80 or 90
percent (80 by default). With it on, dragging, tapping or stepping the
app's volume bar from at or below the level to above it stops at the
level and asks first, with Cancel as the default. Continue sets the
volume where the user asked; the bar then moves freely until the volume
is back at the level or below, and the next crossing asks again.

The dialog takes the touch, so a long drag asks once, and after a
cancel the same touch stays at the level. A volume that is already
above the level (volume buttons, the system, a restored session) does
not ask when the player opens or while the bar moves within the loud
range. The bar asks the same way when it sets the volume of a paired
computer or a USB DAC. Volume buttons, keyboard shortcuts, the mouse
wheel on desktop and commands from a paired device are not limited.

The end of a touch on the expressive slider reports the value it was
last given, which can be a frame old; while the dialog is open that
report no longer moves the bar.
2026-11-15 17:30:01 +07:00
zarzet 08149e559c feat(convert): run SoXR at its highest settings
SoXR conversions used the Very High Quality preset (28 bits). They now
use the library's highest precision (33 bits) with a ripple-free
passband and exact handling of irregular rate ratios (cheby).
2026-11-15 17:07:21 +07:00
zarzet 80c31e21ef fix(lyrics): never step lyrics back on a late position report
Position reports arrive every half second and land a few tens of
milliseconds either side of the lyric clock. One just behind a line's
end brought that line back for a moment: it lit again, and a list
holding on an overlapping line scrolled back and forward again. This
shows with TTML, whose lines carry end times and overlap. The word
sweep stepped back a quarter of the difference on such a report.

The lines now keep the later position they were already set for unless
the report is a seek away, and the sweep closes the difference by
running slightly slow or fast for two seconds instead of stepping.
2026-11-12 01:31:18 +07:00
zarzet a422ffd1ac fix(lyrics): draw playing lyrics a display delay ahead of the audio
Lyrics were drawn for the audio position at the moment of drawing, but
a frame reaches the screen about two refresh intervals later (33 ms at
60 Hz). A line change also waited for the next frame, and a word-timed
line then arrived under a 320 ms fade while its emphasis eased in
slowly. Together TTML lyrics ran 50 to 100 ms behind the sound.

Playing lyrics now change line and sweep words two refresh intervals
ahead of the audio position, scaled by the playback speed. Paused,
loading and scrubbed lyrics still show the exact position. A word-timed
line fades in over 160 ms and brightens at once.
2026-11-12 01:09:39 +07:00
zarzet 6fb6f4f540 fix(usb): play mono on stereo DACs and remember a declined USB prompt
A mono song on a stereo-only DAC now goes out with each sample unchanged
on both channels, tried after the song's own layout and before a lossy
source drops to 16-bit; the first refusal still names the requested
format.

A declined or unanswered USB access prompt is remembered for the session
per DAC (vendor and product id), so later songs report it without
prompting again. Turning the Direct USB driver on, or plugging the DAC in
again, clears it, and the status says so.
2026-11-11 12:17:01 +07:00
zarzet 4b7edf89ce fix(usb): explain Direct USB fallbacks and decode compressed formats
Direct USB reduced every failure to "unsupported", so the app showed one
generic label and a tester with a working DAC could not tell why. It
also played only FLAC, WAV and DSD.

Failure reasons: the native side now reports format_unsupported,
decoder_unavailable, channels_unsupported, dac_format_rejected,
dac_unsupported, dac_open_failed and timeout, with the source codec,
rate, depth and channels. Rust errors are classified by message, and
"No compatible USB format" now names the request and the PCM layouts
the DAC offers, for the log. A file Direct USB cannot play is probed
from its headers before the USB permission prompt, so it reports its
reason without a prompt. The Android 14 mixer and AAudio paths reuse
the source reasons, and the mixer reports a refused rate or depth and
a timeout separately. A source that stops decoding during playback
pauses with decode_failed instead of route_changed.

Formats: with Direct USB, MediaCodec decodes ALAC and FLAC in MP4/Ogg
losslessly, and AAC, MP3, Opus and Vorbis as lossy sources.
Lossless sources up to 16 bits use integer output; 17 to 24-bit
sources use float output, which BitPerfectPcm checks sample by sample.
32-bit lossless sources are refused. Lossy output is rounded to the
DAC's precision without dither, at 24 bits or 16 bits when the DAC
offers nothing deeper. The decoder is primed before the device opens,
so HE-AAC reports its real rate; a later format change stops playback.
Encoder delay and padding are trimmed by frame count, and a seek flushes
the decoder and skips to the exact frame. Multichannel files are
refused, never downmixed. libFLAC and WAV sources are unchanged.

The status label and Audio info mark a decoded lossy source, so a
direct transport is not shown as a bit-perfect lossless chain.
2026-11-11 12:17:01 +07:00
zarzet 8fddd91bf3 feat(player): Speed and pitch sheet and Playback settings row
Adds the Speed and pitch controls: a 0.5x to 2x speed slider with quick
choices, Keep pitch, a pitch slider of -12 to +12 semitones and Reset.
The sliders preview through the shared playbackSpeed and playbackPitch
notifiers while dragging and save on release; playbackTempoSupport
disables what the current output cannot do, with a short note. The
sheet opens as a compact dialog on desktop. Playback settings gets a
row that shows the current values, and settings search finds it.
2026-11-11 01:35:52 +07:00
zarzet 5da029f162 feat(lyrics): read .lrc files next to songs and bilingual LRC translations
Now Playing, the desktop player and lock screen lyrics read only the
lyrics inside the song file, so a WAV or any song with its lyrics in a
.lrc file beside it showed no lyrics, while the song details card did.
The player now reads that .lrc file when the song holds no lyrics of its
own, for local files, Android folders and iOS alike. The song's own
lyrics still come first. Edits and saved translations of .lrc lyrics go
back into the .lrc file instead of the song.

The song details card also reads the .lrc file of an Android document,
which the lyrics reader cannot reach.

Bilingual LRC files time each translation like the line it translates.
When most moments of a song are such a pair, both lyrics parsers now
show the second line as the first line's translation. A few shared
timestamps, such as simultaneous singers, stay separate lines.
2026-11-11 00:56:24 +07:00
zarzet d75d5c92e6 feat(appearance): Interface size setting that scales the whole app
Appearance > Layout gets an Interface size slider, 80% to 130% in 5%
steps, default 100%. AdaptiveUiScaler multiplies it with the automatic
tablet and TV scale, so every page, dialog and control reflows at the
chosen size on phones, tablets and desktop, in both styles. The size
applies when the slider is released.

The scaler keeps its content under a GlobalKey, so starting or stopping
a scale (this setting, or a tablet crossing its breakpoint) keeps open
pages and scroll positions instead of rebuilding the app. The macOS
title bar row divides by the scale so it stays aligned with the native
traffic lights at every size.
2026-11-11 00:25:50 +07:00
zarzet 80197dd32e fix(playback): hide spatial audio on Android TV
TV output goes to HDMI or a soundbar, which the platform spatializer does
not handle, so the row and its settings search entry are hidden there like
Skip silence. The stored setting keeps its default of auto.
2026-11-09 03:00:01 +07:00
zarzet a4a476e44e feat(playback): spatial audio switch for the platform spatializer
A Spatial audio switch in Playback settings, on by default, in the Audio
output group of both styles: after Skip silence on Android, after
exclusive output on macOS, and in its own Audio output group on iOS.
Windows and Linux have no row and no search entry. The app renders
nothing; the switch only tells the platform whether it may spatialize.

- media3: a new `setSpatialAudio` call maps to the audio attributes'
  spatialization behavior (auto or never). It applies live: the sink
  reopens its AudioTrack and drops its buffer, so native seeks to the
  current position to decode that audio again instead of skipping it.
- Old Android engine: the fork takes `setSpatialAudio` on its player
  channel (no platform interface change) and sets the behavior on API
  32+ as each source loads, so a change applies from the next song. The
  subtitle says so while the new engine is off.
- iOS and macOS: the Darwin fork sets allowedAudioSpatializationFormats
  (iOS 14, macOS 11) to mono, stereo and multichannel or to none, on the
  current item and every new one.

The subtitle ends with a live status line. Android reads the
Spatializer (available, enabled, head tracker, and canBeSpatialized for
stereo and 5.1) over a new event channel that re-reads on spatializer,
head tracker and device changes and on resume. iOS reports whether the
output port has spatial audio enabled, on route and spatial capability
changes. The line names the direct USB and AAudio paths and macOS
exclusive output, which never reach the system's spatial audio.
2026-11-09 02:41:48 +07:00
zarzet 0a9eac574d Merge branch 'feat/batch-pq' into feat/batch-int 2026-11-08 19:08:14 +07:00
zarzet 6e6b7de646 fix(playback): offer the headphone resume choice on Android TV too
Hiding `headphoneResume` on Android TV turned the old Play when
headphones connect switch off for TV users who had it on. TVs pair
Bluetooth or USB headphones as phones do, so the choice is now shown,
found by settings search and applied on Android TV in all three modes,
and stays hidden only on desktop. The automation group drops its TV
divider special case.

Tests: TV now behaves like a phone (Reconnect resumes a route-loss
pause and leaves a user pause paused, Always resumes after a user
pause, Off stays paused), the TV settings page shows a migrated Always
and saves a new choice, and desktop hides the row and its search entry.
2026-11-08 19:07:57 +07:00
zarzet 0c5183a8c0 feat(playback): one headphone resume choice with three modes
Play when headphones connect and Resume when headphones reconnect become
one setting, `headphoneResume`, with three choices: Off, Reconnect
(resume a pause caused by headphones or Bluetooth going away, within 30
minutes) and Always (the old switch: every connection resumes, a user
pause included, and a disconnect pauses). The row keeps the old title,
describes the current choice under it and draws the choice with the
DESIGN.md component for 2 to 4 short options: `SettingsSegmentedChoice`
(connected M3 Expressive button group) in Material and
`MornyeSegmentedControl` in Mornye. "Reconnect" is short so the three
segments fit one row on a 360 wide phone in both styles and languages.

Migration: a saved `headphoneResume` wins; otherwise
`playOnHeadphonesConnected: true` reads as Always, then
`resumeOnOutputReconnect: true` as Reconnect, else Off. An unknown value
falls back the same way. `toJson` still writes
`playOnHeadphonesConnected` (true only for Always), so a downgrade or a
backup opened by an older build keeps the broad behaviour, and backups
carry the new key through the full settings map.

The choice is offered and applied on Android and iOS phones and tablets
only: desktop and Android TV hide it (search too) and the player treats
it as Off there. The old switch's strings stay for the title and the
Always description; the two strings only the separate switch used are
removed.
2026-11-08 19:05:03 +07:00
zarzet 98f60e065d Merge branch 'feat/batch-ro' into feat/batch-int 2026-11-08 16:50:00 +07:00
zarzet 46db8c84b8 Merge branch 'feat/batch-sw' into feat/batch-int 2026-11-08 16:50:00 +07:00
zarzet 9af273e45d Merge branch 'feat/batch-sc' into feat/batch-int 2026-11-08 16:50:00 +07:00
zarzet 8ebfbd4ed3 feat(playback): resume when headphones reconnect after a route loss
A Resume when headphones reconnect switch in the Automatic playback
group of Playback settings, off by default, on Android and iOS phones
and tablets (hidden on desktop and Android TV, also from search).

When headphones or a Bluetooth output go away while music plays, the
existing becoming-noisy pause now also records when it happened. If a
headphone-type output (wired, USB, Bluetooth A2DP or LE, hearing aid)
connects again within 30 minutes, that pause resumes once. Any other
transport change clears the record: Pause, Play, a skip or new song,
Stop, an audio interruption, a setting change or Cast. A song that was
already paused is never resumed, and the record lives in memory only,
so nothing resumes after the app was killed. Mute and audio focus still
block the resume, as for the other automations.

It reuses the audio_session device inventory that Play when headphones
connect already reads, so no permission is added. That broader switch
resumes on every connection, a user pause included; while it is on, the
new switch is disabled and its subtitle says it is covered. With both
on, the disconnect pause of the broader switch keeps the route-loss
record, so they do not conflict.

The window check is the pure `resumesNoisyPause`; the clock is
injectable for tests.
2026-11-08 16:45:26 +07:00
zarzet 7573e22fee feat(lyrics): romanize lyrics offline
Lyrics in other alphabets now show how they are sung without an AI key
or a network: Korean (Revised Romanization with liaison,
nasalization, lateralization, aspiration and palatalization), Cyrillic
with one standard per language (Russian, Ukrainian, Belarusian,
Bulgarian, Serbian, Macedonian, Kyrgyz, picked from the letters of the
song), Hindi and Punjabi in the plain lyrics spelling with dropped
inherent vowels, Chinese Hanyu Pinyin with phrase readings for
polyphones, and Japanese kana by Hepburn.

Japanese lines with kanji are not romanized offline: a reading
dictionary does not fit the size budget. Those lines, and scripts the
device cannot romanize (Thai, Arabic and others), are what an AI
translation is asked to romanize when it is set up to; otherwise they
show no romanization. A translation no longer asks the AI to romanize
what the device can.

Pinyin comes from a 259 KB gzipped asset built by
scripts/build_pinyin_data.dart from Unihan (Unicode License v3) and
phrase-pinyin-data (MIT); both notices are in the app's licenses. It
loads on a background isolate the first time Chinese lyrics play.

Word-timed lines keep their timing: the line romanizes as a whole, so
sounds that run across words read right, and each word takes its own
part. The romanization is shown, never saved with the song.

Lyrics settings get Romanize lyrics (it starts as the AI romanization
switch was, so whoever turned that off is not shown romanization) and
Romanization as main line, which shows the romanized text as the line
with the original under it; a word-timed line whose romanization has no
timing keeps its original as the main line.
2026-11-08 16:39:19 +07:00
zarzet 24e31c0312 feat(queue): lock the queue against accidental edits
A lock toggle in the queue header of both styles, also in the Queue
section of Playback settings (where search finds it), saved as the
`queueLocked` setting. While it is on, the queue UIs offer no drag
handles (Material's long-press drag included) and no swipe to remove,
and a reorder that still arrives is ignored. Tapping a song still plays
it, and adding songs from elsewhere (Add to queue, Play next, Autoplay,
a paired device) still works. Neither queue UI has a Clear action, so
there was none to block.

Material: an M3 Expressive toggle icon button (`ExpressiveIconButton`,
selected state) before the Autoplay, Repeat and Shuffle toggles of the
Up next header, in the phone sheet and the desktop inspector. Mornye: a
44 pt icon toggle at the end of the Continue Playing title row, filled
while locked like the queue's mode buttons, on phones and desktop.

The lock covers this device's queue UI only; edits a paired phone sends
to the computer's queue are not blocked by the computer's lock.
2026-11-08 16:37:45 +07:00
zarzet 9dd2188aa1 feat(queue): add songs without queueing duplicates
A No duplicates in queue switch in a new Queue section of Playback
settings, off by default. While it is on, Add to queue, Play next and
adding many songs move an entry already coming up instead of queueing a
second copy, and a batch adds each song once, in its order. The song
playing and the songs before it are never touched, so they can be
queued again.

Identity is where a song plays from (`queueIdentityKey`), not its id or
tags: one file has different ids in the Library, the download history
and a plain path, while a FLAC and an MP3 copy share their tags and are
both meant to be queued. A `file://` URI counts as its path, a SAF
document is matched by provider and document id so a folder-tree URI of
it matches too, and `network://` sources (NAS, Subsonic, a paired
device) and CUE tracks name one song each. Stream URLs compare as is:
one with a fresh token never matches, which keeps a copy rather than
merging two songs.

Every path that adds to the queue goes through `enqueue` and
`enqueueAll`, so Link follows the playing device's own setting: songs a
phone queues on the computer, and a computer queueing a phone's songs
there. Autoplay already leaves out songs coming up and is unchanged.
The moved entry is removed without marking it dismissed for Autoplay,
and the shuffle order and play history follow the removal.
2026-11-08 16:33:35 +07:00
zarzet 6d346534ac feat(library): swipe a song row to play it next or add it to the queue
On phones and tablets a sideways swipe on a library song row runs the
same Play next and Add to queue actions the row's menus offer: toward
the end of the row plays next, toward its start queues last, swapped in
right-to-left layouts. The row follows the finger, ticks at the commit
point, runs the action on release and springs back with a snackbar.

The drag must be at least twice as wide as tall, touches at the screen
edges stay with the system back gestures, and rows inside a draggable
pager or carousel keep the page swipe. Selection mode, desktop and
Android TV have no swipe. Screen readers get both actions as custom
actions on the row. A Library setting, on by default, turns it off.
2026-11-08 16:28:55 +07:00
zarzet 0078332984 feat(scrobbling): scrobble to Libre.fm and ListenBrainz
The Last.fm pipeline becomes a shared Scrobbler base: listening rules,
Now Playing, the durable per-account queue, retry and session expiry
live in lib/services/scrobbling, and each service only signs in and
talks to its API. Every enabled service counts the same listen and
keeps its own queue, store keys and retry timer, so one failing
service never blocks or duplicates another.

Libre.fm reuses the Last.fm 2.0 client and browser approval on its own
server, with its own account and queue. ListenBrainz signs in with the
user token from its settings page, checked with validate-token, and can
point at a compatible self-hosted server. Listens carry the album,
duration and, when tagged, the ISRC and track number.

Last.fm keeps its storage keys and saved format, so a connected account
and its queue carry over without signing in again. Playback settings
show Libre.fm and ListenBrainz next to Last.fm in both styles, and both
are searchable.
2026-11-08 16:27:34 +07:00
zarzet 0b390d60c6 feat(playback): skip silence on the new Android engine
A Skip silence switch in Playback settings, off by default, shown on
Android phones and tablets under the new playback engine. It works only
through media3: while that engine is off the switch is disabled and its
subtitle says why. Changes apply live through a new `setSkipSilence`
call on the media3 channel, sent after `create` and on every change.

media3 skips silence in its audio processor chain, which it bypasses
for float PCM, and it asks every decoder for float once the sink takes
float output. While the setting is on, the renderer therefore asks
decoders for 16-bit PCM and refuses to reuse a decoder set up for the
other mode, so hi-res sources lose their low bits while it is on (the
subtitle says so). A decoder already running keeps its mode: turning
it on mid-song starts skipping from the next song, turning it off
stops at once.

Interplay:
- AutoMix: suspended while AutoMix is on. AutoMix times its fade start
  and beat matching on the clock from analysed file positions, which
  skipping would outrun. The subtitle says so.
- Gapless: `queueNext` stays on the same player, so the trailing and
  leading silence around the handoff is skipped too; the 30 s lead
  leaves the queue call far ahead of the end.
- Position, duration, synced lyrics: media3 reports media time, which
  jumps forward over a skipped passage, so lyrics stay in sync and the
  duration is unchanged.
- Scrobbling and listening statistics count listened wall time, so a
  song with long silences counts slightly less time; the thresholds are
  far from that.
2026-11-08 16:23:27 +07:00
zarzet acaaa7ae94 feat(library): find missing album artwork without a full rescan
Incremental scans now reread songs whose cached cover file is gone, so a
cleared cache no longer needs a full rescan. They also reread every song
without a cover once, so songs scanned before folder images were read
can pick one up.

Find Missing Artwork in Library settings looks up albums without a cover
through the enabled metadata extensions, in their priority order, and in
Mornye can also save animated covers for every album. Matches need the
album artist and title; another edition counts only when the song count
and year agree. Found covers are cached thumbnails that never touch the
music files. They are applied after every scan, come back from their
saved address after the cache is cleared, and are not looked up again
for 30 days. An album page can look its album up on demand or remove
what was found, which stays away until it is looked up again.

Animated covers saved for one artist are shared with the other song
artists of the album through aliases instead of a second download.
2026-11-08 15:36:33 +07:00
zarzet 654479caee fix(lyrics): keep the current line over a late position report
The lyrics move to the next line on a timer when it starts. A position
report that arrived just after, a little behind the line's start, made
the full lyrics view and the lyric line under the title step back to
the previous line for a moment before moving on again. Link playback,
whose reports arrive with network delay, showed it most, and only now
and then.

While playback advances, a report less than 750 ms behind the shown
line keeps it. A seek further back still moves at once.
2026-11-08 05:34:45 +07:00
zarzet 3c20cac699 feat(files): remove the folders a deleted song leaves empty
Deleting songs from the app left their album and artist folders behind,
so people had to clean them up with a file manager. The song's own .lrc
and .mlrc files stayed too, which kept those folders from being empty.

Deleting a song now also deletes its .lrc and .mlrc files, unless
another song in the folder has the same name. Settings > Files >
Existing Files gains Remove Empty Folders, on by default: once a song is
gone, the folders it leaves empty are removed, up to but never including
the download folder or a Local Library folder, and never a storage,
volume or home folder or a folder right inside one, such as Music or
Download. A folder still counts as empty when it only holds system index
files, Mornye's cover.mp4 or lyrics files of songs that are gone.
Folders are removed while the download queue is idle, so a download
never loses the folder it writes into.

Every place that deletes a song from the library goes through this:
the library and album screens, song details, Duplicate Review and
Mornye Link. Android storage access folders work through two new
platform calls that find a song's folders before it is deleted and list
a folder. Network songs and CUE tracks are only deleted, as before.
2026-11-08 02:43:14 +07:00
zarzet 7f6d8436c3 feat(extensions): check the store in the background and auto-update
The Store tab badge stayed at zero until the tab was opened, because
only the tab loaded the store. The shell now checks the store after
startup (once extensions are ready) and again on returning to the
foreground when the last check is older than six hours. Nothing runs
without a saved registry URL, and failures are only logged.

A new App setting, on by default, then updates every installed and
enabled extension whose store update this app version can run. Updates
go one at a time through the store's serialized path, wait for the
download queue to be idle, keep the old version on failure without
retrying that version this session, and end with one short notice.
Background failures stay off the Store and Extensions screens.
2026-11-08 02:21:02 +07:00
zarzet a4bb9278c0 feat(settings): add the new playback engine beta switch 2026-11-08 00:17:44 +07:00
zarzet 9379513549 fix(player): keep the lyric line opt-in and in sync
Follow-up to the lyric line under the track title (PR #847).

- The setting is off by default; Lyrics settings and settings search turn
  it on, with localized English and Indonesian strings.
- Opening the player no longer probes unresolved SAF documents for the
  line. It shows once playback publishes the resolved source, as before.
- The line follows audio_service's extrapolated position, the playback
  speed and the lyrics timing offset, like the desktop mini player. The
  timer targets the next line's start with the 80 ms lead applied, so it
  no longer fires zero-delay timers before each line, and it stops while
  paused, buffering, seeking or offstage.
- With the setting off nothing subscribes to playback.
- A translated line shows as plain text; word timing applies only to the
  original line.
- Text uses the theme's body style, the chevron mirrors in right-to-left
  layouts, alignment is directional and reduced motion skips the fade.
- The line reads as one Lyrics button to screen readers.
- Drops the unrelated Android lint opt-out and .gitignore entry, and uses
  generic test data. New tests cover the default, the offset, timing,
  seeking, and the player waiting for a resolved source.
2026-11-07 21:02:30 +07:00
zarzet 5ec74de01c feat(diagnostics): add renderer and glass level to log exports
Smoothness reports such as issue #841 depend on whether the engine runs
Impeller or Skia and on the Mornye glass level, and neither showed in
copied or shared logs. The export now has a Rendering block with the
renderer (told apart by shader filter support) and the glass level.
2026-11-07 20:14:26 +07:00
zarzet ccd6badec4 perf(desktop): keep resizes from rebuilding Home and hidden tabs
Home's explore sizing read the whole pane size from its state, so every
resize, rail-expand and inspector frame rebuilt the full Home tree. On
desktop the card scale is now the constant it always clamps to, the
height cap and the empty state read MediaQuery.heightOf, and Material
desktop decides tablet type sizes by height alone (its pane is always
wider than 600). Library's cover size takes its desktop constant, and
wideListInset depends on width only.

Material PageView pages now sit in the hidden-tab MediaQuery that Mornye's
LazyTabView already used (exported as HiddenTabMediaQuery), so kept-alive
hidden tabs keep their last size until they show again.

Under reduced motion Flutter's NavigationRail ran its 200 ms extend
animation; a rail per state now snaps to its width.
2026-11-07 20:14:25 +07:00
zarzet 1521620246 feat(autoplay): add a randomness setting and rotate suggestions
Autoplay now remembers which songs it played or suggested, across
restarts, as hashed fingerprints only (no paths, URLs or metadata),
so related songs rotate instead of repeating. A new Autoplay
randomness slider in Playback settings decides how strictly: at the
lowest value repeats return least recent first, higher values widen
the pool and reduce score bias. It works with or without
personalized autoplay, whose description now says that turning it
off stops only preference learning.
2026-11-07 20:12:16 +07:00
zarzet 6c5e727450 feat(lyrics): show the sung line on the lock screen
An opt-in setting replaces the song title in the system media
controls with the current synced lyric line. Only the OS sees it:
the wrapper sits under the media session filter, so Last.fm,
Discord, widgets and Link keep the real title.

Lyrics come from the file and its .mlrc sidecar, never online.
Breaks of 3 s or more show the title, and the title changes at
most twice a second. Android shows lines only while the keyguard
is up and the screen is on; iOS cannot tell, so it shows them
while Mornye is in the background and restates the position first
so Now Playing does not jump back.
2026-11-07 20:12:07 +07:00
zarzet 8fe787a002 feat(convert): let Smart Dither use TPDF HP
Smart Dither only adds dither when lowering bit depth, but it always used
plain TPDF. A new Use TPDF HP switch makes it use high-pass TPDF instead,
in the convert sheet (shown while Smart is selected) and for automatic
FLAC conversion of downloads (under Smart Dither, saved as
autoConvertSmartDitherHighPass). The native Android finalizer, the
Dart FFmpeg path and Mornye Link conversions all honor it; Link sends it
as ditherHighPass, which older desktops ignore. The switch is off by
default, so existing conversions do not change.

The explicit Triangular HP option is now labelled TPDF HP, next to TPDF.
2026-11-07 19:48:04 +07:00
zarzet b379342d6f feat(lastfm): scrobble on Android and iOS
Last.fm was limited to desktop although its listening, queue and browser
approval do not depend on the platform. Playback settings, the settings
search and the player runtime now offer it on phones too, and the Android
and iOS release builds receive the Last.fm credentials.

Phones get a smoother connection. It finishes by itself when the app
comes back from the browser, and the waiting request is kept in secure
storage, so connecting still completes after the system ended the app
while the browser was open. Finish connecting remains the fallback.

The iOS session is readable after the first unlock, so playback that
starts the app in the background while the phone is locked still
scrobbles. Listening time is now counted with a timer only while a song
plays instead of every second while scrobbling is on.
2026-11-07 17:36:30 +07:00
zarzet efe4df0e1f feat(motion): save animated covers as cover.mp4 in album folders
An opt-in Files setting copies a download's animated cover into its
album folder as cover.mp4, so file managers and other players find it.
Only folders that hold one album get it: the folder is planned again
with a marked album name, and flat, artist, playlist and shared Singles
folders are skipped, as is a song kept in a folder other than the
planned one. An existing cover.mp4 is never replaced, for local files,
Android folder access and network storage alike; songs of one album
that finish together write it once.

The player, mini player and album headers now show a cover.mp4 found
beside a local song before the artwork saved for the album. Android
documents are found through a new findSafSibling call and copied into
app storage once per version, since the video player only opens files.
2026-11-07 16:04:21 +07:00
zarzet bbd4332653 feat(lyrics): save AI translation word timing
A saved AI translation kept only its line text, so the word-synced
translation went back to line sync once the AI cache was gone. It now
travels with the lyrics as an [x-translation-words:<ms>:<base64 JSON>]
tag, the same JSON as [x-romaji-words].

- Both lyrics parsers read the new tag, keep it only when its words spell
  the line's translation, and move it with the file's offset. The native
  parser sends translationWords only for lines that have it, so the shared
  goldens stay as they were; a new golden covers the tag.
- Saving into the song file or a .mlrc file writes it, a new translation
  drops timing kept for the old one, and the lyrics editor moves it with
  its line like pronunciation timing.
- A shown translation whose timing the file lacks counts as unsaved, so
  the save action and automatic saving add it.
- Older versions drop the tag as an unknown x- ID tag.
2026-11-07 15:31:38 +07:00