优化
This commit is contained in:
truewhile
2026-08-24 17:40:43 +08:00
parent 99ef2ed410
commit 44ca451cd4
374 changed files with 1029 additions and 1028 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// AccessLogRepository persists model.AccessLog records.
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// ApiConfigRepository persists model.ApiConfig records.
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// ─── RegistrationCode ─────────────────────────────────────────────────────────
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// FavoriteRepository persists model.Favorite records.
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// HistoryRepository persists model.PlaybackHistory entries. The application
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// LibraryRepository persists model.Library records.
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// MediaRepository persists model.Media records.
@@ -7,7 +7,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// Upsert inserts or updates a media row keyed by Path (unique index).
@@ -7,7 +7,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// Search runs a LIKE search against the title field. Empty query returns the
+3 -3
View File
@@ -11,8 +11,8 @@ import (
"strings"
"time"
"github.com/ShukeBta/MediaStationGo/internal/config"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/config"
"github.com/ShukeBta/MMTL/internal/model"
)
type OpenSearchMediaBackend struct {
@@ -29,7 +29,7 @@ func NewOpenSearchMediaBackend(cfg config.SearchConfig) *OpenSearchMediaBackend
}
index := strings.TrimSpace(cfg.Index)
if index == "" {
index = "mediastation_media"
index = "mmtl_media"
}
return &OpenSearchMediaBackend{
baseURL: strings.TrimRight(strings.TrimSpace(cfg.OpenSearchURL), "/"),
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"net/http/httptest"
"testing"
"github.com/ShukeBta/MediaStationGo/internal/config"
"github.com/ShukeBta/MMTL/internal/config"
)
func TestOpenSearchMediaBackendSearchesIDs(t *testing.T) {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// PermissionRepository persists model.UserPermission records.
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// PlayProfileRepository persists model.PlayProfile records.
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// PlaylistRepository persists model.Playlist + PlaylistItem.
@@ -9,7 +9,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// RefreshTokenRepository persists model.RefreshToken records.
+2 -2
View File
@@ -9,8 +9,8 @@ import (
"github.com/glebarez/sqlite"
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/database"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/database"
"github.com/ShukeBta/MMTL/internal/model"
)
func TestMediaUpsertSkipsUnchangedExistingRow(t *testing.T) {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// SeriesRepository persists model.Series records.
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// SettingRepository persists key/value preferences.
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"github.com/google/uuid"
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// StorageConfigRepository persists model.StorageConfig records.
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// ─── StrmAccount ───────────────────────────────────────────────────────────────
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"gorm.io/gorm"
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MMTL/internal/model"
)
// UserRepository persists model.User records.