Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Commit

Permalink
fix: missing parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonKhew96 committed May 30, 2023
1 parent e46ebd8 commit e1251ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion database/database.go
Expand Up @@ -143,7 +143,7 @@ func (h *DbHelper) InsertOrUpdatePlayURLCache(deviceType DeviceType, formatType
playUrlTable.PreferCodeType = preferCodeType
playUrlTable.EpisodeID = episodeID
playUrlTable.Data = data
return playUrlTable.Upsert(h.ctx, h.db, true, []string{"id"}, boil.Whitelist("data", "updated_at"), boil.Greylist("device_type", "area", "is_vip", "quality"))
return playUrlTable.Upsert(h.ctx, h.db, true, []string{"id"}, boil.Whitelist("data", "updated_at"), boil.Greylist("device_type", "area", "is_vip", "quality", "prefer_code_type"))
}

// CleanupPlayURLCache cleanup playurl if exceeds duration
Expand Down
3 changes: 3 additions & 0 deletions playurl.go
Expand Up @@ -569,6 +569,9 @@ func (b *BiliroamingGo) handleBstarAndroidPlayURL(ctx *fasthttp.RequestCtx) {
v.Set("platform", "android")
v.Set("s_locale", "zh_SG")
v.Set("qn", strconv.Itoa(qn))
if args.preferCodeType {
v.Set("prefer_code_type", "1")
}

params, err := SignParams(v, ClientTypeBstarA)
if err != nil {
Expand Down

0 comments on commit e1251ac

Please sign in to comment.