Commit Graph
58 Commits
Author SHA1 Message Date
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 6e570165a9 fix(autoplay): rotate recent suggestions across queue changes 2026-11-07 18:36:02 +07:00
zarzet 305037a907 feat(lyrics): save translations to .mlrc files
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.
2026-11-07 15:19:06 +07:00
zarzet 1df540f90b fix(lyrics): preserve editor track when playback changes
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.
2026-11-06 21:33:19 +07:00
zarzet 1225eb5b8d feat(artist): add album grids and a saved page for offline
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.
2026-11-06 20:53:20 +07:00
zarzet c074582205 fix(metadata): re-enrich writable network library files 2026-11-05 15:52:26 +07:00
zarzet 708efa4ecf feat(mornye): Music's glass inspector, player actions and Home text
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.
2026-11-04 21:58:50 +07:00
zarzet b68b5f42a3 feat(library): play, queue and delete files from a collection selection
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.
2026-11-04 16:22:00 +07:00
zarzet 1bb9c5094d feat(lyrics): edit and sync lyrics from the player
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.
2026-11-04 01:59:24 +07:00
zarzet 6e964bb2d3 feat(player): open audio files and folders directly 2026-11-04 01:35:52 +07:00
zarzet 6e07941b35 feat(library): save network songs offline with independent copies 2026-11-03 03:18:14 +07:00
zarzet 39d3ba6c53 merge: sync reviewed pull requests from origin main 2026-11-03 00:44:44 +07:00
zarzet 1669422cc6 feat(library): add whole-library metadata re-enrichment (#787) 2026-11-02 20:02:31 +07:00
Keven Chantre 6e89e64a17 feat: Add re-enrich all tracks functionality and related UI components 2026-11-02 02:37:44 +00:00
zarzet dac6591c15 fix(link): relay playback artwork and metadata across devices 2026-11-01 21:29:52 +07:00
zarzet 4a53a24366 feat(lyrics): automatically embed online search results 2026-11-01 20:16:59 +07:00
zarzet b2626ac95e perf(library): reuse suggestion matching and playlist seeds
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.
2026-11-01 19:34:32 +07:00
zarzet 8e24b08fec feat(download): add FLAC quality caps and Opus 160 kbps
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.
2026-11-01 00:06:41 +07:00
zarzet b336075b77 perf(library): match collection history keys once per page data
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.
2026-10-31 01:30:13 +07:00
zarzet 361d97fa03 fix(covers): show a collection song's network cover only where it loads
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.
2026-10-30 18:55:58 +07:00
zarzet e30e213ed3 fix(link): refresh playback and details after desktop file changes 2026-10-30 13:12:05 +07:00
zarzet a325cb6ae0 fix(player): read deferred ReplayGain tags in audio info 2026-10-29 23:28:21 +07:00
zarzet 0aa867cb5a feat(link): manage desktop music files from mobile
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.
2026-10-29 02:21:39 +07:00
zarzet 4b18a270dd fix(metadata): save animated artwork during re-enrichment 2026-10-29 01:48:14 +07:00
zarzet fad59b8519 perf(conversion): speed up FLAC encoding and reuse SAF sources 2026-10-27 02:20:20 +07:00
zarzet 01a37e383a fix(ios): respect verification browser preference
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.
2026-10-25 22:41:51 +07:00
zarzet 403f9903aa fix(library): keep scanned songs unplayable while Local Library is off
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.
2026-10-25 13:02:11 +07:00
zarzet 44cbb57b30 refactor: import moved files directly and remove the re-export shims
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.
2026-10-24 03:27:23 +07:00
zarzet 18ee77004d refactor: make ClickableArtistName single-line with ellipsis
All twelve callers passed maxLines: 1 and TextOverflow.ellipsis, so the
widget now applies them itself and the two parameters go.
2026-10-24 00:12:34 +07:00
zarzet 78f60e7576 refactor: push plain material pages through pushPage
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.
2026-10-24 00:12:34 +07:00
zarzet 22d73faa11 refactor(pages): drop the title flip rebuild opt-out from the header mixin
Every collapsing header screen now hands showTitleNotifier to its header,
so the setState path and its per-screen opt-outs are dead.
2026-10-23 23:45:04 +07:00
zarzet 7f323e88b1 refactor(library): move confirm dialogs to showAppConfirmDialog
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.
2026-10-23 23:14:57 +07:00
zarzet 4707feeaa3 refactor(library): share the collection selection bar toggle
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.
2026-10-23 22:49:09 +07:00
zarzet 04277f40bd perf(pages): rebuild only the toolbar title when it flips
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.
2026-10-23 22:49:09 +07:00
zarzet a397cf0d74 refactor(ffmpeg): call the FFmpeg modules directly
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.
2026-10-23 22:44:37 +07:00
zarzet dfa5e0d994 perf(library): reuse the prepared page data across rebuilds
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.
2026-10-23 22:31:44 +07:00
zarzet 11a9b9a4ec chore: remove redundant comments across the codebase 2026-10-22 01:41:09 +07:00
zarzet 44a5cd7153 fix: keep the album page on top when Go to Album names it
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.
2026-10-22 00:44:56 +07:00
zarzet 8b062dc353 fix(desktop): keep a right-click selection to its menu
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.
2026-10-21 23:22:07 +07:00
zarzet 909a70c173 fix(desktop): present Material song menus and sheets as desktop surfaces
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.
2026-10-21 20:00:09 +07:00
zarzet a428b37879 feat(i18n): mirror layouts for right-to-left languages
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.
2026-10-21 14:59:26 +07:00
zarzet 87c92c8d78 feat(desktop): add Library context menus, song table and hover play
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.
2026-10-20 17:38:54 +07:00
zarzet 728c1a1ac8 feat(desktop): add context menus, list selection and a song table
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.
2026-10-20 17:38:54 +07:00
zarzet 490e529203 feat(desktop): wire deep links, single instance, keep-awake, Discord, watcher and crash logs
- mornye:// URLs arrive through app_links and go to the backend callback
  inbox (queueExtensionCallbackUrl); extension auth opens the system
  browser on desktop.
- Single instance: a named mutex plus app_links WM_COPYDATA forwarding on
  Windows (with the installer's AppUserModelID), a unique GApplication
  forwarding its command line on Linux; macOS handles reopen itself.
- The download queue holds a sleep inhibitor from start until it stops.
- Discord Rich Presence runs on desktop through a channel adapter over the
  backend IPC methods, without an account link.
- Library folder changes trigger a debounced incremental source scan.
- Desktop rotating log files, a session marker that turns an unclean exit
  into the existing crash report, and runtime errors recorded for it.
2026-10-20 16:14:40 +07:00
zarzet 37e21b5712 feat(branding): rename app and native backend to Mornye
Rename the Dart package, Android and iOS identifiers, Rust crates, native libraries, and Discord plugin. Preserve legacy data readers and compatibility aliases.

Update localized branding, documentation, artwork, build tooling, and release artifacts. Route Telegram release notifications to @mornyeupdates and link @mornyecommunity.
2026-10-20 12:00:44 +07:00
zarzet ba234d78ad fix(ui): align Material screens with the design guide
- Keep one accent container per group: neutral source, album, Atmos and
  extension badges, neutral Rewind card, secondaryContainer icon wells,
  theme roles instead of fixed teal, orange, amber and green.
- Drop row and sheet header dividers on Material; search results and
  their skeleton become a connected list with 2dp gaps.
- Use a solid errorContainer with onErrorContainer in ErrorCard, the
  crash banner and the URL notice; Weekly Releases and extension
  collections show ErrorCard with retry.
- Raise touch targets to 48dp for search sort, service chips, metadata
  quick select, copy rows, the queue drag handle and spectrogram chips.
- Use SettingsSegmentedChoice, AppChoiceChip and SettingsInfoCard where
  custom controls stood in, and a full-round text button shape.
- Remove nested cards in the tutorial, update dialog, file info path and
  lyrics status rows.
- Localize the verification paste action, start the Home search hint
  with "Search", and fix the invisible Find spinner on a disabled button.
2026-10-20 02:02:37 +07:00
zarzet c1c7d421cc refactor(convert): route single-track conversion through the shared pipeline
The track metadata screen's _performConversion re-implemented the batch
conversion pipeline step by step (metadata merge, lyrics, cover temp file,
SAF temp copy, FFmpeg, SAF publish, history or library update, temp
cleanup). Both now call convertLibraryTrack in the batch controller, which
returns a LibraryTrackConversionResult that each caller maps to its own
reporting: batch failure summaries and log lines, or the screen's
existing snackbars.

Caller differences stay as parameters: the cover temp prefix
(batch_cover_ or convert_cover_), whether an empty SAF temp path fails,
the history SAF file name fallback, the screen's eager temp deletes, its
provider reload right after the row is written, its warnings, its cleanup
log text and its lazy artistTagMode read.

One deliberate difference: the screen now reads the track path, item and
audio fields once before the first await instead of re-reading widget state
after each await. Swiping to another track mid-conversion previously published
and recorded the output against the newly shown track; it now stays on the original.
2026-10-19 01:15:18 +07:00
zarzet 5b3a2b9575 refactor(queue): move the completion bridge into CompletionBridgeTracker
The completion bridge maps, the precache set, the History row matcher and the
bodies of the queue lookup and History index listeners lived on the Library
tab State. CompletionBridgeTracker in lib/controllers now owns them. The two
ref.listen registrations stay in build at the same positions and call into
the tracker; the State forwards the old field names as getters so the part
files read the same collections.

Guards, the setState that drops removed items, the file check refresh order
(file cache, then playable probe), the offset reset and the mounted rebuild
after a History index change are unchanged.
2026-10-19 01:12:21 +07:00
zarzet 830dee31ed refactor(queue): move library paging state into QueueLibraryPager
The Library tab State held the page offsets, the load-more guard, the count
and page snapshot caches, the blank-library repair throttle and their trim
and scope rules inline. QueueLibraryPager in lib/controllers now owns that
state and logic; the State keeps one _pager field and forwards, passing
setState, mounted and the provider reloads as callbacks.

The page request and page data types implement two small interfaces so the
pager can compare scopes and test emptiness without seeing the private
types. Provider reads, page size, trim limits, the repair throttle and the
order of cache writes and setState calls are unchanged.
2026-10-19 01:12:21 +07:00
zarzet 1521c49508 docs(selection): correct the SelectionModeMixin doc
The doc named queue_tab as a user, but queue_tab has its own selection state.
List the screens that actually mix it in.
2026-10-19 00:37:42 +07:00