diff --git a/bili-api/src/main/kotlin/dev/aaa1115910/biliapi/entity/video/VideoDetail.kt b/bili-api/src/main/kotlin/dev/aaa1115910/biliapi/entity/video/VideoDetail.kt index 9d0fd5b8..b18efb09 100644 --- a/bili-api/src/main/kotlin/dev/aaa1115910/biliapi/entity/video/VideoDetail.kt +++ b/bili-api/src/main/kotlin/dev/aaa1115910/biliapi/entity/video/VideoDetail.kt @@ -103,7 +103,8 @@ data class VideoDetail( author = Author.fromVideoOwner(videoDetail.view.owner), pages = videoDetail.view.pages.map { VideoPage.fromVideoPage(it) }, ugcSeason = videoDetail.view.ugcSeason?.let { UgcSeason.fromUgcSeason(it) }, - relatedVideos = videoDetail.related.map { RelatedVideo.fromRelate(it) }, + relatedVideos = videoDetail.related?.map { RelatedVideo.fromRelate(it) } + ?: emptyList(), redirectToEp = videoDetail.view.redirectUrl?.contains("ep") ?: false, epid = videoDetail.view.redirectUrl?.split("ep", "?")?.get(1)?.toInt(), argueTip = videoDetail.view.stat.argueMsg.takeIf { it.isNotEmpty() }, diff --git a/bili-api/src/main/kotlin/dev/aaa1115910/biliapi/http/entity/video/VideoDetail.kt b/bili-api/src/main/kotlin/dev/aaa1115910/biliapi/http/entity/video/VideoDetail.kt index 515f3049..50efaeb8 100644 --- a/bili-api/src/main/kotlin/dev/aaa1115910/biliapi/http/entity/video/VideoDetail.kt +++ b/bili-api/src/main/kotlin/dev/aaa1115910/biliapi/http/entity/video/VideoDetail.kt @@ -18,7 +18,7 @@ data class VideoDetail( //@SerialName("Reply") //val reply:Any @SerialName("Related") - val related: List, + val related: List?, @SerialName("Spec") val spec: JsonObject? = null, @SerialName("hot_share")