Commit Graph
262 Commits
Author SHA1 Message Date
zarzet 652cd1736b feat(lastfm): add desktop account connection and scrobbling
Authorize Last.fm accounts in the system browser and store sessions in OS secure storage. Add desktop Playback settings for scrobbling and Now Playing, including localized status and recovery controls.

Observe the local full player, measure actual listening time across pause and seek, distinguish repeats and transitions, and persist qualified listens before submitting account-scoped batches. Keep previews and remote Link sessions outside submission.

Validation: 281 Flutter tests passed, analyzer and pinned formatter clean, workflow lint passed, macOS debug build succeeded, and the signed Last.fm API handshake was verified. Build credentials are supplied locally or through Actions secrets.
2026-11-01 20:50:03 +07:00
zarzet 3f84aeb5bc fix(audio): reconcile USB output status with native playback 2026-11-01 20:45:07 +07:00
zarzet 8dccb0582d fix(library): unify Windows extended path identities 2026-11-01 20:21:44 +07:00
zarzet 0dd8750400 feat(lyrics): sync AI romanization to original word timing 2026-11-01 19:30:14 +07:00
zarzet 1d7c852648 feat(lyrics): sync translated phrases to original word timing 2026-11-01 19:00:38 +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 1b0e3803f8 perf(library): build the quality label patterns once
buildLibraryAudioQualityLabel, the grid label and the badge highlight
constructed their RegExp objects on every call. The patterns are now
top-level finals with the same sources and flags.

The Dart VM already caches compiled patterns by source, so this only
saves the per-call cache lookup: on this Mac (AOT, best of six
interleaved runs) a 20,000-row label pass went from 24.9 to 23.6 ms in
bit-depth-only mode and from 25.3 to 23.9 ms in bit-depth mode. A
comparison of the old and new policy over 435,516 inputs (modes, stored
qualities, formats, paths, bitrates, bit depths, sample rates) found no
differing label.
2026-10-31 00:56:58 +07:00
zarzet b7e18461eb refactor(link): keep the sync protocol free of the cover store
The history sync wire format imported cover_store.dart, with
path_provider and the network storage service, for one loopback check.
The check is now isLoopbackHost in cover_art_utils.dart, which both
durableCoverReference and linkSyncRemoteArtwork use. Same results.
2026-10-30 16:09:33 +07:00
zarzet cd66e168f9 fix(covers): read stored statistics covers as durable references
Listening statistics rows from older builds hold loopback URLs and
temporary files that no longer load, so the statistics screen, Home
and Rewind showed broken covers. Rows are read through one
ListeningTrack.fromRow, which reads those as no artwork, so the
fallback shows until the song plays again.

A play whose cover is not known yet no longer erases the stored cover
of that day, and a write never stores a loopback or temporary cover.

Artist artwork and Rewind album covers dropped network:// references
because normalizeCoverReference rejects them; they now read through
normalizeStoredCoverReference, which keeps them without changing what
other stores accept.
2026-10-30 15:36:00 +07:00
zarzet 152bb36d2e feat(lyrics): let synced lyrics run later or earlier than playback
Audio over Bluetooth reaches the listener late, so synced lyrics ran
ahead of what was heard (#753). Lyrics settings gain Lyrics timing: a
slider from 2 s earlier to 2 s later in 0.1 s steps, saved on release,
with a reset.

The offset moves every line and word of the player's lyrics and the
desktop mini player's, so line focus, word sweeps and countdowns follow
it together. Tapping a line still seeks to where it is sung, and a
long-pressed line opens sharing with its own time.
2026-10-29 23:58:23 +07:00
zarzet 8368e96a68 feat(lyrics): romanize non-Latin lyrics with the AI translation
Lyrics in Japanese, Korean, Chinese, Arabic and other non-Latin scripts
are hard to sing along to from a translation alone. When a song has
lines outside the Latin alphabet without a provider romanization, the
translation request also asks for one in each language's usual system
(Hepburn, Revised Romanization, Pinyin with tone marks, common
transliteration). It arrives in the same reply, is cached with the
translation and shows as the existing pronunciation line, which the
lyrics menu already hides or shows. Provider romanizations, which may
be word timed, are kept.

A saved translation from before is asked for again only when the
listener taps Translate. An "Add Romanization" switch in AI translation
settings, on by default, stops asking for it.
2026-10-28 20:43:10 +07:00
zarzet 74d5a999f6 fix(artist): list an artist's releases newest first
Providers return albums and releases in their own order, and later
pages were appended as they came. Every source (passed in, cached,
fetched and paged) is now sorted by release date, newest first; full
and partial dates compare correctly, ties keep the provider order and
undated releases go last.
2026-10-28 20:43:10 +07:00
zarzet a0dd76f55d feat(player): compact player beside idle lyrics
Material's Playback settings gain "Compact player" (off by default). In
portrait, lyrics left idle while playing shrink the player to a smaller
one instead of hiding it: a one-line title and artist with a queue
button, the seek timeline, and the compact expressive transport with the
elapsed and total times beside it. It unfolds in the same spring as the
full controls fold, so the lyrics take the room they leave.

Touches on the compact player (skip, seek, play-pause, the queue button,
a swipe up for the queue) keep it compact; a touch elsewhere brings the
full player back, as before. The queue stays reachable while the app
bar's buttons are faded.
2026-10-27 02:10:27 +07:00
zarzet c2db8ab4b6 feat(player): gapless playback
The next song used to load only after the current one ended, which
left a short silence between songs. With Gapless playback on (the
default), the player loads the next song on a second deck 30 seconds
before the end and starts it the moment the current one completes.

The decks gain setNextDeck. The Android fork links its players with
MediaPlayer.setNextMediaPlayer, so the platform starts the next song
itself; the Darwin fork resumes the linked player first thing in its
end-of-item handler, prerolled when linked. libmpv decks cannot hand
over their output, so on Windows and Linux the loaded deck starts on
the completion event.

AutoMix replaces gapless playback while on, and repeat one, USB
bit-perfect and exclusive output keep the ordinary transition. A queue,
shuffle, repeat or settings change, a pause, a stop or Previous drops
the prepared song; a seek keeps it. Playback settings gain the switch,
which the settings search finds as well.
2026-10-27 00:08:16 +07:00
zarzet 564633a6d9 fix(home): run the Material desktop search field across the pane
Capped at the M3 search bar's 720dp, the field stopped partway across a
full screen window and looked cut off under shelves that run to the edge.
It now spans the pane inside the same 24dp margin.
2026-10-26 04:07:26 +07:00
zarzet 50c8c4f7b5 fix(home): run Material desktop Home across the whole pane
Home centered at the 1280dp reading width on desktop, but its shelves
still scrolled to the window's right edge and the featured cards ignored
the centering, so a full screen window cut the shelves on one side only.
Material desktop Home now spans the pane with M3's 24dp window margin:
the title, search, greeting and every shelf start at that margin and the
shelves scroll to the edge. The search field stops at the M3 search bar
width of 720dp. Tablets and Mornye keep their centering.
2026-10-26 01:56:40 +07:00
zarzet b8672fc27b feat(lyrics): translate lyrics with an AI provider
Translate the current song's synced lyrics into a chosen language with
the user's own API key. OpenAI, OpenRouter, any OpenAI-compatible server,
Gemini and Claude are supported, with a model list, a connection test and
an optional extra instruction.

- Keys live in secure storage per provider, never in the settings JSON.
- Translations are cached apart from the lyrics, keyed by the lyric text,
  target language, provider and model; lyric files are never rewritten.
- Repeated lines go once, timing tags are stripped, malformed batches are
  retried then split, and missing lines stay untranslated.
- Errors map to localized messages; rate limits wait out a short
  Retry-After.
- The player and desktop lyrics menus pick the language and show
  progress; automatic translation is off by default.
2026-10-26 01:33:56 +07:00
zarzet f07d8720b4 feat(settings): song analysis controls
Add a Song analysis switch under Autoplay, an Android-only "Only while
charging" switch, and a row that shows how many Library songs are
analyzed, with a progress bar while analysis runs, and clears the
analysis after a confirmation. Song analysis is searchable in
Settings.
2026-10-25 23:36:14 +07:00
zarzet 8d7173373f Improve Material player gestures and landscape lyrics
Allow sideways dismissal while paused, prepare full-screen artwork before opening, and keep its gradient during Hero transitions. Add a saved landscape lyrics layout that keeps the cover fixed while the adjacent pane switches between playback controls and lyrics.

Validation: 285 Flutter tests, analyzer, formatter checks, and git diff --check.
2026-10-25 23:09:35 +07:00
zarzet 74f01b6f93 feat(android): add Android TV remote navigation 2026-10-25 16:36:32 +07:00
zarzet 8e7d792c29 feat(playback): exclusive output on Windows, macOS and Linux
Add a desktop "exclusive output" option that takes the output device for
the music player alone, bypassing the system mixer. It always plays
through libmpv:

- Windows: WASAPI exclusive mode, with ao-reload when the option changes
  mid-track.
- macOS: AVPlayer cannot play while the app holds Core Audio hog mode, so
  macOS bundles libmpv (media_kit_libs_macos_audio, through CocoaPods)
  and ExclusiveOutputDeck moves the player from AVPlayer to a libmpv deck
  with audio-exclusive while the option is on, reopening a playing track
  where it was. Turning it off disposes that deck, releasing the device.
- Linux: an ALSA hw: device opened directly, chosen from /proc/asound or
  the first card.

A refused or busy device reopens the track in shared mode at the same
position and the settings page reports it. AutoMix and previews stay off
while the option is on.
2026-10-25 15:45:49 +07:00
zarzet 602e2d3c63 fix(search): leave room under result covers for the text line box
The two lines under a cover overflowed their cell by a fraction of a
pixel with fonts whose line box exceeds the nominal height.
2026-10-24 10:36:50 +07:00
zarzet 38dd71658e feat(search): show cover grids and shelves for search results on wide screens
Once the results are 840dp wide on a tablet or desktop window, the
album, artist and playlist filters show an adaptive grid of covers, and
the All view lists the first five songs, then one shelf per kind with
Show all switching to that filter. Songs use the desktop song table on
desktop and keep their rows elsewhere. Loading skeletons follow the
same geometry. Phones and narrow windows keep their rows unchanged.
2026-10-24 10:36:50 +07:00
zarzet 05b6fa33e0 fix(stats): credit collaborators individually in listening history 2026-10-24 10:30:25 +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 084d010125 refactor: drop the unused LogBuffer.filter tag option
The log screen, its only caller, filters by level and search text only.
2026-10-24 00:12:34 +07:00
zarzet 02232c76ac chore: remove unused widget and utility members
AppIconButton.outlined, LogBuffer.export, TtlCache.remove/clear and the
translationThreshold constant have no caller in lib or tests.
2026-10-23 23:08:48 +07:00
zarzet 8a6b774d9f chore(lyrics): move the active lyric reference into its test
Playback queries LyricTimelineIndex; the linear activeLyricIndices only served
as a test oracle. Scenario tests now exercise the production index directly.
2026-10-23 22:43:23 +07:00
zarzet cc15c723ba refactor: use switch expressions in format and model mappers
Return-only switch statements in the conversion, MIME, error type,
logger and model helpers become switch expressions with the same
cases and defaults, and the log summary switch drops redundant breaks.
2026-10-23 22:22:04 +07:00
zarzet 30a5c82f0f feat(library): list the files a scan could not read
A finished scan only reported how many files it skipped. The Rust
scanner and the Android SAF scan now record the first 100 failed files
with the reader's reason and include them in the finished progress
report.

Library settings show the count under each folder, and its actions
open a sheet listing each file, its folder and the reason. The list is
kept per folder across restarts, cleared by a clean scan and removed
with the folder. Network folders keep only the count.

Validation: provider, model and Rust scan tests, and the full Flutter
suite on a clean tree with only this series applied.
2026-10-23 03:50:05 +07:00
zarzet 44a7fad0b9 feat(downloads): add custom folder path templates 2026-10-23 03:17:10 +07:00
zarzet b83335371e fix(desktop): handle missing initial download folders 2026-10-22 19:12:21 +07:00
zarzet 11a9b9a4ec chore: remove redundant comments across the codebase 2026-10-22 01:41:09 +07:00
zarzet d6602570f3 feat(desktop): tighten Material density for pointer input
Material desktop pages kept the phone metrics: 48dp touch rows, 56dp
row artwork, 16dp settings row padding, a 120dp collapsing header, and
lists stretched across the whole window. The selection bar was the
phone sheet with its drag handle, tap hint and two-line pill grid.

Register AppTokens.desktop for Material on desktop (M3 density -2 for
rows, row artwork and the page header; radii, motion and the 48dp
control target unchanged), lower the Material songs table row to 44dp,
and center Material lists past 1280pt (the M3 large window class plus
the rail) while Mornye keeps Music's full-width pane. The desktop
selection toolbar drops the handle and tap hint, lays its actions in a
wrapping row of 40dp buttons, and keeps the destructive action at its
own width.
2026-10-21 20:11:35 +07:00
zarzet 400a760415 fix(desktop): shape loading skeletons like the loaded tables
Desktop track and album lists now load with placeholder rows that use the
track table's columns, row height and quality column, so content does not
jump when it arrives. The track table geometry and the artist discography
tile size move to shared helpers that the placeholders reuse.
2026-10-21 12:38:31 +07:00
zarzet af500a737d feat(lyrics): choose lyrics from each provider in the metadata editor
"Find lyrics online" in the editor's lyrics section opens a sheet that
asks every enabled provider, extensions included, and lists each
answer in priority order with its timing and a preview. The chosen
lyrics fill the field and are saved with the other edits.

The backend gains getLyricsFromProvider, which asks one enabled
provider directly without the cache or the priority race, and
getEnabledLyricsProviders, wired for desktop, Android and iOS.
Provider display names move to a shared helper.
2026-10-21 11:35:19 +07:00
zarzet 504b66170b fix(desktop): give every page the same full-pane width
Desktop pages now run across the content pane and center only past
1600pt, so Home, Library, Repo and detail pages share their edges. Repo's
search field spans the page like the others, and Mornye's Home leaves the
profile to the sidebar's account row.
2026-10-20 19:38:05 +07:00
zarzet 8eaa7e3e4a fix(desktop): run Home's feed across the whole content pane
Home centered its shelves at a tablet reading width, which left a wide
margin on the left once the sidebar was hidden.
2026-10-20 18:28:11 +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 bd4f827a88 Merge branch 'desktop/d4-storage' 2026-10-20 13:44:59 +07:00
zarzet a86bcd0190 fix(desktop): report the desktop platform to native jobs and logs
Native backup and library jobs received 'ios' on desktop. Send the
desktop OS name so the backend applies no mobile path handling, and
describe desktop hosts in log exports.
2026-10-20 13:44:35 +07:00
zarzet 840b28d549 feat(desktop): enable notifications and gate mobile-only plugins
Initialize flutter_local_notifications for macOS, Linux and Windows
(AUMID com.zarz.mornye with a stable GUID) and post result notifications
on desktop; live progress stays in the window. Open files through
url_launcher, skip audio_session, and use the login keychain on macOS.
2026-10-20 13:44:30 +07:00
zarzet 6aeed936b4 feat(desktop): use plain folders and SQLite FFI on desktop
Windows and Linux open databases through sqflite_common_ffi with the
bundled SQLite; macOS keeps sqflite_darwin. Desktop databases live in
the application support directory. Downloads default to <Music>/Mornye,
and setup and the Files settings pick plain folders without permission,
SAF or bookmark steps.
2026-10-20 13:44:25 +07:00
zarzet 840e16e1f4 feat(desktop): add desktop platform check, scroll and theme defaults
Add isDesktopPlatform. Desktop windows skip the tablet UI scaler,
Windows and Linux use Material's clamping scroll with scrollbars while
macOS keeps the bounce, and a first launch without a stored style
starts in Mornye on macOS and Material on Windows and Linux. Mobile
behavior is unchanged.
2026-10-20 13:36:18 +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 7600c169c7 perf(ui): improve Material and Mornye player and library smoothness
Reduce repeated artwork readbacks, lyric layout and subscriptions, and animation rebuilds. Virtualize Library sections and Settings search, bound artwork decoding, batch queue restoration, and honor reduced motion.

Add shared player benchmarks with 60/90/120 Hz budgets and regression coverage for lifecycle, scrolling, and accessibility. Verified with 337 host tests, six Android profile suites, scoped analysis, formatting, and diff checks.
2026-10-20 03:37:21 +07:00
zarzet 60d00191d9 fix(player): prefer embedded art for local files over online covers
Downloaded tracks were played with their online cover URL, and artwork
recovery skipped any http(s) cover. Offline, with no cached copy, the
player, mini player and Home showed a placeholder although the file
embeds its cover.

Extract the embedded cover for local and SAF files when the known art is
remote or missing, keeping the online cover only when the file has none.

Fixes #683
2026-10-20 02:45:12 +07:00
zarzet 9eea6a1a03 feat(playback): add normalization pre-amp and track or album gain
Volume normalization levels tracks to the -18 LUFS ReplayGain
reference with no way to aim lower or keep album dynamics. Add a
pre-amp from -15 to +6 dB, shown with its resulting target loudness
(-7 dB targets -25 LUFS), and a Track or Album gain mode that falls
back to the other tag when one is missing.

The cache now keeps both gains per file, so changing either setting
re-levels the playing track without reading tags again. Volume stays
capped at the source level, so a positive pre-amp cannot clip, and
downloaded tags keep the standard -18 LUFS reference for other
players.
2026-10-20 00:39:08 +07:00
zarzet cb51d08939 feat(crash): show persistent crash reports on Home 2026-10-19 16:17:58 +07:00
zarzet 378c8f3749 fix(library): recover interrupted scans and stale notifications
Serialize scan notifications and surface failures even when database error persistence fails. Recover interrupted scans independently of auto-scan, retain their checkpoints, and collect matching Android process-exit details on restart.
2026-10-19 15:43:00 +07:00