mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-11 17:30:00 +02:00
feat: Implement Xtream Codes API service for IPTV content and streamline the Dockerfile web build process.
This commit is contained in:
1 parent
df33c02d1d
commit
4f6b5fe14e
2 files changed
+11
-20
No files matched your search
+5
-14
@@ -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
|
||||
|
||||
# ============================================
|
||||
|
||||
@@ -370,7 +370,7 @@ class XtreamService {
|
||||
'password': _currentPlaylist!.password,
|
||||
'action': 'get_vod_streams',
|
||||
},
|
||||
options: Options(extra: options),
|
||||
options: Options(extra: _cacheOptions.toExtra()),
|
||||
);
|
||||
|
||||
final List<dynamic> allMovies = response.data as List<dynamic>;
|
||||
@@ -409,7 +409,7 @@ class XtreamService {
|
||||
'password': _currentPlaylist!.password,
|
||||
'action': 'get_vod_streams',
|
||||
},
|
||||
options: Options(extra: options),
|
||||
options: Options(extra: _cacheOptions.toExtra()),
|
||||
);
|
||||
|
||||
final List<dynamic> allMovies = response.data as List<dynamic>;
|
||||
@@ -450,7 +450,7 @@ class XtreamService {
|
||||
'password': _currentPlaylist!.password,
|
||||
'action': 'get_series',
|
||||
},
|
||||
options: Options(extra: options),
|
||||
options: Options(extra: _cacheOptions.toExtra()),
|
||||
);
|
||||
|
||||
final List<dynamic> allSeries = response.data as List<dynamic>;
|
||||
@@ -489,7 +489,7 @@ class XtreamService {
|
||||
'password': _currentPlaylist!.password,
|
||||
'action': 'get_series',
|
||||
},
|
||||
options: Options(extra: options),
|
||||
options: Options(extra: _cacheOptions.toExtra()),
|
||||
);
|
||||
|
||||
final List<dynamic> allSeries = response.data as List<dynamic>;
|
||||
@@ -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<String, dynamic>);
|
||||
@@ -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<String, dynamic>;
|
||||
|
||||
Reference in new issue
Block a user