diff --git a/Dockerfile b/Dockerfile index 9983156..235d188 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,41 +1,32 @@ # Stage 1: Build Flutter Web Application FROM ghcr.io/cirruslabs/flutter:stable AS web-builder -# Run as root for setup USER root WORKDIR /app -# Disable analytics and precache early to cache this layer -ENV FLUTTER_NO_ANALYTICS=1 -RUN flutter config --no-analytics && \ - flutter config --enable-web && \ - flutter precache --web - # Optimize DART VM Memory for build ENV DART_VM_OPTIONS="--old_gen_heap_size=16384" +ENV FLUTTER_NO_ANALYTICS=1 -# Safe directory configuration for git (needed even if we ignore .git for some flutter tools) -RUN git config --global --add safe.directory /app +# Enable web support +RUN flutter config --enable-web -# Copy dependency files first for better caching +# Copy dependency files first COPY pubspec.yaml ./ RUN flutter pub get -# Copy source code (respecting .dockerignore) +# Copy source code COPY . . # Generate code RUN dart run build_runner build --delete-conflicting-outputs # Build web application -# --no-pub ensures we use what we got in the previous layer -# --web-renderer canvaskit for higher quality (since we have 64GB RAM) RUN flutter build web --release \ --base-href="/" \ --no-pub \ --no-wasm-dry-run \ --no-tree-shake-icons \ - --web-renderer canvaskit \ --verbose # ============================================ diff --git a/lib/features/iptv/services/xtream_service.dart b/lib/features/iptv/services/xtream_service.dart index e297bd2..d651eef 100644 --- a/lib/features/iptv/services/xtream_service.dart +++ b/lib/features/iptv/services/xtream_service.dart @@ -370,7 +370,7 @@ class XtreamService { 'password': _currentPlaylist!.password, 'action': 'get_vod_streams', }, - options: Options(extra: options), + options: Options(extra: _cacheOptions.toExtra()), ); final List allMovies = response.data as List; @@ -409,7 +409,7 @@ class XtreamService { 'password': _currentPlaylist!.password, 'action': 'get_vod_streams', }, - options: Options(extra: options), + options: Options(extra: _cacheOptions.toExtra()), ); final List allMovies = response.data as List; @@ -450,7 +450,7 @@ class XtreamService { 'password': _currentPlaylist!.password, 'action': 'get_series', }, - options: Options(extra: options), + options: Options(extra: _cacheOptions.toExtra()), ); final List allSeries = response.data as List; @@ -489,7 +489,7 @@ class XtreamService { 'password': _currentPlaylist!.password, 'action': 'get_series', }, - options: Options(extra: options), + options: Options(extra: _cacheOptions.toExtra()), ); final List allSeries = response.data as List; @@ -527,7 +527,7 @@ class XtreamService { 'action': 'get_series_info', 'series_id': seriesId, }, - options: Options(extra: options), + options: Options(extra: _cacheOptions.toExtra()), ); return xm.SeriesInfo.fromJson(response.data as Map); @@ -551,7 +551,7 @@ class XtreamService { 'action': 'get_vod_info', 'vod_id': vodId, }, - options: Options(extra: options), + options: Options(extra: _cacheOptions.toExtra()), ); final data = response.data as Map;