Skip to content

Commit

Permalink
refactor: expose client id non-hex variant
Browse files Browse the repository at this point in the history
  • Loading branch information
devgianlu committed Jan 9, 2024
1 parent 86c4ed9 commit 1eaf92f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion client_id.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
package go_librespot

const ClientId = "65b708073fc0480ea92a077233ca87bd"
import "encoding/hex"

var ClientId = []byte{0x65, 0xb7, 0x8, 0x7, 0x3f, 0xc0, 0x48, 0xe, 0xa9, 0x2a, 0x7, 0x72, 0x33, 0xca, 0x87, 0xbd}
var ClientIdHex = hex.EncodeToString(ClientId)
2 changes: 1 addition & 1 deletion cmd/daemon/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (p *AppPlayer) initState() {
DeviceId: p.app.deviceId,
DeviceType: p.app.deviceType,
DeviceSoftwareVersion: librespot.VersionString(),
ClientId: librespot.ClientId,
ClientId: librespot.ClientIdHex,
SpircVersion: "3.2.6",
Capabilities: &connectpb.Capabilities{
CanBePlayer: true,
Expand Down
2 changes: 1 addition & 1 deletion login5/login5.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (c *Login5) Login(credentials proto.Message) error {

req := &pb.LoginRequest{
ClientInfo: &pb.ClientInfo{
ClientId: librespot.ClientId,
ClientId: librespot.ClientIdHex,
DeviceId: c.deviceId,
},
}
Expand Down
2 changes: 1 addition & 1 deletion session/client_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func retrieveClientToken(deviceId string) (string, error) {
RequestType: pbhttp.ClientTokenRequestType_REQUEST_CLIENT_DATA_REQUEST,
Request: &pbhttp.ClientTokenRequest_ClientData{
ClientData: &pbhttp.ClientDataRequest{
ClientId: librespot.ClientId,
ClientId: librespot.ClientIdHex,
ClientVersion: librespot.VersionString(),
Data: &pbhttp.ClientDataRequest_ConnectivitySdkData{
ConnectivitySdkData: &pbdata.ConnectivitySdkData{
Expand Down

0 comments on commit 1eaf92f

Please sign in to comment.