mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: select dialog & feat: select subtitle if muted (#564)
* opt: select dialog * opt: subtitle * feat: select subtitle if muted
This commit is contained in:
committed by
GitHub
parent
2ddfea5cf3
commit
82f9f48a8e
@@ -45,20 +45,16 @@ class VideoUtils {
|
||||
String defaultCDNHost = CDNServiceCode.fromCode(defaultCDNService)!.host;
|
||||
debugPrint("defaultCDNHost:$defaultCDNHost");
|
||||
if (videoUrl!.contains("szbdyd.com")) {
|
||||
String hostname =
|
||||
Uri.parse(videoUrl).queryParameters['xy_usource'] ?? defaultCDNHost;
|
||||
videoUrl =
|
||||
Uri.parse(videoUrl).replace(host: hostname, port: 443).toString();
|
||||
} else if (videoUrl.contains(".mcdn.bilivideo")) {
|
||||
final uri = Uri.parse(videoUrl);
|
||||
String hostname = uri.queryParameters['xy_usource'] ?? defaultCDNHost;
|
||||
videoUrl = uri.replace(host: hostname, port: 443).toString();
|
||||
} else if (videoUrl.contains(".mcdn.bilivideo") ||
|
||||
videoUrl.contains("/upgcxcode/")) {
|
||||
videoUrl = Uri.parse(videoUrl)
|
||||
.replace(host: defaultCDNHost, port: 443)
|
||||
.toString();
|
||||
// videoUrl =
|
||||
// 'https://proxy-tf-all-ws.bilivideo.com/?url=${Uri.encodeComponent(videoUrl)}';
|
||||
} else if (videoUrl.contains("/upgcxcode/")) {
|
||||
videoUrl = Uri.parse(videoUrl)
|
||||
.replace(host: defaultCDNHost, port: 443)
|
||||
.toString();
|
||||
}
|
||||
debugPrint("videoUrl:$videoUrl");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user