Skip to content

Commit

Permalink
Fix download on 6.20+
Browse files Browse the repository at this point in the history
  • Loading branch information
yujincheng08 committed Mar 20, 2021
1 parent ff615b0 commit c1d2727
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,16 @@ class BangumiPlayUrlHook(classLoader: ClassLoader) : BaseHook(classLoader) {
private fun fixDownloadProto(builder: PlayViewReply.Builder) = builder.run {
videoInfo = VideoInfo.newBuilder(builder.videoInfo).run {
var audioId = 0
var setted = false
val streams = streamListList.map {
if (it.streamInfo.quality != quality && it.dashVideo.codecid == videoCodecid) {
if (it.streamInfo.quality != quality || setted) {
Stream.newBuilder(it).run {
clearContent()
build()
}
} else {
audioId = it.dashVideo.audioId
setted = true
it
}
}
Expand Down

0 comments on commit c1d2727

Please sign in to comment.