Commit Graph
209 Commits
Author SHA1 Message Date
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 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 d58565d287 feat(library): suggest songs under albums, singles and playlists
Albums, singles and playlists, online and in the Library, end with
"Suggested songs": up to ten songs like the ones above that the collection
does not hold yet, each with a preview, an add button and a click or tap
that downloads it. On a user playlist the add button adds the song there
and it leaves the suggestions; elsewhere it opens the playlist picker.
Phones list the songs as rows, desktop in the page's song table.

Suggestions come from a new optional extension method, getRelatedTracks,
which extensions declare with the relatedTracks capability: it takes up to
three of the collection's songs and returns songs in the shape of search
results. The extension most seeds came from is preferred so it can use
their IDs. Without such an extension, the first metadata provider is
searched by the collection's artists. A refresh button starts from other
songs, and loaded suggestions stay for ten minutes.
2026-10-29 02:23:07 +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 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 1f12076765 feat(search): recognize songs playing nearby
A microphone button in the empty search field listens to the room and
names the song, on phones and desktop.

- The audio fingerprint and the Shazam request run in Rust behind a new
  recognize_song data job, so every platform shares one path.
- Listening sends the audio so far at 4, 8 and 12 seconds and stops at
  the first match; quiet or short clips are reported instead of sent.
- A match can be played from the library (by ISRC, then title and
  artist), searched in Mornye, or opened in Shazam. Recent matches are
  kept in a local history.
- Android asks for the microphone only when listening starts; iOS and
  macOS gain the microphone usage description and entitlement. The Linux
  package recommends pulseaudio-utils for capture.
2026-10-26 01:33:56 +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 68f5623009 feat(player): show the cover full screen by default in Material
Until a cover style is chosen, Material now fills the top of the player
with the artwork and Mornye keeps the card. The card option is labelled
Card, since it is no longer the default. A saved choice still applies in
both styles; releases never shipped the setting, so no migration is
needed.
2026-10-26 01:28:44 +07:00
zarzet 457d074b28 feat(lyrics): let Mornye's lyrics blur strength be set
Mornye blurs the lyric lines around the current one at a fixed strength.
Lyrics settings now scale it from off to 150% (default 100%), with a
preview line that blurs as the slider moves. Off skips the filter. The
setting shows only where the device draws the blur (Liquid Glass).
2026-10-26 01:25:47 +07:00
zarzet 8d10bc4856 feat(autoplay): leave song analysis off until turned on
Decoding every Library song is heavy on low-end phones, so the analysis now starts only once the listener enables it in Playback settings.
2026-10-26 01:14:03 +07:00
zarzet eb6e4bb1a8 feat(autoplay): analyze how songs sound
Analyze each Library song once in the background, on the device, and
let Autoplay pick songs that sound like the session and flow into each
other.

- Decode two 24 s mono windows at about 30% and 60% of a song with one
  FFmpeg thread, describe them natively, and delete the PCM at once.
  Documents are opened through FFmpegKit's SAF parameter, not copied.
- Keep features in a small database of their own, keyed by path with
  the file's size, modification time and the analysis version. Failed
  songs are recorded and tried again only once the file or the version
  changes; rows of songs the Library no longer has are removed.
- Sweep one song at a time with rests four times the work, never in
  the first 20 s of a song or while AutoMix mixes. Android sweeps only
  while charging unless the listener allows battery, desktop sweeps
  at that pace, iOS analyzes only the song playing. The song playing
  is analyzed 20 s after it starts, on battery too.
- Add a sound signal: up to +5 for sounding like the latest songs,
  with timbre weighing most over features standardized across the
  songs at hand; each pick loses up to 1.5 for a tempo jump (octaves
  folded) and 1.5 for an energy jump, and gains 0.5 for a neighboring
  key. Unanalyzed songs score and follow as an average analyzed one.
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 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 1b8b2d48f8 feat(playlists): reorder tracks, create from folders, import files
Playlists had no way to change their order, and creating one always
started empty.

- Edit order opens a page where tracks move by their handle or a long
  press. The order is the added_at order, so a reorder restamps those
  values instead of adding a column, and Mornye Link carries it.
- Create playlist now offers an empty playlist, every track of one
  Library folder, or an imported M3U, M3U8 or CSV file.
- Imports match each entry to a local file by the tail of its path,
  then by ISRC or title and artist, and report how many matched.
  Unmatched entries keep the file's metadata so they can be downloaded.
2026-10-25 12:55:40 +07:00
zarzet c489960b44 feat(player): let the Now Playing menu hide the volume slider
The phone Now Playing menu gains Hide volume and Show volume in both
styles, saved as the playerShowVolume setting. Mornye drops the slider in
portrait and landscape and moves the transport into its place; Material
keeps the gap above the footer. Desktop keeps its volume controls.
2026-10-24 23:10:27 +07:00
zarzet 3fba270258 feat(search): keep the result rows by default and offer the grid as a view
Wide screens now open search results as the phone rows, as before the
cover layout landed. A list or grid button after Sort, like the Library's
view button, switches to the cover grids and shelves, and the choice is
kept in settings (searchViewMode). Phones never show the button.
2026-10-24 11:24:38 +07:00
zarzet b1b7fc9d5d refactor(library): derive unified item quality in one call
buildDisplayAudioQuality already applies the bitrate, then bit depth and
sample rate ladder the two factories spelled out. Also drop ten getters on
UnifiedLibraryItem that nothing reads.
2026-10-23 23:14:57 +07:00
zarzet 5d8c22a452 chore(services): drop write-only result and config fields
Duplicate entries, donation config, spectrogram, audio route, cover save,
share and redownload results carried fields that nothing reads; the
duplicate query no longer selects the unused album name.
2026-10-23 23:08:48 +07:00
zarzet a6db7fe878 chore(services): remove unused service members and write-only fields
UpdateInfo.publishedAt/isPrerelease, UpdateChecker.currentVersion,
BackupBundle.isEmpty, LocalLibraryItem.matchKey and two unused desktop
debug setters are never read.
2026-10-23 23:08:48 +07:00
zarzet 0be275a3b1 chore: remove unread extension manifest model fields
The health check, hook, setting and track matching fields were parsed from
backend JSON but never read, and quality options only need a settings count.
2026-10-23 23:00:46 +07:00
zarzet 86231be479 chore(library): remove unused collection JSON factories
Collections live in SQLite and backup restore feeds the raw maps to the
database, so nothing parses the old JSON shape; the picker summary dates
were also never read.
2026-10-23 22:43:22 +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 24054bfd58 perf(history): extend lookup indexes when a download is prepended
Each completion rebuilt all three history lookup maps over every loaded
item, so a long batch did quadratic key normalization. A prepended item only
wins its own keys, so copying the maps and writing those keys gives the same
lookups.
2026-10-23 19:16:30 +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 11a9b9a4ec chore: remove redundant comments across the codebase 2026-10-22 01:41:09 +07:00
zarzet c9732fe440 fix(downloads): keep finalized FLAC paths and container names consistent 2026-10-21 01:48:14 +07:00
zarzet fb4f457430 feat(desktop): run FFmpeg and ffprobe through bundled executables
Route every FFmpegKit and FFprobeKit use through FFmpegExecution. On
desktop it starts the ffmpeg and ffprobe executables with argument lists,
collects their logs, cancels sessions by killing the process, and parses
ffprobe JSON into the FFprobeKit MediaInformation model. Tools resolve
from MORNYE_FFMPEG_DIR, the app bundle, then PATH, and the Rust desktop
library receives the same paths.
2026-10-20 14:36:18 +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 00b7cf9979 fix(crash): reduce repeated notices and retain diagnostics 2026-10-20 03:01:06 +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 19056edf14 perf(library): cache unchanged SMB and WebDAV scan metadata 2026-10-20 00:28:55 +07:00
zarzet 9acaa760a3 fix(haptics): render music pulses on basic motors and add tuning sliders
Phones without tuned haptic primitives often use an eccentric mass motor
that needs tens of milliseconds to spin up. The previous 12 ms on/off
pulses and low-amplitude one-shots were mostly not felt, so only the
loudest hits produced any vibration. On/off motors now play hits from
intensity 0.35 for 25 to 50 ms, and amplitude-controlled motors play
20 to 40 ms pulses with a minimum amplitude.

Analysis keeps every candidate hit with its threshold score, so a new
Sensitivity setting reselects pulses without decoding the song again.
The midpoint reproduces the previous selection exactly. A Strength
setting scales pulse intensity from 0.4x to 1.6x.
2026-10-20 00:24:12 +07:00
zarzet 931b10918f fix(crash): exclude system memory kills from crash notices
Ignore low-memory, resource-reclamation, and ordinary kill exits when recovering Android crash reports. Apply the same policy to saved reports from earlier versions while preserving Java/native crashes, ANRs, and fatal signals.

Include process importance and session duration in confirmed crash diagnostics. Validate with 8 Android unit tests, 9 Flutter tests, analyzer, formatting, and diff checks.
2026-10-19 23:30:20 +07:00
zarzet cb51d08939 feat(crash): show persistent crash reports on Home 2026-10-19 16:17:58 +07:00
zarzet ce21896ff5 refactor(layering): move model files to models and fix inverted imports
library_database_models and ffmpeg_models are plain data types, so they live in
models (re-exports stay at the old paths). deleted_library_files uses providers
and download_progress uses provider state, so both move to providers, and
ffmpeg_reenrich is a service. models no longer import from services for these.
2026-10-19 00:37:42 +07:00
zarzet ec1b84e6de refactor(services): remove members with no caller
Delete Dart members that have no reference in lib, test or integration_test:
unused player configuration helpers and event streams, two PlatformBridge
wrappers, database and export helpers, the unused global logger and the
now pointless 'hide log' imports.
2026-10-18 22:12:29 +07:00
zarzet 68c739dfa1 fix(equalizer): keep headroom and limiter choices when applying a preset
Applying a preset replaced every setting, so built-in presets silently
turned automatic headroom, the limiter and the compressor back on and
reset balance. Presets now carry only the curve, preamp, bass and treble.
The active preset is matched on the same fields, so it no longer shows as
Custom once headroom is off.
2026-10-18 20:58:36 +07:00
zarzet 56ad01ec2c feat(lyrics): add lrc.red and BetterLyrics, split SpotiFLAC-Mobile Lyrics
Add two keyless providers that serve Apple Music TTML: lrc.red, matched by
recording, and BetterLyrics, which answers songs it has already cached.
TTML is read into the first-party Apple line structure, so vocal sides,
backing groups, word timing, translations and romanization share one eLRC
formatter. The XML depth guard moves to core so both readers use it.

SpotiFLAC-Mobile Lyrics becomes its own provider instead of a fallback
inside Apple Music. New defaults are Apple Music, lrc.red, SpotiFLAC-Mobile
Lyrics, LyricsPlus and LRCLIB. Migration 13 moves untouched defaults to the
new list and keeps the former fallback right after Apple Music in custom
orders. Replace the dead LyricsPlus Workers mirror.
2026-10-18 19:24:31 +07:00
zarzet 759079517c fix(library): restore bit depth as the default quality badge 2026-10-18 03:11:54 +07:00
zarzet 1a6dc7366e feat(home): expose extension country settings and isolate regional caches 2026-10-18 03:11:33 +07:00
zarzet 4ab4e87c32 perf(history): reuse unchanged download lookup indexes 2026-10-18 00:46:53 +07:00
zarzet 05a5613332 feat(player): add configurable full-screen cover art
Offer default and full-screen artwork in Material and Mornye, retaining landscape layouts and full-screen Mornye motion artwork. Keep the Material header readable over bright covers and normalize invalid saved styles without resetting other settings.

Validation: 144 related Flutter tests, flutter analyze, generated settings, formatter and diff checks.
2026-10-17 22:27:06 +07:00
zarzet 11c6cf9915 feat(player): synchronize music haptics with local playback 2026-10-17 16:18:37 +07:00
zarzet ecf594aac2 feat(equalizer): add multiband EQ and per-player native audio processing 2026-10-17 16:18:30 +07:00
zarzet 21fd51d62c feat(autoplay): enable personalization by default and confirm learning resets 2026-10-17 16:18:26 +07:00
zarzet ac8523d789 feat(metadata): add per-field download tag separators 2026-10-12 12:11:06 +07:00
zarzet d2dcf28622 feat(autoplay): add opt-in on-device recommendation learning 2026-10-11 14:34:11 +07:00