xunlei_test.go 1.0 KB

12345678910111213141516171819202122232425
  1. package xunlei
  2. import (
  3. "github.com/allanpk716/ChineseSubFinder/internal/types"
  4. "testing"
  5. )
  6. func TestGetList(t *testing.T) {
  7. //movie1 := "XLen:\\电影\\The Devil All the Time (2020)\\The Devil All the Time (2020) WEBDL-1080p.mkv"
  8. //movie1 := "XLen:\\电影\\龙猫 (1988)\\龙猫 (1988) 1080p DTS.mkv"
  9. //movie1 := "XLen:\\电影\\消失爱人 (2016)\\消失爱人 (2016) 720p AAC.rmvb"
  10. //movie1:= "XLen:\\电影\\Spiral From the Book of Saw (2021)\\Spiral From the Book of Saw (2021) WEBDL-1080p.mkv"
  11. movie1 := "XLen:\\电影\\机动战士Z高达:星之继承者 (2005)\\机动战士Z高达:星之继承者 (2005) 1080p TrueHD.mkv"
  12. //movie1 := "XLen:\\连续剧\\The Bad Batch\\Season 1\\The Bad Batch - S01E01 - Aftermath WEBDL-1080p.mkv"
  13. xunlie := NewSupplier(types.ReqParam{Topic: 3})
  14. outList, err := xunlie.getSubListFromFile(movie1)
  15. if err != nil {
  16. t.Error(err)
  17. }
  18. println(outList)
  19. for i, sublist := range outList {
  20. println(i, sublist.Name, sublist.Ext, sublist.Language.String(), sublist.Score, len(sublist.Data))
  21. }
  22. }