mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-18 20:59:59 +02:00
feat: add XtreamService for managing IPTV playlists, fetching live channels and VODs, and generating stream URLs.
This commit is contained in:
1 parent
3452208cc3
commit
1c1198f1c1
3 files changed
+88
-18
No files matched your search
@@ -70,18 +70,18 @@ class XtreamService {
|
||||
String getVodStreamUrl(String streamId, String containerExtension) {
|
||||
if (_currentPlaylist == null) throw Exception('No playlist configured');
|
||||
|
||||
// Point to new dedicated VOD API (HLS playlist)
|
||||
// Pass extension to backend for correct upstream URL construction
|
||||
final baseUrl = html.window.location.origin;
|
||||
return '$baseUrl/api/vod/$streamId/playlist.m3u8';
|
||||
return '$baseUrl/api/vod/$streamId.$containerExtension/playlist.m3u8';
|
||||
}
|
||||
|
||||
/// Generate stream URL for series episodes
|
||||
String getSeriesStreamUrl(String streamId, String containerExtension) {
|
||||
if (_currentPlaylist == null) throw Exception('No playlist configured');
|
||||
|
||||
// Point to new dedicated VOD API (HLS playlist)
|
||||
// Pass extension to backend for correct upstream URL construction
|
||||
final baseUrl = html.window.location.origin;
|
||||
return '$baseUrl/api/vod/$streamId/playlist.m3u8';
|
||||
return '$baseUrl/api/vod/$streamId.$containerExtension/playlist.m3u8';
|
||||
}
|
||||
|
||||
/// Authenticate and get server info
|
||||
|
||||
Reference in new issue
Block a user