Commit Graph
136 Commits
Author SHA1 Message Date
zarzet 1b0c28b91a fix(download): route verification notifications to pending challenges 2026-09-06 16:03:46 +07:00
zarzet 1d96521c0f fix(lyrics): align usability checks with shared fixtures
Trim after removing inline timestamps before matching speaker prefixes in Dart. Run one 21-case usability corpus through Dart, Go, and Kotlin tests.

Document the shared fixture and trigger Dart and Go CI when its resources change.
2026-09-06 14:05:09 +07:00
zarzet 62ef538690 perf(library): page missing-file cleanup with safe SAF batch checks 2026-09-06 02:34:49 +07:00
zarzet 3368cf8c5d perf(cache): enforce cover byte budget during foreground use 2026-09-06 02:33:43 +07:00
zarzet dae509078e perf(queue): apply sparse progress updates with chunked snapshots 2026-09-06 02:33:42 +07:00
zarzet 958b79ebca fix(ui): improve adaptive phone and tablet layouts 2026-09-04 23:44:43 +07:00
zarzet 514081fc6a fix(cover): preserve provider high-resolution artwork 2026-09-04 19:48:15 +07:00
zarzet 448a3426a0 fix(extensions): shorten verification timeout 2026-09-04 17:01:06 +07:00
zarzet cbeada208b feat(library): add bulk duplicate cleanup 2026-09-04 12:39:03 +07:00
zarzet 7be959e7e9 fix(extensions): preserve verification callback retries 2026-09-04 12:39:03 +07:00
zarzet 4aba2926f8 fix(conversion): preserve Unicode SAF document names 2026-09-04 12:39:03 +07:00
zarzet 4ba3ab2fc7 perf(library): optimize CIFS scan recovery 2026-09-01 12:00:37 +07:00
zarzet a1ee346f2f chore(logging): sanitize diagnostics and reduce noise 2026-08-31 01:49:49 +07:00
zarzet f1fb01604d perf(download): reduce progress wakeups and harden retries 2026-08-29 23:47:58 +07:00
zarzet 97fdc85513 fix(security): redact secrets from exported logs 2026-08-29 18:57:06 +07:00
zarzet 5dac33dfa4 fix(download): preserve finalization metadata and library labels 2026-08-29 00:31:25 +07:00
zarzet 2b117415ae feat: add file format library quality label 2026-08-27 16:50:46 +07:00
zarzet 47deb9f34e fix(extensions): resume metadata after verification 2026-08-27 13:08:44 +07:00
zarzet 1a7c20111a feat(library): add lyrics filtering and metadata actions 2026-08-27 01:44:06 +07:00
zarzet 747dea886c fix(runtime): bound resources and quarantine stalled extensions 2026-08-26 21:09:05 +07:00
zarzet 778f58e6e4 fix(lints): await asynchronous work in guarded blocks 2026-08-26 18:35:21 +07:00
zarzet 73051a5feb fix(player): smooth timed lyrics highlighting 2026-08-23 15:06:46 +07:00
zarzet c6437d8428 feat(library): add bit depth quality label mode 2026-08-23 11:42:47 +07:00
zarzet aec7bf7a1b fix(library): show complete quality labels 2026-08-23 11:36:15 +07:00
zarzet 7557ffbf85 fix(metadata): preserve explicit advisory across conversions 2026-08-22 23:24:56 +07:00
zarzet 89d39c4074 fix(metadata): show readable SAF file locations 2026-08-21 01:02:02 +07:00
zarzet 8b231be19a fix(download): unblock queue after verification cancel 2026-08-18 20:50:48 +07:00
zarzet a7423b7f89 feat(metadata): edit release tags and render UPC barcodes 2026-08-18 19:29:12 +07:00
zarzet b378297a99 fix(library): preserve retained files during duplicate cleanup 2026-08-17 21:03:02 +07:00
zarzet 5374883875 fix(download): normalize MP4 audio extension by codec (#512) 2026-08-11 19:07:00 +07:00
Abelardo Ramirez bed95efb29 fix(playlists): thread the source provider id through to recent playlists
Fixes #368.

Reopening a Spotify playlist from "recent access" showed no tracks,
while the first view (right after pasting the URL) worked fine.

Root cause traced across two layers:

1. Go: ExtURLHandleResult (the parsed shape of an extension's handleUrl()
   return value) never captured a top-level `id` for the handled
   resource. Track/album/artist results carry their own id inside their
   nested metadata, but a plain playlist result has no such object, so
   its id was silently dropped everywhere from the goja parser through
   to the JSON the Dart side receives.

2. Dart: TrackState had nowhere to put that id even if it existed
   (only playlistName), so recording a "recent" playlist access stored
   the playlist's *name* as if it were its id. Reopening it later fed
   that name into PlaylistScreen's provider-guessing logic
   (legacyProviderIdFromResourceId, which only recognizes legacy
   "provider:id" prefixes), which naturally failed and fell through to
   a hardcoded Deezer metadata fetch using a Spotify playlist's name as
   the resource id - guaranteed to return nothing.

Fix, matching the "generic API, not per-provider checks" architecture
in CONTRIBUTING.md:

- go_backend/extension_provider_wrapper.go: add ExtURLHandleResult.ID.
- go_backend/extension_goja_convert.go: parse it from the handler's
  return value.
- go_backend/exports_extensions.go: surface it in the JSON response.
- lib/providers/track_provider.dart: add TrackState.playlistId,
  populated from the response's `id` field for playlist results.
- lib/screens/home_tab.dart: record the real playlist id (falling back
  to the name only if a provider never supplies one) and pass both the
  id and the already-known provider id forward to PlaylistScreen.
- lib/screens/playlist_screen.dart: PlaylistScreen gains a
  metadataProviderId param that takes priority over guessing from the
  id's shape.
- lib/screens/home_tab_recent.dart: pass the recent-access entry's
  stored providerId through when reopening a playlist.
- lib/utils/provider_resource_ids.dart: extract the
  known-id-vs-guessed-id preference into a small, directly testable
  resolvePreferredMetadataProviderId helper.

Note: this fixes the common case (an extension already reported its
own id as the source provider for the URL it handled). If a provider
never supplies an id for its handleUrl() playlist result, playlistId
stays null and behavior is unchanged from before this fix - no
regression, just not a complete fix for that narrower case, since
that would require changes in extension-side JS code outside this
repo.

Tests:
- go_backend/extension_goja_convert_url_handle_test.go: the new ID
  field round-trips from a handler's return value, and stays empty
  when the handler doesn't supply one.
- test/provider_resource_ids_test.dart: resolvePreferredMetadataProviderId
  prefers a known provider id, falls back to the legacy-prefix guess,
  treats a blank known id as unknown, and returns null for the
  unprefixed-id-with-no-known-provider case from #368 itself.

Verification: go build/vet/test and flutter analyze/test all green.
2026-08-11 17:29:41 +07:00
Abelardo Ramirez 555fd77cc8 fix(ios): stop dropping the security-scoped download folder bookmark
Fixes #439, likely also #302.

Reported: on iOS, the download folder silently reverts to the default
SpotiFLAC folder after starting a download (and stays reverted after
closing and reopening the app).

_processQueue ran an iCloud/writable-path shape check against the
persisted downloadDirectory string and, if it looked like iCloud Drive
or failed the structural writable-path check, called
setDownloadDirectory() to reset it to the default folder. That call
passes no iosBookmark argument, so it also wipes the user's
security-scoped bookmark in the persisted settings - permanently, not
just for the current run.

This check ran unconditionally, even when a bookmark was already
present for that folder. A folder picked from Files can legitimately
have a persisted path that looks like iCloud Drive, or that fails this
generic structural check, while the bookmark itself still grants real
write access - the bookmark is the actual source of truth, and the
queue already has a separate, correct bookmark-resolution step right
after this one (StartAccessingIosBookmark, with its own proper
failure handling that fails the queued items with a clear message
instead of destroying the setting). The earlier path-shape check just
never deferred to it.

lib/utils/file_access.dart: extract the run/skip decision into
shouldValidateIosOutputDir(isIOS, isSafMode, outputDir,
downloadDirectoryBookmark) - skips whenever a bookmark is present -
and use it in download_queue_provider.dart in place of the inline
condition. Kept as a plain function taking isIOS as a parameter since
Platform.isIOS itself can't be exercised from a host test run.

test/file_access_ios_test.dart covers: runs for a plain app-folder
path, skips when a bookmark is present (the exact #439 case), skips
off iOS, skips in SAF mode, and skips when there's no output dir yet.

Verification: flutter analyze and flutter test (224 tests, all green,
including the 5 new ones) both clean.
2026-08-11 17:28:56 +07:00
zarzet f7439c6793 feat(library): add combined quality label #511 2026-08-11 16:56:12 +07:00
zarzet 28538395c2 fix(metadata): match by primary artist and review results #511 2026-08-11 16:20:03 +07:00
zarzet dacc5abde0 feat(logs): copy selected entries #511 2026-08-11 16:12:05 +07:00
zarzet d5bfc1e365 fix(metadata): prompt verification during autofill #511 2026-08-11 15:38:39 +07:00
zarzet 5237aed25e feat(download): add automatic lossy conversion 2026-08-11 15:19:45 +07:00
zarzet ed60cafb90 fix(search): expose go to album for sparse tracks 2026-08-01 18:01:16 +07:00
zarzet 645a324a5f feat(navigation): add go to album actions 2026-08-01 16:06:08 +07:00
zarzet dc58353c07 fix(lyrics): reject empty embedded payloads 2026-08-01 15:02:03 +07:00
zarzet d4bed9c643 feat(player): polish actions and synced lyrics 2026-07-29 19:29:59 +07:00
zarzet 1e973d5ecb style(dart): apply repository formatting 2026-07-29 14:14:42 +07:00
zarzet e7fbaf7b75 fix(download): suffix only colliding quality variants 2026-07-29 02:43:35 +07:00
zarzet 662558e3e6 fix(ui): sanitize user-facing errors 2026-07-29 01:43:04 +07:00
zarzet 7bf6f32802 fix(extensions): serialize verification callbacks 2026-07-28 14:09:06 +07:00
zarzet 80d9d87870 perf(metadata): avoid SAF copies during quality probes 2026-07-28 01:50:41 +07:00
zarzet 26570792a9 fix(library): persist lossless bitrate metadata 2026-07-28 00:50:20 +07:00
zarzet 454ef53977 feat(library): add quality label display modes 2026-07-27 17:25:39 +07:00
zarzet e4cd52f29f feat(library): highlight high-bitrate quality badges 2026-07-27 16:58:58 +07:00
zarzet 1cdf4b4547 fix(library): retain records when deletion fails 2026-07-27 14:24:39 +07:00