fix review regressions in titles and strm paths

This commit is contained in:
ShukeBta
2026-06-27 16:07:30 +08:00
parent e22b537de4
commit 41f39d9701
4 changed files with 16 additions and 31 deletions
+3 -3
View File
@@ -232,8 +232,8 @@ func TestSTRMLibraryOutputSubdirUsesLibraryCategoryPath(t *testing.T) {
}
}
func TestSTRMLibrarySpecificOutputDirStripsPreviousLibraryCategory(t *testing.T) {
base := filepath.Join(t.TempDir(), "strm", "电影", "演唱会")
func TestSTRMLibrarySpecificOutputDirPreservesExplicitCategoryRoot(t *testing.T) {
base := filepath.Join(t.TempDir(), "strm", "电视剧")
lib := model.Library{
Name: "国产剧",
Path: BuildCloudLibraryPath("openlist", "/电视剧/国产剧", "/电视剧/国产剧"),
@@ -241,7 +241,7 @@ func TestSTRMLibrarySpecificOutputDirStripsPreviousLibraryCategory(t *testing.T)
}
got := strmLibrarySpecificOutputDir(base, &lib)
want := filepath.Join(filepath.Dir(filepath.Dir(base)), "电视剧", "国产剧")
want := filepath.Join(base, "国产剧")
if got != want {
t.Fatalf("strmLibrarySpecificOutputDir() = %q, want %q", got, want)
}