embyhelper_test.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package emby_helper
  2. import (
  3. "testing"
  4. )
  5. // TODO 暂不方便在其他环境进行单元测试
  6. func TestEmbyHelper_GetRecentlyAddVideoList(t *testing.T) {
  7. //config := config.GetConfig()
  8. //em := NewEmbyHelper(config.EmbyConfig)
  9. //movieList, seriesList, err := em.GetRecentlyAddVideoList(config.MovieFolder, config.SeriesFolder)
  10. //if err != nil {
  11. // t.Fatal(err)
  12. //}
  13. //
  14. //println(len(movieList), len(seriesList))
  15. }
  16. // TODO 暂不方便在其他环境进行单元测试
  17. func TestEmbyHelper_RefreshEmbySubList(t *testing.T) {
  18. //config := config.GetConfig()
  19. //em := NewEmbyHelper(config.EmbyConfig)
  20. //bok, err := em.RefreshEmbySubList()
  21. //if err != nil {
  22. // t.Fatal(err)
  23. //}
  24. //println(bok)
  25. }
  26. // TODO 暂不方便在其他环境进行单元测试
  27. func TestEmbyHelper_GetInternalEngSubAndExSub(t *testing.T) {
  28. //config := config.GetConfig()
  29. //em := NewEmbyHelper(config.EmbyConfig)
  30. //// 81873 -- R&M - S05E01
  31. //// R&M S05E10 2 org english, 5 简英 145499
  32. //// 基地 S01E03 166840
  33. //found, internalEngSub, exCh_EngSub, err := em.GetInternalEngSubAndExChineseEnglishSub("166840")
  34. //if err != nil {
  35. // t.Fatal(err)
  36. //}
  37. //if found == false {
  38. // t.Fatal("need found sub")
  39. //}
  40. //
  41. //println(internalEngSub[0].FileName, exCh_EngSub[0].FileName)
  42. }