浏览代码

修复 assrt 返回值中,应该是数组的内容,有时候返回不正确的类型,导致解析问题

Signed-off-by: allan716 <[email protected]>
allan716 3 年之前
父节点
当前提交
4ab3a39a41
共有 2 个文件被更改,包括 7 次插入6 次删除
  1. 5 5
      pkg/logic/sub_supplier/assrt/assrt.go
  2. 2 1
      pkg/logic/sub_supplier/assrt/assrt_test.go

+ 5 - 5
pkg/logic/sub_supplier/assrt/assrt.go

@@ -470,11 +470,11 @@ type OneSubDetail struct {
 			Subtype     string `json:"subtype,omitempty"`
 			VoteScore   int    `json:"vote_score,omitempty"`
 			ReleaseSite string `json:"release_site,omitempty"`
-			Filelist    []struct {
-				S   string `json:"s,omitempty"`
-				F   string `json:"f,omitempty"`
-				Url string `json:"url,omitempty"`
-			} `json:"filelist,omitempty"`
+			//Filelist    []struct {
+			//	S   string `json:"s,omitempty"`
+			//	F   string `json:"f,omitempty"`
+			//	Url string `json:"url,omitempty"`
+			//} `json:"filelist,omitempty"`
 			Id       int    `json:"id,omitempty"`
 			Filename string `json:"filename,omitempty"`
 			Url      string `json:"url,omitempty"`

+ 2 - 1
pkg/logic/sub_supplier/assrt/assrt_test.go

@@ -37,7 +37,8 @@ func TestSupplier_getSubListFromFile(t *testing.T) {
 	//isMovie := true
 	defInstance()
 	//videoFPath := "X:\\连续剧\\杀死伊芙 (2018)\\Season 4\\Killing Eve - S04E08 - Hello, Losers WEBDL-1080p.mkv"
-	videoFPath := "X:\\连续剧\\Why Didn’t They Ask Evans!\\Season 1\\Why Didn’t They Ask Evans! - S01E01 - Episode 1 WEBRip-1080p.mp4"
+	//videoFPath := "X:\\连续剧\\Why Didn’t They Ask Evans!\\Season 1\\Why Didn’t They Ask Evans! - S01E01 - Episode 1 WEBRip-1080p.mp4"
+	videoFPath := "X:\\连续剧\\Pantheon\\Season 1\\Pantheon - S01E03 - Reign of Winter WEBDL-1080p.mkv"
 	//videoFPath := "X:\\连续剧\\风骚律师 (2015)\\Season 6\\Better Call Saul - S06E05 - Black and Blue WEBDL-1080p.mkv"
 	isMovie := false