Skip to content

Commit

Permalink
fix onair
Browse files Browse the repository at this point in the history
  • Loading branch information
ekibun committed Jun 23, 2021
1 parent d9bd4ea commit 07a4941
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
1 change: 0 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,4 @@ dependencies {
implementation "com.caverock:androidsvg-aar:1.4"
implementation "com.umeng.umsdk:common:9.3.8"
implementation "com.umeng.umsdk:asms:1.2.2"
implementation "com.umeng.umsdk:apm:1.2.0"
}
8 changes: 4 additions & 4 deletions app/src/main/java/soko/ekibun/bangumi/api/github/Github.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object Github {
return withContext(Dispatchers.IO) {
JsonUtil.toEntity<List<BangumiCalendarItem>>(
HttpUtil.fetch(
"$JSDELIVR_SERVER_API/gh/ekibun/bangumi_onair/calendar.json",
"$JSDELIVR_SERVER_API/gh/ekibot/bangumi-onair/calendar.json",
JSDELIVR_REQUEST_OPTION
).body!!.string()
)!!
Expand All @@ -60,7 +60,7 @@ object Github {
return withContext(Dispatchers.IO) {
JsonUtil.toEntity<OnAirInfo>(
HttpUtil.fetch(
"$JSDELIVR_SERVER_API/gh/ekibun/bangumi_onair/onair/${id / 1000}/$id.json",
"$JSDELIVR_SERVER_API/gh/ekibot/bangumi-onair/onair/${id / 1000}/$id.json",
JSDELIVR_REQUEST_OPTION
).body?.string() ?: ""
)
Expand All @@ -74,12 +74,12 @@ object Github {
suspend fun getSeason(id: Int): List<Subject>? {
return withContext(Dispatchers.IO) {
val mapId = HttpUtil.fetch(
"$JSDELIVR_SERVER_API/gh/ekibun/bangumi_link/node/${id / 1000}/$id",
"$JSDELIVR_SERVER_API/gh/ekibot/bangumi-link/node/${id / 1000}/$id",
JSDELIVR_REQUEST_OPTION
).body?.string()?.toIntOrNull() ?: return@withContext null
JsonUtil.toEntity<BangumiLinkMap>(
HttpUtil.fetch(
"$JSDELIVR_SERVER_API/gh/ekibun/bangumi_link/map/${mapId / 1000}/$mapId.json",
"$JSDELIVR_SERVER_API/gh/ekibot/bangumi-link/map/${mapId / 1000}/$mapId.json",
JSDELIVR_REQUEST_OPTION
).body?.string() ?: ""
)?.let {
Expand Down

0 comments on commit 07a4941

Please sign in to comment.