Compare commits
No commits in common. "main" and "v1.0" have entirely different histories.
12
wareztb.go
12
wareztb.go
@ -19,12 +19,12 @@ func GetComparableWarezString(s string) (string, error) {
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
result := fmt.Sprintf("%s.%d", title, year)
|
return utils.RemoveDoubledStrings(
|
||||||
result = strings.ToLower(result)
|
strings.ToLower(
|
||||||
result = utils.RemoveDoubledStrings(result, ".")
|
fmt.Sprintf("%s.%d", title, year),
|
||||||
result = utils.RemoveLeadingStrings(result, ".")
|
),
|
||||||
|
".",
|
||||||
return result, nil
|
), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetTitleAndYearFromWarezString tries to get the title and year from a string in a warez context
|
// GetTitleAndYearFromWarezString tries to get the title and year from a string in a warez context
|
||||||
|
@ -18,7 +18,6 @@ func TestGetComparableWarezString(t *testing.T) {
|
|||||||
"Little Britain (2003)": "little.britain.2003",
|
"Little Britain (2003)": "little.britain.2003",
|
||||||
"Sons of Anarchy (2008)": "sons.of.anarchy.2008",
|
"Sons of Anarchy (2008)": "sons.of.anarchy.2008",
|
||||||
"Love, Death & Robots (2019)": "love.death.robots.2019",
|
"Love, Death & Robots (2019)": "love.death.robots.2019",
|
||||||
"...Jahr 2022... die überleben wollen... (1973)": "jahr.2022.die.ueberleben.wollen.1973",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for d, expectedResult := range data {
|
for d, expectedResult := range data {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user