Skip to content

Commit

Permalink
修复 mcdn 排除无效(App接口)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaa1115910 committed Dec 24, 2024
1 parent 58d9bfe commit cc0fa67
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,10 @@ class VideoPlayerV3ViewModel(
val filteredUrls = urls
.filter { !it.contains(".mcdn.bilivideo.") }
.filter { !it.contains(".szbdyd.com") }
.filter { !Regex("""^https?://\d{1,3}.\d{1,3}""").matches(it) }
.filter {
!Regex("^(https?://)?(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?)(/[a-zA-Z0-9_./-]*)?(\\?.*)?$")
.matches(it)
}
if (filteredUrls.isEmpty()) {
logger.fInfo { "doesn't find any official cdn url, select the first url" }
return urls.first()
Expand Down

0 comments on commit cc0fa67

Please sign in to comment.