mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 19:01:15 +00:00
Fix #34
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
@@ -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";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user