File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
bili-api/src/main/kotlin/dev/aaa1115910/biliapi Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -644,7 +644,7 @@ object BiliHttpApi {
644644 avid : Long ,
645645 cid : Long ,
646646 sessData : String
647- ): BiliResponse <VideoMoreInfo > = client.get(" /x/player/v2" ) {
647+ ): BiliResponse <VideoMoreInfo > = client.get(" /x/player/wbi/ v2" ) {
648648 parameter(" aid" , avid)
649649 parameter(" cid" , cid)
650650 header(" Cookie" , " SESSDATA=$sessData ;" )
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ data class VideoMoreInfo(
9191 val onlineCount : Int ,
9292 @SerialName(" dm_mask" )
9393 val dmMask : DmMask ? = null ,
94- val subtitle : Subtitle ,
94+ val subtitle : Subtitle ? = null ,
9595 @SerialName(" player_icon" )
9696 val playerIcon : PlayerIcon ? = null ,
9797 @SerialName(" view_points" )
Original file line number Diff line number Diff line change @@ -211,8 +211,9 @@ class VideoPlayRepository(
211211 cid = cid,
212212 sessData = authRepository.sessionData ? : " "
213213 ).getResponseData()
214- response.subtitle.subtitles
215- .map { Subtitle .fromSubtitleItem(it) }
214+ response.subtitle?.subtitles
215+ ?.map { Subtitle .fromSubtitleItem(it) }
216+ ? : emptyList()
216217 }
217218
218219 ApiType .App -> {
You can’t perform that action at this time.
0 commit comments