Selaa lähdekoodia

增加更多日志

Signed-off-by: allan716 <[email protected]>
allan716 3 vuotta sitten
vanhempi
sitoutus
e99c62793d

+ 5 - 0
internal/downloader.go

@@ -424,10 +424,15 @@ func (d Downloader) DownloadSub4Series(dir string) error {
 		if err != nil {
 			return err
 		}
+		for index, seriesDir := range seriesDirList {
+			d.log.Debugln("embyHelper == nil GetSeriesList", index, seriesDir)
+		}
 	} else {
 		// 这里给出的是连续剧的文件夹名称
+		d.log.Debugln("embyHelper seriesSubNeedDlMap Count:", len(d.seriesSubNeedDlMap))
 		for s, _ := range d.seriesSubNeedDlMap {
 			seriesDirList = append(seriesDirList, s)
+			d.log.Debugln("embyHelper seriesSubNeedDlMap:", s)
 		}
 	}
 	wg := sync.WaitGroup{}

+ 13 - 0
internal/logic/sub_supplier/zimuku/zimuku_test.go

@@ -88,3 +88,16 @@ func TestSupplier_getSubListFromKeyword(t *testing.T) {
 		println(i, sublist.Name, sublist.Ext, sublist.Language.String(), sublist.Score, len(sublist.Data))
 	}
 }
+
+func TestSupplier_step3(t *testing.T) {
+
+	dlUrl := "https://zmk.pw/dld/162150.html"
+	s := Supplier{}
+	fileName, datas, err := s.step3(dlUrl)
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	println(fileName)
+	println(len(datas))
+}

+ 1 - 2
internal/pkg/decode/decode_test.go

@@ -24,8 +24,7 @@ func Test_get_IMDB_movie_xml(t *testing.T) {
 func Test_get_IMDB_nfo(t *testing.T) {
 	wantid := "tt0993840"
 	wantyear := "2021"
-	//dirPth := "..\\..\\..\\TestData\\video_info_file\\Army of the Dead (2021) WEBDL-1080p.nfo"
-	dirPth := "C:\\Tmp\\Red Notice (2021) 红色通缉令.nfo"
+	dirPth := "..\\..\\..\\TestData\\video_info_file\\Army of the Dead (2021) WEBDL-1080p.nfo"
 	imdbInfo, err := getImdbAndYearNfo(dirPth, "movie")
 	if err != nil {
 		t.Fatal(err)