Commit Graph
3694 Commits
Author SHA1 Message Date
zarzet 9c435c4573 chore(link): drop an unused import from the sync protocol 2026-10-25 02:39:04 +07:00
zarzet 68dd11bf55 Merge branch 'link/l3a-client' into link/integration 2026-10-25 02:38:02 +07:00
zarzet 796b26ba56 fix(link): let the server derive starred artist ids from names
The app reported favorite artists as ids it computed with a looser
normalization than the catalog, so some never matched. getStarred now
sends artist names and the server maps them with its own rule; unstar
matches favorites by name as well.
2026-10-25 02:38:02 +07:00
zarzet 32fc942a04 feat(link): add the phone client for desktop discovery and pairing
Phones find Mornye on a computer over mDNS (bonsoir, _mornye._tcp),
pair with its 6-digit PIN and keep a live session with the chosen
desktop.

- Pinned HTTPS: first contact records the presented certificate and
  checks it against info and the mDNS fingerprint; later requests and
  the WebSocket accept only that SHA-256.
- Pairing posts the PIN proof, maps bad_proof, pairing_closed and 429
  to clear errors, saves a Subsonic API-key network connection, adds it
  to Library and scans it. Re-pairing replaces the key in place.
- LinkClientSession: Bearer JSON get/post with timeouts and
  LinkException mapping, WebSocket hello/welcome, backoff from 1 s
  doubling to 30 s, pause in the background, reconnect when discovery
  sees the desktop again, address updates when it moves.
- LinkClientController publishes the active session through
  linkActiveClientProvider and rescans on catalog.changed.
- Settings entry "Mornye on your computer" on Android and iOS with
  nearby and paired computers, PIN and manual address dialogs, forget,
  and local network permission, Wi-Fi and certificate warnings.
- iOS NSBonjourServices and the Android multicast permission.
2026-10-25 02:37:07 +07:00
zarzet 9e5994381b Merge branch 'link/l4-sync' into link/integration 2026-10-25 02:35:32 +07:00
zarzet 0b406d5f1f feat(link): sync collections and history between phone and desktop
registerLinkSyncHandlers answers the collections and history endpoints
and the Subsonic playlist, star, getStarred and scrobble ops on the
desktop, and announces changes through linkCollectionsChangedHookProvider.
linkSyncRunnerProvider keeps the phone in sync on connect, on
collections.changed and after local edits, with per-server cursors.
2026-10-25 02:34:45 +07:00
zarzet 6cbfcf8248 feat(link): track collection and listening changes for sync
Collections schema v3 adds link_sync_state and link_sync_changes with
SQLite triggers on every collection table, so Dart, native publication
and restore writes are all recorded, one coalesced row per key with
tombstones. Existing rows are seeded on upgrade. Native jobs keep
reading and staging v2 copies of the collection tables.

Listening statistics v2 adds per-author running totals with a stable
(origin, day, track key) id. Stores page changes by cursor and apply
peer changes by last writer wins without echoing them as local.
2026-10-25 02:34:45 +07:00
zarzet b0a02c6bd2 fix(link): list OpenSubsonic extensions without credentials 2026-10-25 02:30:05 +07:00
zarzet e78b53b2c4 Merge branch 'link/l1b-subsonic' into link/integration
# Conflicts:
#	rust_backend/crates/link/Cargo.toml
2026-10-25 02:29:31 +07:00
zarzet 7b72b384ba feat(link): serve the desktop library over OpenSubsonic
Index the NDJSON catalog export into albums, artists, genres and a
case- and diacritic-insensitive search, with contract ids (al-/ar- +
16 hex of SHA-256). Answer the catalog endpoints in OpenSubsonic JSON
or Subsonic XML, stream and download files with single-range support,
transcode through ffmpeg when asked (killed when the client goes
away), resize and cache cover art, and forward playlists, stars,
scrobbles and the play queue to the app with song ids expanded both
ways.
2026-10-25 02:28:06 +07:00
zarzet 72573a99cf Merge branch 'link/l1a-server' into link/integration 2026-10-25 02:26:02 +07:00
zarzet b53d12db58 feat(link): add the HTTPS server core and desktop link methods
Implements the Mornye Link server core (unit L1a) in mornye-link:
- tls: self-signed ECDSA P-256 certificate for mornye.local, generated
  once into cert.pem/key.pem, pinned by its SHA-256 fingerprint
- store: server.json and devices.json, atomic private writes
- auth: Subsonic apiKey, salted token and password schemes, Bearer keys
- pairing: 6-digit PIN window with HMAC proof, attempt limit, expiry
  and a per-address rate limit
- server/api: own Tokio runtime, port policy with persistence, dual-stack
  TLS listener, /rest routing to the Subsonic layer, /mornye/v1 info,
  pair, ws and forwarding with a request timeout
- ws: hello/welcome sessions, client list events, pushes, pings and
  idle drop, newest connection per device wins
- mdns: _mornye._tcp advertisement, best effort

mornye-desktop gains the link* methods and bridges forwarded requests
to Dart as linkRequest inbound calls answered by linkReply.
2026-10-25 02:24:55 +07:00
zarzet 47f61bf46a feat(link): share the active client, router and catalog index providers 2026-10-25 01:59:28 +07:00
zarzet d430bd73d7 feat(link): add the Mornye Link crate skeleton and shared protocol types
Mornye Link lets the phone app use the desktop app over the local
network. This adds the mornye-link crate with the types its server and
Subsonic layers share, and the Dart protocol models, desktop request
router and phone client interface the feature units build on.
2026-10-25 01:57:47 +07:00
zarzet f20dcf434a fix(settings): keep loading when retired credential cleanup fails
An invalidated keystore made reading or deleting the retired secret
throw and block settings from loading. The cleanup now logs the error
and continues without touching the other stored credentials.
2026-10-25 01:37:22 +07:00
zarzet 824bff1072 feat(player): shuffle downloads and scanned songs from the Library
Library shuffle pages through the queue Library query, so it plays
downloads as well as enabled scanned sources. It starts on a random
song with shuffle on and keeps the Library order underneath, so
turning shuffle off returns to it. The unused getAll query is gone.
2026-10-25 01:37:22 +07:00
zarzet 2ecd433b3f fix(player): reshuffle each repeat-all pass in shuffle mode
When a shuffled queue wraps under repeat all, the next pass opens with
a random queued song other than the one that just finished and plays
in a new order, instead of looping the same order. AutoMix into the
wrap prepares that opener and starts the reshuffled pass.
2026-10-25 01:37:22 +07:00
zarzet 1b7bcfd92a feat(search): group sort and view tools as on Library pages
The Library toolbar's connected button group moves to a shared
ToolButtonGroup, and Material search results use it for Sort and the
list or grid tool. Mornye keeps its text Sort and icon buttons.
2026-10-25 00:55:18 +07:00
zarzet dd06e67139 fix(desktop): open sidebar links without passing the Library root
A playlist link now replaces the Library page at once, before the tab
switches, so the Library root no longer flashes for a frame and the
page does not slide in.
2026-10-25 00:55:18 +07:00
zarzet 5eff5e814d feat(desktop): animate Material rail items like the playlist rows
Home, Library, Repo and Settings now take the Playlists rows' fill,
hover and ink ripple. On collapse the expanded row narrows with the
rail and fades while the compact indicator fades in around a fixed
icon, instead of morphing one pill that flattened into a line.
2026-10-25 00:55:18 +07:00
zarzet 753ab00006 ci(windows): prepare verified SignPath release signing 2026-10-25 00:52:41 +07:00
zarzet 92a41641b7 fix(ui): keep page titles clear of the back button
Desktop and short landscape windows shortened the page header, so the
large title ran into the back button. Pages with a back button keep the
full 120dp header; tab roots keep the shorter one.
2026-10-25 00:26:10 +07:00
zarzet a985ea0e87 feat(desktop): expand the Material rail and list playlists in it
Wide windows now open with the rail expanded. A menu button on top and
the sidebar shortcut toggle it, and the choice is kept across launches.
Collapsed, the rail shows icons alone, named by tooltips. Expanded, its
pills span the rail, and a Playlists section (All Playlists and the
user's playlists) fills the space under the destinations. Library
returns to the Library root while a playlist is open.
2026-10-25 00:26:10 +07:00
zarzet 1158d0881b feat(player): group Material shuffle and repeat and start-align the title
The Material phone player moves shuffle and repeat out of the transport
into a connected two-segment group in the footer, between the lyrics
toggle and the output button. The selected segment fills its own shape
with primaryContainer, and the pressed one widens. Without them the
transport spans the timeline. The title, artist and lyrics now start at
the leading edge, as in Mornye; a duet's second voice keeps the end.

Selected mode buttons take the content colour of their fill, so the icon
stays legible on light neutral cover schemes.
2026-10-25 00:26:10 +07:00
zarzet 1b348511e3 fix(library): keep playlist songs visible in Songs and Singles
Playlist membership no longer removes tracks from library pages while their counts still include them. Keep the cached page content independent of playlist membership.

Verified with 43 library tests covering both styles, mobile and desktop layouts, list and grid views, and switching from Mornye to Material. Related to #726.
2026-10-25 00:04:21 +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 b26af322b4 chore(desktop): build macOS FFmpeg with Opus 1.6.1 and NASM 3.02 2026-10-24 12:12:27 +07:00
zarzet fdc94673e1 chore(android): update Gradle to 9.8.2 and android-junit5 to 2.0.2 2026-10-24 12:12:27 +07:00
zarzet 420bd14111 chore(flutter): update packages and refresh the iOS pod lock
open_filex 5 ships a Swift package, so it leaves the Podfile lock; the
lock also picks up the current Podfile and podspec checksums. dbus and
connectivity_plus stay on dbus 0.7 because desktop_drop 0.8.4 still
needs it, and desktop_drop stays below 0.9 while share_plus needs
cross_file 0.3.
2026-10-24 12:12:27 +07:00
zarzet c55f513a77 chore(rust): update toolchain, Tokio, scraper and lockfile dependencies
Rust 1.99.1, Tokio 1.54.1, zip 9.0.5, libc 0.2.191 and
rustls-native-certs 0.8.5. scraper 0.29 moves to html5ever 0.40, so
the parser pin follows it. The Unicode 15 table pins and the vendored
rustix, cap-std and libusb1-sys sources stay as they are.
2026-10-24 12:12:27 +07:00
zarzet dddf992a45 chore: bump version to 5.3.0 (166) 2026-10-24 11:35:09 +07:00
zarzet 29ded7e46e perf(preview): resolve extension previews when they play
Extensions that require the new deferredPreview runtime feature return
mornye-preview:<extension>/<track> links instead of a sample URL. The
preview player resolves such a link through the extension's
resolvePreview function when the preview starts, so a search no longer
waits for one sample lookup per track.
2026-10-24 11:35:08 +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 22a0bee300 fix(downloads): trust the audio bytes over a provider's FLAC label
A provider could label a download as FLAC while returning other bytes,
and the backend then wrote FLAC tags into them and failed with "fLaC
head incorrect" (Mornye-Desktop issue #6), ending the whole download.
The download probe now reads the container from the file itself: FLAC,
including behind an ID3v2 tag, MP4 or MP3. A FLAC label on MP4 or MP3
bytes yields to the bytes, so the file is published with its real
suffix and FLAC in MP4 is still remuxed by the app. Unrecognized bytes
behind a FLAC label, such as an error page, fail that provider with a
clear message so the next provider can try.
2026-10-24 10:47:45 +07:00
zarzet 6eaffa5942 test(search): cover the wide result layouts and pin the phone rows
The narrow suite compares what the Search tab paints on phones, a
landscape phone, a portrait tablet and a narrow desktop window, in both
styles, against fingerprints recorded on the previous layout. The wide
suite covers the cover grid (tap, cover saving, sort, keys, RTL), the
All view songs and shelves with their Show all controls, the desktop
song table activating like a phone row, and skeleton geometry.
2026-10-24 10:36:50 +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 593662c39a feat(desktop): let the song table keep the preview and cover saving
Search songs move to TrackListTable on wide desktop windows. The table
can now show a dense preview button beside the title and save a row's
cover on a long press of its artwork, as the phone search rows do.
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 4bdd22d2e8 fix(android): preserve audio routing during player initialization
Preserve the system audio mode and speakerphone route when only player settings change. Apply explicit global routing changes using the incoming context instead of the previous defaults.

Verified with three native routing regression tests and 34 Dart player tests. The Android build and audioplayers lint checks pass. Related to #721.
2026-10-24 10:30:12 +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 415fb5b3ce refactor(repo): build the store category chips from a list
The six chips differed only in category and label; their icons now come
from the same category icon mapping the extension rows use.
2026-10-24 00:12:34 +07:00
zarzet 25d47ac61b chore: remove unused searchProviders and a write-only track index
ExtensionNotifier.searchProviders had no caller, and the search result row
never read the index it was given.
2026-10-24 00:12:34 +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 72c3498fc1 refactor: drop the always-true AnimatedSelectionCheckbox visible flag
All five callers passed visible: true, so the scale wrapper only ever
held 1.0 and painted nothing of its own; the flag and the wrapper go.
2026-10-24 00:12:34 +07:00
zarzet 1947a33325 refactor: fix MotionHeaderBanner to cover and top center
No caller set fit or alignment, so the video always used the defaults;
the parameters go.
2026-10-24 00:12:34 +07:00
zarzet a2b93b5f79 refactor: drop the unused AppChoiceChip visualDensity
No caller passed it, and ChoiceChip and FilterChip already default to
null.
2026-10-24 00:12:34 +07:00
zarzet fff4e2e9e3 refactor: drop AppTextField options every caller left at default
textCapitalization, showCounter and enabled were never passed; the
underlying fields already default to the same values.
2026-10-24 00:12:34 +07:00
zarzet 3728418884 refactor: drop showAppBottomSheet flags no caller sets
No caller passed isScrollControlled, isDismissible, enableDrag or
showHandle, so the helper now uses their defaults directly.
2026-10-24 00:12:34 +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