diff --git a/app/controllers/download.go b/app/controllers/download.go index 1d132df..fe6259e 100644 --- a/app/controllers/download.go +++ b/app/controllers/download.go @@ -14,8 +14,8 @@ import ( "go.fifitido.net/ytdl-web/pkg/httpx" "go.fifitido.net/ytdl-web/pkg/server" "go.fifitido.net/ytdl-web/pkg/view" - "go.fifitido.net/ytdl-web/ytdl" - "go.fifitido.net/ytdl-web/ytdl/metadata" + "go.fifitido.net/ytdl-web/pkg/ytdl" + "go.fifitido.net/ytdl-web/pkg/ytdl/metadata" "golang.org/x/exp/slog" ) diff --git a/app/controllers/home.go b/app/controllers/home.go index 90b3fca..e9392d5 100644 --- a/app/controllers/home.go +++ b/app/controllers/home.go @@ -9,8 +9,8 @@ import ( "go.fifitido.net/ytdl-web/pkg/htmx" "go.fifitido.net/ytdl-web/pkg/server" "go.fifitido.net/ytdl-web/pkg/view" + "go.fifitido.net/ytdl-web/pkg/ytdl" "go.fifitido.net/ytdl-web/version" - "go.fifitido.net/ytdl-web/ytdl" ) type HomeController struct { diff --git a/app/models/video.go b/app/models/video.go index 4231abe..4e44ce9 100644 --- a/app/models/video.go +++ b/app/models/video.go @@ -2,7 +2,7 @@ package models import ( "github.com/samber/lo" - "go.fifitido.net/ytdl-web/ytdl/metadata" + "go.fifitido.net/ytdl-web/pkg/ytdl/metadata" ) type Video struct { diff --git a/app/views.go b/app/views.go index f0f0a87..86c23b6 100644 --- a/app/views.go +++ b/app/views.go @@ -8,7 +8,7 @@ import ( "github.com/htfy96/reformism" "go.fifitido.net/ytdl-web/pkg/view/html" - "go.fifitido.net/ytdl-web/ytdl/metadata" + "go.fifitido.net/ytdl-web/pkg/ytdl/metadata" ) //go:embed views/* diff --git a/cmd/root.go b/cmd/root.go index e93d4ce..0c8daa3 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -12,9 +12,9 @@ import ( "go.fifitido.net/ytdl-web/app/controllers" "go.fifitido.net/ytdl-web/config" "go.fifitido.net/ytdl-web/pkg/server" - "go.fifitido.net/ytdl-web/utils" - "go.fifitido.net/ytdl-web/ytdl" - "go.fifitido.net/ytdl-web/ytdl/cache" + "go.fifitido.net/ytdl-web/pkg/utils" + "go.fifitido.net/ytdl-web/pkg/ytdl" + "go.fifitido.net/ytdl-web/pkg/ytdl/cache" "golang.org/x/exp/slog" ) diff --git a/utils/badgerlogger.go b/pkg/utils/badgerlogger.go similarity index 100% rename from utils/badgerlogger.go rename to pkg/utils/badgerlogger.go diff --git a/utils/logwriter.go b/pkg/utils/logwriter.go similarity index 100% rename from utils/logwriter.go rename to pkg/utils/logwriter.go diff --git a/ytdl/cache/cache.go b/pkg/ytdl/cache/cache.go similarity index 95% rename from ytdl/cache/cache.go rename to pkg/ytdl/cache/cache.go index ff125c7..fbb3cae 100644 --- a/ytdl/cache/cache.go +++ b/pkg/ytdl/cache/cache.go @@ -5,7 +5,7 @@ import ( "time" "github.com/dgraph-io/badger/v2" - "go.fifitido.net/ytdl-web/ytdl/metadata" + "go.fifitido.net/ytdl-web/pkg/ytdl/metadata" ) type MetadataCache interface { diff --git a/ytdl/cmdbuilder.go b/pkg/ytdl/cmdbuilder.go similarity index 94% rename from ytdl/cmdbuilder.go rename to pkg/ytdl/cmdbuilder.go index 0cd000e..4fddc2e 100644 --- a/ytdl/cmdbuilder.go +++ b/pkg/ytdl/cmdbuilder.go @@ -5,7 +5,7 @@ import ( "encoding/json" "os/exec" - "go.fifitido.net/ytdl-web/ytdl/metadata" + "go.fifitido.net/ytdl-web/pkg/ytdl/metadata" ) func Exec(binary, url string, options ...Option) error { diff --git a/ytdl/cmdopts.go b/pkg/ytdl/cmdopts.go similarity index 96% rename from ytdl/cmdopts.go rename to pkg/ytdl/cmdopts.go index 314f7ac..436cbda 100644 --- a/ytdl/cmdopts.go +++ b/pkg/ytdl/cmdopts.go @@ -7,8 +7,8 @@ import ( "io" "strings" - "go.fifitido.net/ytdl-web/utils" - "go.fifitido.net/ytdl-web/ytdl/metadata" + "go.fifitido.net/ytdl-web/pkg/utils" + "go.fifitido.net/ytdl-web/pkg/ytdl/metadata" "golang.org/x/exp/slog" ) diff --git a/ytdl/metadata/chapter.go b/pkg/ytdl/metadata/chapter.go similarity index 100% rename from ytdl/metadata/chapter.go rename to pkg/ytdl/metadata/chapter.go diff --git a/ytdl/metadata/comment.go b/pkg/ytdl/metadata/comment.go similarity index 100% rename from ytdl/metadata/comment.go rename to pkg/ytdl/metadata/comment.go diff --git a/ytdl/metadata/format.go b/pkg/ytdl/metadata/format.go similarity index 100% rename from ytdl/metadata/format.go rename to pkg/ytdl/metadata/format.go diff --git a/ytdl/metadata/fragment.go b/pkg/ytdl/metadata/fragment.go similarity index 100% rename from ytdl/metadata/fragment.go rename to pkg/ytdl/metadata/fragment.go diff --git a/ytdl/metadata/hls.go b/pkg/ytdl/metadata/hls.go similarity index 100% rename from ytdl/metadata/hls.go rename to pkg/ytdl/metadata/hls.go diff --git a/ytdl/metadata/metadata.go b/pkg/ytdl/metadata/metadata.go similarity index 100% rename from ytdl/metadata/metadata.go rename to pkg/ytdl/metadata/metadata.go diff --git a/ytdl/metadata/subtitle.go b/pkg/ytdl/metadata/subtitle.go similarity index 100% rename from ytdl/metadata/subtitle.go rename to pkg/ytdl/metadata/subtitle.go diff --git a/ytdl/metadata/thumbnail.go b/pkg/ytdl/metadata/thumbnail.go similarity index 100% rename from ytdl/metadata/thumbnail.go rename to pkg/ytdl/metadata/thumbnail.go diff --git a/ytdl/ytdl.go b/pkg/ytdl/ytdl.go similarity index 96% rename from ytdl/ytdl.go rename to pkg/ytdl/ytdl.go index 04b4806..0d3653d 100644 --- a/ytdl/ytdl.go +++ b/pkg/ytdl/ytdl.go @@ -7,8 +7,8 @@ import ( "strings" "go.fifitido.net/ytdl-web/config" - "go.fifitido.net/ytdl-web/ytdl/cache" - "go.fifitido.net/ytdl-web/ytdl/metadata" + "go.fifitido.net/ytdl-web/pkg/ytdl/cache" + "go.fifitido.net/ytdl-web/pkg/ytdl/metadata" "golang.org/x/exp/slog" )