mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-11-25 11:29:29 +08:00
### Key Changes - **189PC**: Add QR code login and refresh token support - **189TV**: Add session refresh mechanism and fix TempUuid persistence issue - **Both**: Implement session keep-alive with cron jobs (5min interval) ### Features - QR code authentication for 189PC as alternative to password login - Automatic token refresh to avoid frequent re-authentication - Session keep-alive to maintain long-term connections - Retry logic with max attempts to prevent infinite loops ### Fixes - Fixed 189TV TempUuid causing storage corruption on QR code reload - Enhanced error handling for token expiration scenarios
37 lines
1.4 KiB
Go
37 lines
1.4 KiB
Go
package _189pc
|
|
|
|
import (
|
|
"github.com/OpenListTeam/OpenList/v4/internal/driver"
|
|
"github.com/OpenListTeam/OpenList/v4/internal/op"
|
|
)
|
|
|
|
type Addition struct {
|
|
LoginType string `json:"login_type" type:"select" options:"password,qrcode" default:"password" required:"true"`
|
|
Username string `json:"username" required:"true"`
|
|
Password string `json:"password" required:"true"`
|
|
VCode string `json:"validate_code"`
|
|
RefreshToken string `json:"refresh_token" help:"To switch accounts, please clear this field"`
|
|
driver.RootID
|
|
OrderBy string `json:"order_by" type:"select" options:"filename,filesize,lastOpTime" default:"filename"`
|
|
OrderDirection string `json:"order_direction" type:"select" options:"asc,desc" default:"asc"`
|
|
Type string `json:"type" type:"select" options:"personal,family" default:"personal"`
|
|
FamilyID string `json:"family_id"`
|
|
UploadMethod string `json:"upload_method" type:"select" options:"stream,rapid,old" default:"stream"`
|
|
UploadThread string `json:"upload_thread" default:"3" help:"1<=thread<=32"`
|
|
FamilyTransfer bool `json:"family_transfer"`
|
|
RapidUpload bool `json:"rapid_upload"`
|
|
NoUseOcr bool `json:"no_use_ocr"`
|
|
}
|
|
|
|
var config = driver.Config{
|
|
Name: "189CloudPC",
|
|
DefaultRoot: "-11",
|
|
CheckStatus: true,
|
|
}
|
|
|
|
func init() {
|
|
op.RegisterDriver(func() driver.Driver {
|
|
return &Cloud189PC{}
|
|
})
|
|
}
|