Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/aaa1115910/bv into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ldm0206 committed Dec 24, 2024
2 parents 95739e0 + cc0fa67 commit c64b7f6
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 c64b7f6

Please sign in to comment.