15 Commits
Author SHA1 Message Date
fabiodalez-devandClaude Sonnet 4.6 baaca85f5d v2.5.1: Reduce search debounce 3000ms -> 800ms
3 seconds after the last keystroke was too slow for mobile UX.
800ms is the standard for search bars and still avoids firing on
every keystroke. The 'partial query' behavior is normal for search
(same as Spotify/Google) and not a regression.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 11:53:09 +02:00
fabiodalez-devandClaude Sonnet 4.6 71c94caba3 v2.5.0: Fix artist cover images (Picsum → Tidal)
The unified search (q=) was missing 'artists.profileArt' in the
JSON:API include parameter. Artist items in the included array had
no profileArt relationship data and no artworks, so
resolveArtworkId() always returned null → getCoverUrl(null) →
random Picsum images for all artist cards.

Fix: add artists.profileArt to HiFi.ts includeQ. Verified on device:
12/12 artist cards now show resources.tidal.com images, 0 Picsum.

Also fixes fm-logger.js path (public/js/ instead of js/) so Vite
copies it to dist/js/ as a static asset.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 11:24:20 +02:00
fabiodalez-devandClaude Sonnet 4.6 9dbd8b2163 v2.4.1: Fix streaming for tracks not on Qobuz
- android-service.js: bootstrap localStorage with 3 live HiFi streaming
  instances (eu-central.monochrome.tf, us-west.monochrome.tf,
  hifi-api.kennyy.com.br) so getStreamUrl() Tidal fallback works on
  tracks missing from Qobuz catalog
- build-android.sh patch #53: replace defunct frankfurt-2 (504) with
  the same 3 live instances in storage.js hardcoded fallback
- bump versionCode 7→8, versionName 2.4.0→2.4.1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 10:31:13 +02:00
fabiodalez-devandClaude Sonnet 4.6 c5c87d8c65 gitignore: add android/app/src/main/res/xml/config.xml (generated by cap sync)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 12:27:16 +02:00
fabiodalez-devandClaude Sonnet 4.6 8f67f21b7a v2.4.0: Fix upstream sync for unrelated histories, remove __tidalOriginExtension
- build-android.sh: replace git pull with git archive|tar -x to extract upstream
  web app files without requiring a common git ancestor. Histories are unrelated
  (Android wrapper repo vs upstream web app repo), so git pull/merge would fail.
  Stores last synced upstream SHA in .upstream-sync-sha to skip re-downloads.
- build-android.sh: update cleanup to remove all extracted upstream files instead
  of reverting tracked files (they are not tracked in this repo).
- android/android-service.js: remove window.__tidalOriginExtension flag.
  The upstream proxy-utils.js no longer uses this flag to bypass audio-proxy;
  Capacitor WebView uses monochrome.tf origin (capacitor.config.ts) which already
  satisfies Tidal proxy auth without the extension flag.
- android/fm-logger.js: same — remove __tidalOriginExtension.
- android/app/build.gradle: bump to versionCode 7 / versionName 2.4.0.
- android/app/src/main/res/xml/file_paths.xml: add missing FileProvider paths
  file required by AndroidManifest.xml (was in upstream, missing from our repo).
- .gitignore: add build artifacts (android/.gradle, android/app/build, etc.)
  and .upstream-sync-sha to gitignore.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 12:25:02 +02:00
fabiodalez-dev 1caf8cb5b9 v2.3.0: Fix audio playback on fresh install
Root cause: Capacitor WebView used Origin: https://localhost, which
Tidal API proxies and CDN reject with 403. Changed the WebView
hostname to monochrome.tf so the Origin matches what the upstream
infrastructure expects.

Changes:
- capacitor.config.ts: server.hostname = monochrome.tf (was localhost)
- TidalWebViewClient.java: intercepts Tidal CDN audio requests and
  re-sends with Origin: https://listen.tidal.com (same as the Chrome
  extension "Monochrome Tidal Bypass")
- android-service.js: sets window.__tidalOriginExtension = true so
  upstream proxy-utils.js uses direct CDN URLs instead of the broken
  audio-proxy.binimum.org
- fm-logger.js: blocks SW registration before any other script loads
- build-android.sh: forces shouldTryNative=true for streaming so
  HiFiClient is tried before proxy instances, adds frankfurt-2 to
  streaming fallback, enriches search albums from track data
2026-04-22 20:01:15 +02:00
fabiodalez-dev 8b911b63bb v2.2.0: Fix scroll, remove pull-to-refresh, enrich search albums
Search:
- Reverted debounce to upstream 3000ms (our 700ms caused partial
  results during typing)
- New patch: enrich albums missing artist name and cover art from
  track data in the same search response (v2 API workaround)

UI:
- Removed pull-to-refresh (was triggering false reloads when
  scrolling up on album/artist pages)
- Restored scroll-to-top on navigation (pushState/popstate resets
  .main-content.scrollTop without touching window.scrollTo)

Upstream sync: b6b425a (latest)
2026-04-22 16:58:11 +02:00
fabiodalez-dev 3aab74e451 v2.1.0: Fix audio playback (CORS/workbox), add console logger
Audio Fix:
- Unregister service worker on Android — workbox CacheFirst on
  audio/video caused CORS failures on Tidal CDN streams
- Patch workbox config: CacheFirst → NetworkOnly for audio/video
- Shim @capgo/capacitor-media-session (our AudioForegroundService
  handles MediaSession natively)

Console Logger:
- fm-logger.js loaded synchronously in <head> (captures ALL output
  from the very first script execution)
- Intercepts console.log/warn/error/info/debug + window.onerror +
  unhandledrejection + fetch errors (4xx/5xx/network)
- Saves to Downloads/FabiodalezMusic/fm-console-log.txt every 30s
  and on app background
- Max 3000 entries, timestamped, with error flag

Search Simplification:
- Removed wrapper-side search hooks (dropdown preview, highlight,
  monkey-patch, cache cleanup) — upstream search flow handles it
- Kept upstream patches: debounce 700ms, limit=100, min 3 chars,
  cache normalization

Upstream Sync:
- Pulled ~60 new commits including Tidal API v2 migration for
  artists, artist banners, animated covers, mobile CSS, audio
  slider fix, international fonts

Closes #4: haptic feedback removed.
2026-04-18 13:23:22 +02:00
fabiodalez-dev 3b5503bb45 v2.0.0: 50+ optimizations, search fixes, robust build system
Major wrapper rewrite with architecture-level improvements:

Search & Performance:
- Debounce 3000ms → 700ms with min 3-char threshold
- Explicit &limit=100 on all search endpoints (shows all albums)
- Cache normalization: trim/lowercase/NFD diacritics (Björk = bjork)
- Per-type TTL: tracks 10min, artists 60min, albums 30min
- CDN preconnect/dns-prefetch for Tidal API endpoints

Android Native:
- WebView hardening: cache mode, DOM storage, text zoom, HW accel
- AudioForegroundService: ExecutorService + LruCache for cover art
- MediaSession hardware keys (headphones, Bluetooth, car stereo)
- LocalFilesBridge: content:// URI streaming (no more base64 OOM)
- Safe onDestroy with try/catch, RECEIVER_NOT_EXPORTED
- windowSoftInputMode=adjustResize, WindowInsetsController migration
- Splash screen config, largeHeap, hardwareAccelerated in manifest
- Back button dismisses modals/lyrics/fullscreen before navigating

UI/UX:
- Tap targets ≥ 48dp, touch feedback (active state), route fade
- Responsive card grid (2-4 cols based on screen width)
- Pull-to-refresh, swipe left/right on now-playing-bar
- Safe-area CSS variables (--fm-safe-top/bottom)
- Double-back-to-exit with toast confirmation

Build System:
- fm-build.sh: one-shot install + build entry point
- verify-patches.sh: dry-run patch verification (CI-ready)
- PATCHES.md: full documentation of all 50+ optimizations
- Robust cleanup trap (file-by-file git checkout)
- @capgo/capacitor-media-session shimmed (our ForegroundService wins)
- Upstream bug workarounds: sourcemap-codec override, backtick typo

Bug Fixes:
- JS injection via filename (escape backslash before apostrophe)
- Timer leak in setInterval without clearInterval
- Notification channel created once (singleton pattern)
- Notification ID reuse (no tray accumulation)
- ClipboardManager null check
- DownloadBridge thread-safe with background executor

Closes #4: haptic/vibration feedback removed entirely.
2026-04-15 11:57:06 +02:00
fabiodalez-dev 74eecfa007 Merge pull request #3 from uziff/main
Update repo link and directory name in Quick Start section
2026-04-08 16:54:11 +02:00
fabiodalez-dev 29f6f98ffe v1.3.0: Bluetooth auto-pause, visible navigation bar, upstream sync
- Auto-pause playback when Bluetooth disconnects (ACTION_AUDIO_BECOMING_NOISY)
- Show Android virtual navigation bar instead of hiding it in immersive mode
- Navigation bar color matches app theme (#1a1a1a)
- Capacitor edge-to-edge margin adjustment enabled
- Synced with 237 new upstream commits (visualizer, lyrics toggle, reviews, fixes)
2026-04-08 13:08:07 +02:00
fabiodalez-dev f3ea7b8d24 fix: handle duplicate splash resource from upstream Capacitor setup
Upstream now ships android/ with splash.png. Capacitor sync generates
splash.xml in the same drawable dir, causing Gradle to fail with
"Duplicate resources". Build script now removes splash.png when both exist.
2026-03-25 23:11:51 +01:00
fabiodalez-dev af2e6b064f Add Buy Me a Coffee badge 2026-03-16 11:31:09 +01:00
fabiodalez-dev 55d8764f39 v1.1.0: Queue panel safe area, touch drag, clipboard, OAuth, back button, layout fixes 2026-03-16 11:28:24 +01:00
fabiodalez-dev 287fd03d89 Initial release: Fabiodalez Music Android wrapper
Android overlay for Monochrome music streaming app featuring:
- Background playback via Foreground Service + MediaSession
- Media controls (notification, lock screen, Bluetooth)
- Battery optimization bypass
- File downloads to Downloads/FabiodalezMusic/
- Local music folder picker
- OAuth via Chrome Custom Tab
- Clipboard bridge
- Immersive navigation bar
- Back button navigation
- Custom branding and splash screen
- Auto-update build script (pulls from upstream)
2026-03-16 11:26:19 +01:00