mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-17 04:09:03 +02:00
feat: Add local Docker test environment setup with PowerShell script and Docker Compose.
This commit is contained in:
1 parent
435cdb46ed
commit
b39dd97e5a
8 files changed
+141
-27
No files matched your search
@@ -31,7 +31,7 @@ class LiveChannel {
|
||||
}
|
||||
|
||||
String getStreamUrl(String dns, String username, String password) {
|
||||
return '$dns/live/$username/$password/$streamId.m3u8';
|
||||
return '$dns/live/$username/$password/$streamId.ts';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ class Movie {
|
||||
final String categoryName;
|
||||
final String? containerExtension;
|
||||
final String? rating;
|
||||
final int? durationSecs;
|
||||
|
||||
const Movie({
|
||||
required this.streamId,
|
||||
@@ -52,6 +53,7 @@ class Movie {
|
||||
this.categoryName = '',
|
||||
this.containerExtension,
|
||||
this.rating,
|
||||
this.durationSecs,
|
||||
});
|
||||
|
||||
factory Movie.fromJson(Map<String, dynamic> json) {
|
||||
@@ -69,6 +71,7 @@ class Movie {
|
||||
categoryName: json['category_name']?.toString() ?? '',
|
||||
containerExtension: json['container_extension']?.toString() ?? 'mp4',
|
||||
rating: json['rating']?.toString(),
|
||||
durationSecs: int.tryParse(json['duration_secs']?.toString() ?? json['duration']?.toString() ?? '0'),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ class PlayerScreen extends ConsumerStatefulWidget {
|
||||
final String containerExtension;
|
||||
final List<Channel>? channels;
|
||||
final double? startTime;
|
||||
final Duration? duration;
|
||||
|
||||
const PlayerScreen({
|
||||
super.key,
|
||||
@@ -40,6 +41,7 @@ class PlayerScreen extends ConsumerStatefulWidget {
|
||||
this.containerExtension = 'mp4',
|
||||
this.channels,
|
||||
this.startTime,
|
||||
this.duration,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -133,6 +135,10 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
if (startTimeOverride != null) {
|
||||
playerSrc += '&t=$startTimeOverride';
|
||||
}
|
||||
|
||||
if (widget.duration != null) {
|
||||
playerSrc += '&duration=${widget.duration!.inSeconds}';
|
||||
}
|
||||
|
||||
// Register View Factory (Only needed for Standard Player, but safe to do always or conditionally)
|
||||
ui_web.platformViewRegistry.registerViewFactory(_viewId, (int viewId) {
|
||||
|
||||
@@ -280,6 +280,7 @@ class _SeriesDetailScreenState extends ConsumerState<SeriesDetailScreen> {
|
||||
playlist: widget.playlist,
|
||||
streamType: StreamType.series,
|
||||
containerExtension: episode.containerExtension ?? 'mkv',
|
||||
duration: episode.durationSecs != null ? Duration(seconds: episode.durationSecs!) : null,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -161,6 +161,7 @@ class _MoviesTabState extends ConsumerState<MoviesTab> {
|
||||
playlist: widget.playlist,
|
||||
streamType: StreamType.vod,
|
||||
containerExtension: movie.containerExtension ?? 'mp4',
|
||||
duration: movie.durationSecs != null ? Duration(seconds: movie.durationSecs!) : null,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user