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.
Starting a song from a granted Android folder looked for the .mlrc file,
the .lrc file and cover.mp4 with three separate native calls, each
resolving the song's parent again and listing the whole folder to find one
name. Big flat folders paid that three times on every song start.
One native call now resolves the parent once, reads the song's name once
and finds every wanted name in a single listing, returning uri, size and
modification time for each file that exists. A small Dart lookup shares
that answer between the lyrics sidecar reads and the motion cover lookup
for a few seconds, so one song start lists the folder once while a later
start of the same song asks again. Writing a sidecar or a tag change of
the song forgets the shared answer. Sidecar contents are read by document
uri only for files that exist, with the same 8 MB cap. Name rules are
unchanged and now live in a pure helper with JVM tests.
Lyrics synced by hand in the editor for a document (SAF) song came back
unsynced after leaving the song and returning to it. The song played from
a cached copy made before the edit: a tag change only retired network
copies, so the next play reused the old copy and the player read the old
lyrics from it.
A tag change now retires the song's playback copies, as ReplayGain edits
already did, and the queue item no longer names the old copy, so probes
read the document until playback makes a fresh copy. The player's lyrics
reload from the changed document itself, and only when its tags were read
before. A copy an edit retires stays on disk until no deck holds it, so a
song that plays, or is about to open its copy, keeps its file.
Ported from PR #859 onto the current metadata listener; the editor save
pinning in that PR is already here as PlayerLyricsEdit.
Co-authored-by: re-code <re-code-dev@proton.me>
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.
A single song's re-enrich now shows each change with the current and
new value and its own switch before anything is written. A smaller
cover, and an empty value over one the song has, start switched off.
Apply writes only the switched-on fields; Cancel writes nothing.
Every re-enrich write first saves what it replaces. The result offers
Undo (Undo all for a batch), and the song's menu offers Undo re-enrich
while the state is kept. Undo writes back through the metadata editor,
so it reaches the same storage as re-enrich.
The song page now writes through the Library's re-enrich runner
instead of its own FFmpeg copy, which also stops it dropping tags it
does not manage.
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.
Re-enriching one song, from its page or from a one-song Library
selection, now lists the online results instead of applying a guess:
results that fit come first, with their source and how well they fit,
and the rest stay folded under Other results.
A batch review lists the songs no result fitted well enough to apply on
its own with a Choose a result row, and every matched song can change
its result. Edit Metadata > Auto-fill searches the same way, so both
rank and list results alike.
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.
Saving a lyrics translation now covers every kind of lyrics:
- Plain lyrics can be translated on request. Each line's pronunciation
and translation show under it. Automatic translation stays synced-only.
- AI pronunciation is saved too, with its word timing, as x-romaji and
x-romaji-words tags next to the translation.
- A new .mlrc file next to the song keeps its lyrics with their
translation and pronunciation and leaves the audio file as it is. It is
UTF-8 LRC that starts with [x-mlrc:1]. Supplement tags are keyed by
line time, or by line index for lyrics without timing. TTML is written
as enhanced LRC with voices and backing vocals. The player reads it next
to local and Android document songs and lays it over the song's lyrics
by line text.
- AI Translation settings gain a Files section: Save To picks the song
file or a .mlrc file, and Save Automatically saves each shown
translation without a snackbar. TTML and plain lyrics always go to
.mlrc. Saving into the song file also refreshes an existing .mlrc.
- Android reads and writes the sidecar through new SAF calls, and the
.lrc sidecar write shares the same code.
Snapshot the original draft and writable source when opening the lyrics editor, and keep saves bound to that track after playback advances or stops. Disable live timing controls for other tracks and cover file, SAF, and asynchronous save races with regression tests.
Shelves that overflow their pane offer Show all, a grid that keeps
loading pages.
An artist page now saves a copy once loaded. When the provider cannot be
reached it shows that copy with a note, and albums open from the Library
where they exist. An artist never opened online has no saved page. Library
artist pages link to the full page.
Float Lyrics and Up Next as a slim glass panel over the pane while the
window is not full screen, with no title bar and the capsule beside it.
Give the desktop player More and Favorite discs, Music's menu, and shuffle
and repeat at the transport's ends. Set Home's desktop text at Music's
smaller sizes.
Playlist, Loved and Wishlist selections can play the selected songs, play
them next or add them to the queue, and delete their local audio files
after a confirmation that says every playlist using them is affected.
Removing entries from the collection keeps the files and stays a plain
action. Phones end the bar with the full-width delete button and desktop
keeps it beside Remove, as in the Library selection bar; the desktop row
menu offers the same actions.
Adds a lyrics editor for the playing track (issue #801). It opens from the
lyrics options button (now also shown over plain lyrics) and from a Write
lyrics action when a track has none: a full-height sheet on phones, a
720dp editor dialog on desktop.
Each line has its time, which plays from there, and an editable text.
Set time gives the selected line the current position and moves to the
next one, so a song can be synced while it plays; -0.1 and +0.1 nudge the
selected line. Lines can be inserted, deleted or cleared of their time
from a row menu, also on right click.
The editor edits the raw LRC, so tags, singer prefixes, backing vocals,
translations and enhanced word timing survive a save; word timing moves
with its line and is dropped from a line whose text changes. An [offset:]
tag is applied to the times. Saving embeds the lyrics in the original
file through the existing player lyrics persistence and shows them at
once. Streams, TTML and network songs that are not SMB or WebDAV stay
read-only.
Keep normalized collection match keys and filtered suggestions across page rebuilds. Snapshot candidate identities and history membership so edits and in-place list changes invalidate derived results, and sort playlist seeds once per collection snapshot.
Host widget checks reduce match-field reads from 3000 to zero over five rebuilds of a 200-track collection. All 170 scoped tests pass, with clean lib/test analysis and formatting.
Add FLAC auto-conversion with maximum bit depth and sample rate in foreground and Android background downloads. Preserve lower source rates, artwork, metadata and output quality.
Keep 48 kHz available for mixed-source batch conversion and add 160 kbps to manual, batch and automatic conversion.
Validation: 122 Flutter tests and 26 Android JVM tests passed. Analysis of lib and test passed.
The visible history membership of an open album, playlist or artist
page rebuilt on every history state change (each completion, each
coalesced index bump, each count refresh) and re-derived, for every
track, the Spotify ID candidates (a set, a lowercase pass and a URI
parse), the trimmed ISRC, the title and artist key and the lookupKey
string. Desktop pages rebuilt the lookupKey list again per build.
The request snapshot now caches its lookupKeys, the visible-membership
notifier derives each track's in-memory index keys once per request,
and it returns its previous set when neither the lookup items (which
own the indexes) nor the persisted keys changed. DownloadHistoryState
exposes its title and artist key and an index read by that key. Album,
playlist and artist pages read the cached keys.
Same sets as before: tests compare against a copy of the old per-track
matching over tricky IDs, ISRCs, case and 300 random rounds. Host, a
1,000-track page with 100 history items: a change of the lookup items
went from about 990 us to 185 us, a count or revision change from
about 990 us to 22 us, and 31 history changes read no track field.
A Loved or playlist song of a network connection now stores its
network:// cover reference, and three paths handled it poorly:
- A song that resolves to a local file (a later download, or a Library
match) played with the reference as its artwork, which blocked the
embedded cover recovery and fetched over the connection while the
local file played. The reference now applies only to a network
source; a local file shows its own cover as before.
- Go to album passed the reference into album pages and recents, which
load covers over http only, so the page showed a failed cover instead
of the provider's. It now passes http covers only; a store path never
loaded there either.
- The writer compared the shown cover against the default store, while
the player chose it with its runtime's store. The player provider and
the media controls now pass the runtime's store. It is the same
object in production.
Add paired-phone actions for deletion, metadata editing and re-enrichment, conversion, ReplayGain, and cover or lyrics export. Run serial desktop jobs with progress, cancellation between songs, retry deduplication, and status recovery after reconnecting.
Review re-enrichment before applying it, resolve catalog IDs against current records, and refresh metadata and artwork on both devices. Support batches of up to 100 songs from one computer.
Validation: 163 Flutter tests passed, scoped analysis and pinned formatting passed, and git diff --check is clean.
Try the external browser first when selected, retain in-app authentication and browser fallbacks, and stop fallback launches after cancellation.
Add regression coverage for iOS preferences, launch failures and desktop routing. Fixes#729.
Loved songs, playlists, Android Auto collections, track rows, the
collection metadata screen and the Home On repeat shelf still matched
tracks to scanned files after Local Library was switched off. They now
use downloads only until it is on again.
Eight one-line re-export files remained from an earlier move into controllers, models and providers. Every import now points at the real file, so the shims are deleted.
Forty-two call sites spelled out Navigator.push with a MaterialPageRoute
around a builder; one helper next to pushViaPreferredNavigator keeps the
same route type and builder closure with fewer lines.
Thirteen hand-written cancel/confirm dialogs in the batch actions, track
metadata, setup, statistics, extension and queue selection code now use the
shared helper with the same flags and styles. Every caller only acted on a
true result, so the helper's false-on-dismiss keeps their behavior.
Album, playlist and artist pages each rebuilt the same select all toggle
around SelectionBottomBar; SelectionModeMixin.buildSelectionBar now does it
once. The Library selection bar's mobile delete reuses
DestructiveSelectionButton with its own label.
The collapsing title flip used setState, rebuilding the whole album,
playlist, artist or track metadata page mid-scroll. The mixin now keeps the
flag in a ValueNotifier that these headers listen to; screens that still read
the bool keep the page rebuild.
FFmpegService only forwarded each call to FFmpegProbe, FFmpegMetadata,
FFmpegConversion, FFmpegDecryption or FFmpegReplayGain with identical
defaults, so callers now use those modules and the test-only markers move
to the owning statics.
Each Library rebuild combined every loaded page, filtered playlist tracks
and regrouped the in-memory History snapshot up to three times, so the
section cache never hit and every row's month was formatted again. The
results are now memoized per input identity, with identical output.
Go to Album always pushed a new album page, so choosing it from a track
on the album already shown stacked a second copy of the same page.
Album pages now record which album their route shows. The shared push
helper skips the push when the page on top already shows that album; it
still dismisses a modal such as Now Playing first. An album without a
provider matches the same id from any provider, since a track's source
can name the provider the page resolved on its own.
Right-clicking a song outside the selection made it the selection and
opened the selection toolbar under the menu, and choosing Play or Show
details left that toolbar open.
That selection now belongs to the menu: the toolbar stays closed while
the menu is open, closing the menu without a choice ends the selection,
and Play and Show details end it like the queue and playlist actions.
Bulk actions (re-enrich, convert, delete) keep it and bring the toolbar
back. showContextMenu reports whether a row was chosen, and
SelectionModeMixin.showSelectionMenu applies this on the album, folder
and artist pages; the Library and its search results do the same.
On desktop the Material style still opened phone bottom sheets: the song
page's More button, the search sort options, explore and discography
actions, batch convert, the playlist picker, quick actions, the download
service picker, the metadata editor's option pickers and the cue split
sheet all called showModalBottomSheet directly.
The song page now opens its items as a menu anchored under the More
button on Material desktop, through the same context menu machinery as
the Library's right-click menus, while phones keep their sheet and
Mornye keeps its popover. The remaining call sites go through
showAppModalBottomSheet, which already presents a centered dialog on
desktop. The adapter gains a mornyeGlass switch, mirroring the dialog's,
for content that draws its own glass (batch convert, the playlist
picker, the discography sheet and the floating download picker on
phones), so phone appearance stays as it was.
A test opens the Material song page menu on desktop and on a phone and
checks for the anchored menu or the sheet.
Use directional insets, alignments, positions and borders so Arabic and
other RTL locales lay out from the right. Mornye chevrons use the
CupertinoIcons glyphs that match text direction, synced lyric voices
align to start and end, and transport controls, seek bars and progress
stay left to right as media timelines do.
The Library Songs page shows the desktop table, sorted through the Library sort modes, and song rows and cards select on click, play on double click and open the selection's menu on right-click. Playlists, folders, albums, artists and queued downloads get menus, album tiles show a play button on hover, and the sort and filter choices open as menus on desktop.
Right-click, Shift+F10 and the Menu key open item menus (MenuAnchor on Material, MornyeContextMenu on Mornye). DesktopListScope adds Cmd/Ctrl+A, Escape, Delete and Enter to selectable lists, and SliverTrackTable shows sortable song columns. The album screen uses the table on desktop.