feat: improve OpenList cloud storage support

This commit is contained in:
ShukeBta
2026-06-10 00:08:35 +08:00
parent 9f2d7a507b
commit 0f82cb3084
16 changed files with 635 additions and 50 deletions
+6 -5
View File
@@ -6,12 +6,12 @@ package model
type STRMRecord struct {
Base
Title string `gorm:"size:512;not null;index" json:"title"`
URL string `gorm:"size:2048;not null" json:"url"` // STRM 文件指向的 URL
FilePath string `gorm:"size:1024;not null" json:"file_path"` // 本地 STRM 文件路径
Protocol string `gorm:"size:32;not null" json:"protocol"` // webdav / alist / s3 / http / https
URL string `gorm:"size:2048;not null" json:"url"` // STRM 文件指向的 URL
FilePath string `gorm:"size:1024;not null" json:"file_path"` // 本地 STRM 文件路径
Protocol string `gorm:"size:32;not null" json:"protocol"` // webdav / alist / s3 / http / https
FileSize int64 `json:"file_size"`
MediaID string `gorm:"size:36;index" json:"media_id"` // 关联媒体 ID
MediaType string `gorm:"size:16" json:"media_type"` // movie / series
MediaID string `gorm:"size:36;index" json:"media_id"` // 关联媒体 ID
MediaType string `gorm:"size:16" json:"media_type"` // movie / series
SeasonNum int `json:"season_num"`
EpisodeNum int `json:"episode_num"`
}
@@ -20,6 +20,7 @@ type STRMRecord struct {
var AllowedSTRMProtocols = []string{
"webdav", "davs",
"alist", "alists",
"openlist", "openlists",
"s3",
"http", "https",
}