初始化

初始化项目
This commit is contained in:
truewhile
2026-08-23 22:12:32 +08:00
parent 0bcb1fec87
commit 71bf60c69c
631 changed files with 2121 additions and 76050 deletions
-28
View File
@@ -1,7 +1,6 @@
package service
import (
"context"
"testing"
"time"
@@ -10,7 +9,6 @@ import (
"github.com/ShukeBta/MediaStationGo/internal/config"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MediaStationGo/internal/repository"
"github.com/ShukeBta/MediaStationGo/internal/service/cloud"
)
func newTestEmbyService(t *testing.T) *EmbyService {
@@ -67,29 +65,3 @@ func TestEmbyLatestItemsOrderByReleaseDate(t *testing.T) {
t.Fatalf("latest item should expose PremiereDate for Emby clients: %#v", items[0])
}
}
type fakeCloudPlaybackResolver struct {
link *cloud.DirectLink
typ string
ref string
ua string
}
func (f *fakeCloudPlaybackResolver) CloudResolve(_ context.Context, typ, fileRef, clientUA string) (*cloud.DirectLink, error) {
f.typ = typ
f.ref = fileRef
f.ua = clientUA
return f.link, nil
}
type fakeCloudPlaybackProber struct {
probe *ProbeResult
rawURL string
headers map[string]string
}
func (f *fakeCloudPlaybackProber) ProbeHTTP(_ context.Context, rawURL string, headers map[string]string) (*ProbeResult, error) {
f.rawURL = rawURL
f.headers = headers
return f.probe, nil
}