sub_timeline_fixer_helper_test.go 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. package sub_timeline_fixer
  2. import (
  3. "github.com/allanpk716/ChineseSubFinder/internal/pkg/config"
  4. "testing"
  5. )
  6. func TestSubTimelineFixerHelper_FixRecentlyItemsSubTimeline(t *testing.T) {
  7. // 单独执行这个,第一次是有效的,第二次,就没得效果了,原因是已经替换字幕了啊,当然就不会修正了啊。你懂的
  8. config := config.GetConfig()
  9. fixer := NewSubTimelineFixerHelper(config.EmbyConfig, config.SubTimelineFixerConfig)
  10. err := fixer.FixRecentlyItemsSubTimeline(config.MovieFolder, config.SeriesFolder)
  11. if err != nil {
  12. t.Fatal(err)
  13. }
  14. }
  15. func TestSubTimelineFixerHelper_fixOneVideoSub(t *testing.T) {
  16. // What If - S01E09 171499
  17. // Dan Brown's The Lost Symbol - S01E01 172412
  18. // 基地 S01E03 166840
  19. // 基地 S01E04 173354
  20. // 81873 -- R&M - S05E01
  21. // 145499 -- R&M - S05E10
  22. // 178071 -- The Night House
  23. config := config.GetConfig()
  24. fixer := NewSubTimelineFixerHelper(config.EmbyConfig, config.SubTimelineFixerConfig)
  25. err := fixer.fixOneVideoSub("178071", "X:\\电影\\The Night House (2021)")
  26. if err != nil {
  27. t.Fatal(err)
  28. }
  29. }