Skip to content

Commit

Permalink
refactor structure
Browse files Browse the repository at this point in the history
  • Loading branch information
sayem314 committed Sep 27, 2024
1 parent f9a854d commit c55025a
Show file tree
Hide file tree
Showing 38 changed files with 21 additions and 21 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/api/api.go → api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"encoding/json"
"fmt"

"github.com/d-fi/GoFi/pkg/request"
"github.com/d-fi/GoFi/pkg/types"
"github.com/d-fi/GoFi/request"
"github.com/d-fi/GoFi/types"
)

func GetTrackInfoPublicApi(sngID string) (types.TrackTypePublicAPI, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/api_test.go → api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/d-fi/GoFi/pkg/request"
"github.com/d-fi/GoFi/request"
"github.com/stretchr/testify/assert"
)

Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions pkg/download/download.go → download/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"path/filepath"
"time"

"github.com/d-fi/GoFi/pkg/api"
"github.com/d-fi/GoFi/pkg/decrypt"
"github.com/d-fi/GoFi/pkg/metadata"
"github.com/d-fi/GoFi/pkg/request"
"github.com/d-fi/GoFi/pkg/utils"
"github.com/d-fi/GoFi/api"
"github.com/d-fi/GoFi/decrypt"
"github.com/d-fi/GoFi/metadata"
"github.com/d-fi/GoFi/request"
"github.com/d-fi/GoFi/utils"
)

// DownloadTrack downloads a track, adds metadata, and saves it to the specified directory.
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions pkg/download/url.go → download/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"fmt"
"strings"

"github.com/d-fi/GoFi/pkg/decrypt"
"github.com/d-fi/GoFi/pkg/request"
"github.com/d-fi/GoFi/pkg/types"
"github.com/d-fi/GoFi/pkg/utils"
"github.com/d-fi/GoFi/decrypt"
"github.com/d-fi/GoFi/request"
"github.com/d-fi/GoFi/types"
"github.com/d-fi/GoFi/utils"
)

// WrongLicense error for when the user's license doesn't allow streaming certain formats.
Expand Down
4 changes: 2 additions & 2 deletions pkg/download/url_test.go → download/url_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strconv"
"testing"

"github.com/d-fi/GoFi/pkg/api"
"github.com/d-fi/GoFi/pkg/request"
"github.com/d-fi/GoFi/api"
"github.com/d-fi/GoFi/request"
"github.com/stretchr/testify/assert"
)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/metadata/album_cover.go → metadata/album_cover.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"time"

"github.com/d-fi/GoFi/pkg/request"
"github.com/d-fi/GoFi/request"
"github.com/hashicorp/golang-lru/v2/expirable"
)

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/metadata/flac_meta.go → metadata/flac_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"strings"

"github.com/d-fi/GoFi/pkg/metaflac"
"github.com/d-fi/GoFi/pkg/types"
"github.com/d-fi/GoFi/metaflac"
"github.com/d-fi/GoFi/types"
)

func WriteMetadataFlac(buffer []byte, track types.TrackType, album *types.AlbumTypePublicApi, dimension int, cover []byte) ([]byte, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/metadata/id3_tag.go → metadata/id3_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/bogem/id3v2/v2"
"github.com/d-fi/GoFi/pkg/types"
"github.com/d-fi/GoFi/types"
)

func WriteMetadataMp3(buffer []byte, track types.TrackType, album *types.AlbumTypePublicApi, cover []byte) ([]byte, error) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/metadata/metadata.go → metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"golang.org/x/text/cases"
"golang.org/x/text/language"

"github.com/d-fi/GoFi/pkg/api"
"github.com/d-fi/GoFi/pkg/types"
"github.com/d-fi/GoFi/api"
"github.com/d-fi/GoFi/types"
)

// AddTrackTags adds metadata to the track buffer (MP3 or FLAC) based on track and album information.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/request/request.go → request/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"time"

"github.com/d-fi/GoFi/pkg/utils"
"github.com/d-fi/GoFi/utils"
"github.com/hashicorp/golang-lru/v2/expirable"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c55025a

Please sign in to comment.