Skip to content

Commit

Permalink
fix(123&123share): update version
Browse files Browse the repository at this point in the history
  • Loading branch information
Three-taile-dragon authored and xrgzs committed Nov 29, 2024
1 parent a0459bd commit a1412b3
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 12 deletions.
8 changes: 7 additions & 1 deletion drivers/123/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import (
"encoding/base64"
"encoding/hex"
"fmt"
"github.com/google/uuid"
"golang.org/x/time/rate"
"io"
"net/http"
"net/url"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -56,10 +58,14 @@ func (d *Pan123) Init(ctx context.Context) error {
d.params.AppVersion = TVAndroidAppVer
}

if d.Addition.LoginUuid == "" {
d.Addition.LoginUuid = strings.ReplaceAll(uuid.New().String(), "-", "")
}

d.params.OsVersion = d.OsVersion
d.params.LoginUuid = d.LoginUuid
d.params.DeviceName = d.DeviceName
d.params.DeviceType = d.DeiveType
d.params.LoginUuid = d.Addition.LoginUuid

_, err := d.request(UserInfo, http.MethodGet, nil, nil)
return err
Expand Down
2 changes: 1 addition & 1 deletion drivers/123/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Addition struct {
DeviceName string `json:"devicename" default:"Xiaomi"`
DeiveType string `json:"devicetype" default:"M1810E5A"`
OsVersion string `json:"osversion" default:"Android_8.1.0"`
LoginUuid string `json:"loginuuid" default:"66a4c82756134af2a57d323fd7a5e58c"`
LoginUuid string `json:"loginuuid" default:""`
}

var config = driver.Config{
Expand Down
8 changes: 4 additions & 4 deletions drivers/123/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ const (
)

const (
AndroidUserAgentPrefix = "123pan/v2.4.7" // 123pan/v2.4.7(Android_14;XiaoMi)
AndroidUserAgentPrefix = "123pan/v2.4.8" // 123pan/v2.4.8(Android_14;XiaoMi)
AndroidPlatformParam = "android"
AndroidAppVer = "69"
AndroidXAppVer = "2.4.7"
AndroidXChannel = "1002"
AndroidAppVer = "70"
AndroidXAppVer = "2.4.8"
AndroidXChannel = "1001"
TVUserAgentPrefix = "123pan_android_tv/1.0.0" // 123pan_android_tv/1.0.0(14;samsung SM-X800)
TVPlatformParam = "android_tv"
TVAndroidAppVer = "100"
Expand Down
8 changes: 7 additions & 1 deletion drivers/123_share/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import (
"context"
"encoding/base64"
"fmt"
"github.com/google/uuid"
"golang.org/x/time/rate"
"net/http"
"net/url"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -50,10 +52,14 @@ func (d *Pan123Share) Init(ctx context.Context) error {
d.params.AppVersion = TVAndroidAppVer
}

if d.Addition.LoginUuid == "" {
d.Addition.LoginUuid = strings.ReplaceAll(uuid.New().String(), "-", "")
}

d.params.OsVersion = d.OsVersion
d.params.LoginUuid = d.LoginUuid
d.params.DeviceName = d.DeviceName
d.params.DeviceType = d.DeiveType
d.params.LoginUuid = d.LoginUuid

_, err := d.request(UserInfo, http.MethodGet, nil, nil)
return err
Expand Down
2 changes: 1 addition & 1 deletion drivers/123_share/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Addition struct {
DeviceName string `json:"devicename" default:"Xiaomi"`
DeiveType string `json:"devicetype" default:"M1810E5A"`
OsVersion string `json:"osversion" default:"Android_8.1.0"`
LoginUuid string `json:"loginuuid" default:"66a4c82756134af2a57d323fd7a5e58c"`
LoginUuid string `json:"loginuuid" default:""`
}

var config = driver.Config{
Expand Down
8 changes: 4 additions & 4 deletions drivers/123_share/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ const (
)

const (
AndroidUserAgentPrefix = "123pan/v2.4.7" // 123pan/v2.4.7(Android_14;XiaoMi)
AndroidUserAgentPrefix = "123pan/v2.4.8" // 123pan/v2.4.8(Android_14;XiaoMi)
AndroidPlatformParam = "android"
AndroidAppVer = "69"
AndroidXAppVer = "2.4.7"
AndroidXChannel = "1002"
AndroidAppVer = "70"
AndroidXAppVer = "2.4.8"
AndroidXChannel = "1001"
TVUserAgentPrefix = "123pan_android_tv/1.0.0" // 123pan_android_tv/1.0.0(14;samsung SM-X800)
TVPlatformParam = "android_tv"
TVAndroidAppVer = "100"
Expand Down

0 comments on commit a1412b3

Please sign in to comment.