支持部分旧视频

This commit is contained in:
duzhaokun123 2020-04-03 14:32:56 +08:00
parent 159c7ee910
commit 229c229ec7
5 changed files with 48 additions and 7 deletions

View File

@ -5,7 +5,7 @@
# 使用
```groovy
compile group: 'com.hiczp', name: 'bilibili-api', version: '0.1.3'
compile group: 'com.hiczp', name: 'bilibili-api', version: '0.1.4'
```
# 技术说明

View File

@ -16,7 +16,7 @@ buildscript {
}
group = 'com.hiczp'
version = '0.1.3'
version = '0.1.4'
description = 'Bilibili Android client API library for Kotlin'
apply plugin: 'kotlin'

View File

@ -76,7 +76,11 @@ data class View(
@SerializedName("tname")
var tname: String, // 星海
@SerializedName("videos")
var videos: Int // 1
var videos: Int, // 1
@SerializedName("honor")
var honor: Honor,
@SerializedName("bvid")
var bvid: String //BV1xx411c79H
) {
data class Cm(
@SerializedName("ad_info")
@ -445,5 +449,28 @@ data class View(
var hasDanmu: Int // 0
)
}
data class Honor(
@SerializedName("icon")
var icon: String,
@SerializedName("icon_night")
var iconNight: String,
@SerializedName("text")
var text: String,
@SerializedName("text_extra")
var textExtra: String,
@SerializedName("text_color")
var textColor: String, //#F3921F
@SerializedName("text_color_night")
var textColorNight: String,
@SerializedName("bg_color")
var bgColor: String,
@SerializedName("bg_color_night")
var bgColorNight: String,
@SerializedName("url")
var url: String,
@SerializedName("url_text")
var urlText: String
)
}
}

View File

@ -21,11 +21,9 @@ data class LoginResponse(
@SerializedName("status")
var status: Int, // 0
@SerializedName("token_info")
var tokenInfo: TokenInfo
var tokenInfo: TokenInfo,
@SerializedName("url")
var url: String
@SerializedName("status")
var status: int
) : Serializable {
data class CookieInfo(
@SerializedName("cookies")

View File

@ -1,6 +1,7 @@
package com.hiczp.bilibili.api.player.model
import com.google.gson.annotations.SerializedName
import org.jetbrains.annotations.Nullable
data class VideoPlayUrl(
@SerializedName("code")
@ -42,7 +43,9 @@ data class VideoPlayUrl(
@SerializedName("video_codecid")
var videoCodecid: Int, // 7
@SerializedName("video_project")
var videoProject: Boolean // true
var videoProject: Boolean, // true
@SerializedName("durl")
var durl: List<Durl>
) {
data class Dash(
@SerializedName("audio")
@ -76,5 +79,18 @@ data class VideoPlayUrl(
var id: Int // 16
)
}
data class Durl(
@SerializedName("order")
var order: Int,
@SerializedName("length")
var length: Long,
@SerializedName("size")
var size: Long,
@SerializedName("url")
var url: String,
@SerializedName("backup_url")
var backupUrl: List<String>
)
}
}