Commit Graph
310 Commits
Author SHA1 Message Date
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
zarzet 91408da173 fix(history): keep downloads whose storage cannot be checked
Startup maintenance removed a download from History, and so from the
Library, when its file looked missing on two launches. Dart's
File.exists() also answers false for a permission error and for a drive,
card or share that is not mounted, so downloads on an unplugged drive,
an ejected SD card, a sleeping NAS, or an Android phone without media
access were dropped in batches of 80 per launch while the files stayed
on disk.

Orphan checks now use storedFileState: a file counts as gone only when
the OS reports it absent and the nearest existing folder above it is not
a mount container (filesystem or drive root, /Volumes, /media, /mnt,
/storage). Permission errors stay unknown, and on Android a missing file
in shared storage stays unknown while the app has no media access.
Library cleanup gets the same storage check through fileExistenceByPath.
2026-11-07 14:36:41 +07:00
zarzet fe33d6c7c9 feat(audio): add smart dither for file conversion 2026-11-07 01:23:32 +07:00
zarzet 56133e45e7 fix(playback): respect external player mode for Link and cloud songs 2026-11-05 21:59:45 +07:00
zarzet 969ee435e2 fix(lyrics): keep spaces after word closing timestamps
Enhanced LRC can close a word before the space that follows it, as in
<00:01.00>First<00:01.50> <00:02.00>second. Both parsers treated that
space only as an end time and dropped it, so word-synced lines lost the
gaps between words.

Append the separator to the previous word in the Dart and Rust parsers,
and keep the first closing timestamp when more than one follows.
2026-11-05 19:17:53 +07:00
zarzet 20e5b550d9 chore: neutralize UI terminology and clarify code comments 2026-11-04 22:53:56 +07:00
zarzet 2d7cdbb000 feat(home): Recently Played and extension playlists for Mornye
Top Picks follow the day's mixes with random playlists from an extension's
home feed, read once a day even with the feed off. Recently Played replaces
the Continue listening card. A phone's content URI now counts as absent on a
computer instead of failing the whole shelf.
2026-11-04 20:28:18 +07:00
zarzet 2074c38c1c feat(search): Mornye Top Results and a compact desktop toolbar
Wide Mornye search now opens as Music does: Top Results cards, then Artists,
Albums, Songs and Playlists, with chevron headers and covers sized to the
pane. Artists go by name alone. Loading placeholders match.

The desktop search field and scope control shrink to 36pt, with the toolbar
at 60pt. Material search stays as it was.
2026-11-04 19:57:08 +07:00
zarzet f1306e825f feat(track): copy a track's streaming service link
Track menus in both styles and the desktop context menu offer Copy
<service> link when the track id names its service: a service prefix or
URL, a Spotify id, a source that is itself a service name, or a known
Deezer id. Extension ids say nothing about their catalog, so other tracks
show no link. Mornye's Share includes the link too.

The metadata screen's Open in service button now builds its links from
the same helper.

Closes mornyeapp/Mornye-Desktop#18.
2026-11-04 16:35:13 +07:00
zarzet 95bb2014ce feat(library): find downloads that were moved to the download folder (#809)
Library Actions gains Find Moved Downloads. It relinks History entries
whose files now sit in the current download folder under the same
subfolders and name, or were converted next to the old file, and reports
how many are still missing. It never deletes anything.

Contributed by Keven Chantre in #809. Fixes #770.
2026-11-04 16:10:24 +07:00
zarzet 75e576c5a2 fix(playback): release local audio before deletion 2026-11-04 15:26:45 +07:00
zarzet 6d017634a9 feat(player): make automatic fullscreen lyrics optional 2026-11-04 04:31:17 +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 cb88dc0a3c fix(library): preserve artwork and silence automatic scan notices 2026-11-03 14:15:00 +07:00
zarzet 39d3ba6c53 merge: sync reviewed pull requests from origin main 2026-11-03 00:44:44 +07:00
zarzet 0fa6b73eb3 fix(windows): recognize alternate paths to the same library file (#789) 2026-11-03 00:35:34 +07:00
zarzet b727fdf75d feat(files): safely reorganize existing library files (#781) 2026-11-03 00:26:49 +07:00
Keven Chantre cea54e3acc fix(windows): treat verbatim and plain paths as the same file
On Windows the desktop scanner resolves folders with fs::canonicalize,
so scanned songs are stored as `\\?\C:\...` (or `\\?\UNC\server\...`)
while downloads keep `C:\...`. Path match keys did not relate the two
spellings, so with the download folder added as a Library folder:

- every downloaded song was listed twice (the scanned row was never
  shadowed by its download), and
- Review Duplicates paired each download with its own scanned row, so
  removing the "duplicate" deleted the only copy of the file.

Path match keys now also include the plain spelling of a verbatim path,
in Dart and in the native Rust copy. Rows already stored get the missing
keys once when the Library and History databases open on Windows; rows
that already have them cost one indexed probe. No schema version change.
2026-11-02 12:41:31 +00:00
Keven Chantre 6e89e64a17 feat: Add re-enrich all tracks functionality and related UI components 2026-11-02 02:37:44 +00:00
Keven Chantre 5670a9f594 Merge remote-tracking branch 'upstream/main' into move_files_by_folder_rules 2026-11-01 14:16:50 +00:00
Keven Chantre 7870ad8cf3 feat(files): apply folder and filename rules to existing downloads
Changing the folder organization or filename format only affected new
downloads. Add "Apply Rules to Existing Files" under Settings > Files >
Existing Downloads to move and rename tracks already on disk so they
match the current rules.

- Plan with the same path builders the download pipeline uses, then show
  the number of moves, sample old -> new paths, and what is skipped
  before anything changes
- Move audio files and their .lrc sidecars, update the history rows
  (guarded by the expected old path), drop stale scanned-library rows and
  prune emptied folders inside the download root
- Never overwrite: name collisions get a " (2)" suffix; a local move is
  reverted if its history row changed meanwhile
- SAF folders: copy to the new location, then delete the original (no
  native move yet)
- Skip files outside the current download folder and missing files;
  refuse to run while downloads are active
- History has no playlist or release type: playlist-based folder rules
  rename in place, and a track already in the Singles folder stays there
  when its type is ambiguous
- Add English strings and a settings search entry

Tests: library_reorganizer_test.dart, library_reorganize_plan_test.dart
2026-11-01 14:10:56 +00:00
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