Commit Graph
13 Commits
Author SHA1 Message Date
MichaelandClaude Opus 5 8d74bbb320 feat: XMLTV EPG fallback, Warm Cinema theme, background release
Align the Android app with xtremflow on three fronts.

EPG: add XmltvService, a streaming XMLTV parser (gunzip-aware, indexed to a
-3h/+18h window, JSON disk cache with a 6h TTL). XtreamServiceMobile now falls
back through the provider's xmltv.php, a user-supplied URL, then a community
guide whenever get_short_epg returns nothing. Channels are matched on
epg_channel_id first, then on a normalized name (accents, HD/FHD/4K suffixes,
"FR:" and "|FR|" prefixes). A streamId -> Channel index populated by
getLiveChannels supplies those keys, so no getShortEPG call site changed.
EPG requests are also funnelled through a 3-slot semaphore, as in xtremflow:
a 30-tile grid used to fire 30 parallel player_api.php calls, which rate-limited
panels answered with errors, emptying the guide for the whole screen.

Theme: port the Warm Cinema charter (ember/charcoal/cream, Fraunces + Karla)
into app_colors, app_theme and app_decorations. The 21 Apple TV colour names
already in use are kept as compatibility aliases. mobile_theme now derives from
AppTheme instead of duplicating its 390 lines.

Playback lifecycle: stop reacting to AppLifecycleState.inactive, which fires on
transient Android interruptions such as pulling down the notification shade and
was killing playback. Both engines now release on paused/hidden/detached via
_releasePlayback(): stream stopped, decoder released, timers cancelled, wakelock
dropped. An _isReleased latch keeps the watchdog and reconnect paths from
restarting a stream from the background.

Long-run stability: cancel the six player stream subscriptions on dispose, cap
demuxer-max-back-bytes at 8MB (mpv defaults to 50MiB, which combined with the
150MB readahead pushed the native heap toward an Android memory kill after a few
hours), rebuild on position only while the controls are visible, and dispose the
Lite player's focus nodes.

Startup: prewarmHost() pre-resolves DNS and opens then closes a bare TCP/TLS
socket before playback. No HTTP request is issued, so no provider connection
slot is consumed. Capped at 1.5s.

Verified: flutter analyze clean on all touched files; 19/19 tests, including a
run over a real 46MB/69802-programme dump (517 channels indexed in 1.1s, 5/5
name probes matched); flutter build apk --release succeeds.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-11 19:25:33 +02:00
Michael a1b1363bc8 feat: add mobile Xtream service, data providers, and UI widgets for Live TV and Movies. 2026-03-27 15:15:44 +01:00
Michael e1a0802a0c feat: Add mobile-specific Riverpod providers for Xtream service, live TV, movies, series, and EPG data, along with UI state management. 2026-03-27 13:34:06 +01:00
Michael f85f43e42f feat: Implement MobileMoviesTab for displaying IPTV movies with category browsing and search functionality. 2026-03-27 12:10:23 +01:00
Michael 0010fe12ba feat: Introduce mobile Xtream IPTV service and provider files, remove numerous temporary analysis and build log files, and add a Claude settings file. 2026-03-27 11:38:38 +01:00
Michael ef97c6dc90 feat: Add generated Hive TypeAdapters for AppUser and PlaylistConfig models, and new build/doctor log files. 2026-03-27 11:08:04 +01:00
GitHub CopilotandClaude Haiku 4.5 93b8e5b337 perf(critical): Implement P0 optimization fixes - TiviMate parity
CRITICAL FIXES:
- P0-1: Fix EPG N+1 query storm with batch loading
  * Implement XtreamServiceMobile with getBatchEPG() method
  * Batch load EPG data instead of per-channel requests
  * Reduce 50-200 concurrent requests to 1 request per category
  * Add EPG cache with 1-hour TTL to prevent redundant calls

- P0-2: Remove destructive cache clearing on startup
  * Implement TTL-based cache invalidation
  * Preserve cache between app launches (6h channels, 1h EPG, 30m search)
  * Add HiveService.invalidateExpiredCache() method
  * Expected: -80% startup time on cold launches

- P0-3: Preserve tab state with IndexedStack
  * Replace switch statement with IndexedStack
  * Keep all tabs alive in widget tree
  * Preserve scroll position, search state, filters across tab switches
  * Expected: instant tab switching (<100ms)

HIGH PRIORITY FIXES:
- P1-1: Debounce search input (500ms)
  * Prevent per-keystroke full rebuilds
  * Add search debounce timer

- P1-3: Fix double FocusNode disposal crash
  * Remove duplicate focus node disposal in native_player_screen.dart
  * Prevents StateError on player exit

Expected impact: -75-80% perceived latency, instant tab switching, no OOM on startup.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-25 22:31:36 +01:00
GitHub Copilot 1293a159ee Phase 1: Android-Only Cleanup - Code and configuration cleanup
- Clean web-specific comments from hive_service.dart
- Update platform_utils.dart documentation
- Remove web-specific imports from mobile_xtream_providers.dart
- All platform-specific code removed
- Ready for Flutter build validation
2026-03-25 21:53:53 +01:00
Michael b249074db1 feat: Add initial mobile dashboard screen with Xtream data and UI state providers. 2025-12-20 16:05:01 +01:00
Michael 2406b9b100 feat: introduce XtreamServiceMobile for IPTV API interactions and DnsFallbackInterceptor for network robustness. 2025-12-10 22:16:51 +01:00
Michael 3888a21990 UI: Clean up player controls (remove duplicate arrows, move LIVE badge) 2025-12-09 20:34:44 +01:00
Michael e6281ff912 feat: Add mobile-specific Riverpod providers for Xtream services, including live channels, movies, series, and series info. 2025-12-09 18:36:44 +01:00
Michael d0c5c4ff3a init: Initial Flutter project setup with Android and iOS platform files. 2025-12-09 08:40:50 +01:00