Skip to content

Commit

Permalink
refactor: rename package to github.com/devgianlu/go-librespot
Browse files Browse the repository at this point in the history
  • Loading branch information
devgianlu committed Aug 6, 2024
1 parent 68b0765 commit 34f6371
Show file tree
Hide file tree
Showing 74 changed files with 215 additions and 191 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ To crosscompile for different architectures the `GOOS` and `GOARCH` environment
To recompile protobuf definitions use:

```shell
protoc --go_out=proto --go_opt module=go-librespot/proto -I proto proto/*.proto
protoc --go_out=proto --go_opt module=github.com/devgianlu/go-librespot/proto -I proto proto/*.proto
```
6 changes: 3 additions & 3 deletions ap/ap.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"errors"
"fmt"
"github.com/cenkalti/backoff/v4"
librespot "github.com/devgianlu/go-librespot"
"github.com/devgianlu/go-librespot/dh"
pb "github.com/devgianlu/go-librespot/proto/spotify"
log "github.com/sirupsen/logrus"
librespot "go-librespot"
"go-librespot/dh"
pb "go-librespot/proto/spotify"
"golang.org/x/crypto/pbkdf2"
"golang.org/x/exp/slices"
"google.golang.org/protobuf/proto"
Expand Down
2 changes: 1 addition & 1 deletion apresolve/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package apresolve
import (
"encoding/json"
"fmt"
librespot "github.com/devgianlu/go-librespot"
log "github.com/sirupsen/logrus"
librespot "go-librespot"
"golang.org/x/exp/slices"
"net/http"
"net/url"
Expand Down
2 changes: 1 addition & 1 deletion audio/chunked_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package audio
import (
"fmt"
"github.com/cenkalti/backoff/v4"
librespot "github.com/devgianlu/go-librespot"
log "github.com/sirupsen/logrus"
librespot "go-librespot"
"io"
"net/http"
"net/url"
Expand Down
2 changes: 1 addition & 1 deletion audio/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"encoding/binary"
"errors"
"fmt"
librespot "github.com/devgianlu/go-librespot"
log "github.com/sirupsen/logrus"
"github.com/xlab/vorbis-go/vorbis"
librespot "go-librespot"
"io"
"math"
)
Expand Down
4 changes: 2 additions & 2 deletions audio/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"encoding/binary"
"encoding/hex"
"fmt"
librespot "github.com/devgianlu/go-librespot"
"github.com/devgianlu/go-librespot/ap"
log "github.com/sirupsen/logrus"
librespot "go-librespot"
"go-librespot/ap"
"sync"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/daemon/api_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"encoding/json"
"errors"
"fmt"
librespot "github.com/devgianlu/go-librespot"
log "github.com/sirupsen/logrus"
librespot "go-librespot"
"net"
"net/http"
"nhooyr.io/websocket"
Expand Down
10 changes: 5 additions & 5 deletions cmd/daemon/controls.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package main
import (
"errors"
"fmt"
librespot "github.com/devgianlu/go-librespot"
"github.com/devgianlu/go-librespot/player"
connectpb "github.com/devgianlu/go-librespot/proto/spotify/connectstate"
playerpb "github.com/devgianlu/go-librespot/proto/spotify/player"
"github.com/devgianlu/go-librespot/tracks"
log "github.com/sirupsen/logrus"
librespot "go-librespot"
"go-librespot/player"
connectpb "go-librespot/proto/spotify/connectstate"
playerpb "go-librespot/proto/spotify/player"
"go-librespot/tracks"
"google.golang.org/protobuf/proto"
"math"
"strconv"
Expand Down
12 changes: 6 additions & 6 deletions cmd/daemon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"encoding/json"
"flag"
"fmt"
"github.com/devgianlu/go-librespot/apresolve"
"github.com/devgianlu/go-librespot/output"
"github.com/devgianlu/go-librespot/player"
devicespb "github.com/devgianlu/go-librespot/proto/spotify/connectstate/devices"
"github.com/devgianlu/go-librespot/session"
"github.com/devgianlu/go-librespot/zeroconf"
log "github.com/sirupsen/logrus"
"go-librespot/apresolve"
"go-librespot/output"
"go-librespot/player"
devicespb "go-librespot/proto/spotify/connectstate/devices"
"go-librespot/session"
"go-librespot/zeroconf"
"golang.org/x/exp/rand"
"gopkg.in/yaml.v3"
"math"
Expand Down
16 changes: 8 additions & 8 deletions cmd/daemon/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import (
"bytes"
"encoding/xml"
"fmt"
librespot "github.com/devgianlu/go-librespot"
"github.com/devgianlu/go-librespot/ap"
"github.com/devgianlu/go-librespot/dealer"
"github.com/devgianlu/go-librespot/output"
"github.com/devgianlu/go-librespot/player"
connectpb "github.com/devgianlu/go-librespot/proto/spotify/connectstate"
"github.com/devgianlu/go-librespot/session"
"github.com/devgianlu/go-librespot/tracks"
log "github.com/sirupsen/logrus"
librespot "go-librespot"
"go-librespot/ap"
"go-librespot/dealer"
"go-librespot/output"
"go-librespot/player"
connectpb "go-librespot/proto/spotify/connectstate"
"go-librespot/session"
"go-librespot/tracks"
"google.golang.org/protobuf/proto"
"math"
"strings"
Expand Down
10 changes: 5 additions & 5 deletions cmd/daemon/state.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package main

import (
librespot "github.com/devgianlu/go-librespot"
"github.com/devgianlu/go-librespot/dealer"
"github.com/devgianlu/go-librespot/player"
connectpb "github.com/devgianlu/go-librespot/proto/spotify/connectstate"
"github.com/devgianlu/go-librespot/tracks"
log "github.com/sirupsen/logrus"
librespot "go-librespot"
"go-librespot/dealer"
"go-librespot/player"
connectpb "go-librespot/proto/spotify/connectstate"
"go-librespot/tracks"
"time"
)

Expand Down
2 changes: 1 addition & 1 deletion dealer/dealer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"encoding/json"
"fmt"
"github.com/cenkalti/backoff/v4"
librespot "github.com/devgianlu/go-librespot"
log "github.com/sirupsen/logrus"
librespot "go-librespot"
"math"
"net/http"
"nhooyr.io/websocket"
Expand Down
2 changes: 1 addition & 1 deletion dealer/recv.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
connectpb "github.com/devgianlu/go-librespot/proto/spotify/connectstate"
log "github.com/sirupsen/logrus"
connectpb "go-librespot/proto/spotify/connectstate"
"io"
"reflect"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module go-librespot
module github.com/devgianlu/go-librespot

go 1.22.2

Expand Down
2 changes: 1 addition & 1 deletion ids.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package go_librespot
import (
"encoding/hex"
"fmt"
connectpb "go-librespot/proto/spotify/connectstate"
connectpb "github.com/devgianlu/go-librespot/proto/spotify/connectstate"
"math/big"
"regexp"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions login5/hashcash.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package login5

import (
"crypto/sha1"
"go-librespot/proto/google"
challengespb "go-librespot/proto/spotify/login5/v3/challenges"
"github.com/devgianlu/go-librespot/proto/google"
challengespb "github.com/devgianlu/go-librespot/proto/spotify/login5/v3/challenges"
"math/bits"
"time"
)
Expand Down
6 changes: 3 additions & 3 deletions login5/login5.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package login5
import (
"bytes"
"fmt"
librespot "github.com/devgianlu/go-librespot"
pb "github.com/devgianlu/go-librespot/proto/spotify/login5/v3"
credentialspb "github.com/devgianlu/go-librespot/proto/spotify/login5/v3/credentials"
log "github.com/sirupsen/logrus"
librespot "go-librespot"
pb "go-librespot/proto/spotify/login5/v3"
credentialspb "go-librespot/proto/spotify/login5/v3/credentials"
"google.golang.org/protobuf/proto"
"io"
"net/http"
Expand Down
2 changes: 1 addition & 1 deletion output/driver_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import "C"
import (
"errors"
"fmt"
librespot "github.com/devgianlu/go-librespot"
log "github.com/sirupsen/logrus"
librespot "go-librespot"
"golang.org/x/sys/unix"
"io"
"sync"
Expand Down
2 changes: 1 addition & 1 deletion output/output.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package output

import (
librespot "go-librespot"
librespot "github.com/devgianlu/go-librespot"
)

type Output struct {
Expand Down
4 changes: 2 additions & 2 deletions platform.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package go_librespot

import (
spotifypb "go-librespot/proto/spotify"
clienttokenpb "go-librespot/proto/spotify/clienttoken/data/v0"
spotifypb "github.com/devgianlu/go-librespot/proto/spotify"
clienttokenpb "github.com/devgianlu/go-librespot/proto/spotify/clienttoken/data/v0"
"runtime"
)

Expand Down
2 changes: 1 addition & 1 deletion player.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package go_librespot

import (
"errors"
metadatapb "go-librespot/proto/spotify/metadata"
metadatapb "github.com/devgianlu/go-librespot/proto/spotify/metadata"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion player/format.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package player

import (
metadatapb "go-librespot/proto/spotify/metadata"
metadatapb "github.com/devgianlu/go-librespot/proto/spotify/metadata"
)

func formatBitrate(format metadatapb.AudioFile_Format) int {
Expand Down
14 changes: 7 additions & 7 deletions player/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package player

import (
"fmt"
librespot "github.com/devgianlu/go-librespot"
"github.com/devgianlu/go-librespot/audio"
"github.com/devgianlu/go-librespot/output"
downloadpb "github.com/devgianlu/go-librespot/proto/spotify/download"
"github.com/devgianlu/go-librespot/proto/spotify/metadata"
"github.com/devgianlu/go-librespot/spclient"
"github.com/devgianlu/go-librespot/vorbis"
log "github.com/sirupsen/logrus"
librespot "go-librespot"
"go-librespot/audio"
"go-librespot/output"
downloadpb "go-librespot/proto/spotify/download"
"go-librespot/proto/spotify/metadata"
"go-librespot/spclient"
"go-librespot/vorbis"
"time"
)

Expand Down
4 changes: 2 additions & 2 deletions player/restriction.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package player

import (
librespot "go-librespot"
metadatapb "go-librespot/proto/spotify/metadata"
librespot "github.com/devgianlu/go-librespot"
metadatapb "github.com/devgianlu/go-librespot/proto/spotify/metadata"
"strings"
)

Expand Down
2 changes: 1 addition & 1 deletion player/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package player

import (
"errors"
librespot "go-librespot"
librespot "github.com/devgianlu/go-librespot"
"io"
"sync"
)
Expand Down
4 changes: 2 additions & 2 deletions player/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package player

import (
"bytes"
librespot "go-librespot"
metadatapb "go-librespot/proto/spotify/metadata"
librespot "github.com/devgianlu/go-librespot"
metadatapb "github.com/devgianlu/go-librespot/proto/spotify/metadata"
)

type Stream struct {
Expand Down
2 changes: 1 addition & 1 deletion proto/authentication.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto2";

package spotify;

option go_package = "go-librespot/proto/spotify/";
option go_package = "github.com/devgianlu/go-librespot/proto/spotify/";

message ClientResponseEncrypted {
required LoginCredentials login_credentials = 0xa;
Expand Down
2 changes: 1 addition & 1 deletion proto/autoplay_context_request.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto2";

package spotify.player;

option go_package = "go-librespot/proto/spotify/player";
option go_package = "github.com/devgianlu/go-librespot/proto/spotify/player";

message AutoplayContextRequest {
required string context_uri = 1;
Expand Down
2 changes: 1 addition & 1 deletion proto/clienttoken.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package spotify.clienttoken.http.v0;

import "connectivity.proto";

option go_package = "go-librespot/proto/spotify/clienttoken/http/v0";
option go_package = "github.com/devgianlu/go-librespot/proto/spotify/clienttoken/http/v0";

message ClientTokenRequest {
ClientTokenRequestType request_type = 1;
Expand Down
2 changes: 1 addition & 1 deletion proto/connect.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package spotify.connectstate;
import "connect_player.proto";
import "connect_devices.proto";

option go_package = "go-librespot/proto/spotify/connectstate";
option go_package = "github.com/devgianlu/go-librespot/proto/spotify/connectstate";

message ClusterUpdate {
Cluster cluster = 1;
Expand Down
2 changes: 1 addition & 1 deletion proto/connect_devices.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package spotify.connectstate.devices;

option go_package = "go-librespot/proto/spotify/connectstate/devices";
option go_package = "github.com/devgianlu/go-librespot/proto/spotify/connectstate/devices";

message DeviceAlias {
uint32 id = 1;
Expand Down
2 changes: 1 addition & 1 deletion proto/connect_player.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package spotify.connectstate;

option go_package = "go-librespot/proto/spotify/connectstate";
option go_package = "github.com/devgianlu/go-librespot/proto/spotify/connectstate";

message PlayerState {
int64 timestamp = 1;
Expand Down
2 changes: 1 addition & 1 deletion proto/connectivity.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package spotify.clienttoken.data.v0;

option go_package = "go-librespot/proto/spotify/clienttoken/data/v0";
option go_package = "github.com/devgianlu/go-librespot/proto/spotify/clienttoken/data/v0";

message ConnectivitySdkData {
PlatformSpecificData platform_specific_data = 1;
Expand Down
7 changes: 4 additions & 3 deletions proto/google/google_duration.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 34f6371

Please sign in to comment.