port to fiber v3, optimize static assets serving

This commit is contained in:
Laptop
2024-12-31 16:22:23 +02:00
parent f122c45fec
commit 1d5ec4353e
13 changed files with 176 additions and 92 deletions

View File

@@ -13,7 +13,7 @@ import (
"github.com/bogem/id3v2/v2"
"github.com/gcottom/mp4meta"
"github.com/gcottom/oggmeta"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v3"
"github.com/valyala/fasthttp"
)
@@ -220,7 +220,7 @@ func Load(r fiber.Router) {
StreamResponseBody: true,
}
r.Get("/_/restream/:author/:track", func(c *fiber.Ctx) error {
r.Get("/_/restream/:author/:track", func(c fiber.Ctx) error {
p, err := preferences.Get(c)
if err != nil {
return err