This commit is contained in:
kodjomoustapha
2024-02-26 09:22:55 +01:00
parent 8434c4d9e4
commit 15ee9f3cab
2 changed files with 19 additions and 10 deletions

View File

@@ -160,6 +160,8 @@ class DopeFlix extends MProvider {
final vidUrl = final vidUrl =
substringBefore(substringAfter(resSource, "\"link\":\""), "\""); substringBefore(substringAfter(resSource, "\"link\":\""), "\"");
List<MVideo> a = []; List<MVideo> a = [];
String masterUrl = "";
String type = "";
if (name.contains("DoodStream")) { if (name.contains("DoodStream")) {
a = await doodExtractor(vidUrl, "DoodStream"); a = await doodExtractor(vidUrl, "DoodStream");
} else if (["Vidcloud", "UpCloud"].contains(name)) { } else if (["Vidcloud", "UpCloud"].contains(name)) {
@@ -171,6 +173,7 @@ class DopeFlix extends MProvider {
headers: {"X-Requested-With": "XMLHttpRequest"})) headers: {"X-Requested-With": "XMLHttpRequest"}))
.body; .body;
final encrypted = getMapValue(resServer, "encrypted"); final encrypted = getMapValue(resServer, "encrypted");
String videoResJson = ""; String videoResJson = "";
if (encrypted == "true") { if (encrypted == "true") {
final ciphered = getMapValue(resServer, "sources"); final ciphered = getMapValue(resServer, "sources");
@@ -189,15 +192,20 @@ class DopeFlix extends MProvider {
index += item.last; index += item.last;
} }
videoResJson = decryptAESCryptoJS(ciphertext, password); videoResJson = decryptAESCryptoJS(ciphertext, password);
} else { masterUrl = ((json.decode(videoResJson) as List<Map<String, dynamic>>)
videoResJson = resServer; .first)['file'];
}
String masterUrl = type = ((json.decode(videoResJson) as List<Map<String, dynamic>>)
((json.decode(videoResJson) as List<Map<String, dynamic>>) .first)['type'];
.first)['file']; } else {
String type = ((json.decode(videoResJson) as List<Map<String, dynamic>>) masterUrl =
.first)['type']; ((json.decode(resServer)["sources"] as List<Map<String, dynamic>>)
.first)['file'];
type =
((json.decode(resServer)["sources"] as List<Map<String, dynamic>>)
.first)['type'];
}
final tracks = (json.decode(resServer)['tracks'] as List) final tracks = (json.decode(resServer)['tracks'] as List)
.where((e) => e['kind'] == 'captions' ? true : false) .where((e) => e['kind'] == 'captions' ? true : false)
@@ -213,6 +221,7 @@ class DopeFlix extends MProvider {
subtitles.add(subtitle); subtitles.add(subtitle);
} catch (_) {} } catch (_) {}
} }
subtitles = sortSubs(subtitles, source.id); subtitles = sortSubs(subtitles, source.id);
if (type == "hls") { if (type == "hls") {
final masterPlaylistRes = final masterPlaylistRes =
@@ -227,7 +236,7 @@ class DopeFlix extends MProvider {
if (!videoUrl.startsWith("http")) { if (!videoUrl.startsWith("http")) {
videoUrl = videoUrl =
"${masterUrl.split("/").sublist(0, masterUrl.split("/").length - 1).join("/")}/$videoUrl"; "${(masterUrl as String).split("/").sublist(0, (masterUrl as String).split("/").length - 1).join("/")}/$videoUrl";
} }
MVideo video = MVideo(); MVideo video = MVideo();

View File

@@ -2,7 +2,7 @@ import '../../../model/source.dart';
import 'src/dopebox/dopebox.dart'; import 'src/dopebox/dopebox.dart';
import 'src/sflix/sflix.dart'; import 'src/sflix/sflix.dart';
const _dopeflixVersion = "0.0.4"; const _dopeflixVersion = "0.0.45";
const _dopeflixSourceCodeUrl = const _dopeflixSourceCodeUrl =
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/anime/multisrc/dopeflix/dopeflix.dart"; "https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/anime/multisrc/dopeflix/dopeflix.dart";