added support for mini series
This commit is contained in:
parent
b4fb15cf15
commit
4bb98a6518
@ -150,6 +150,10 @@ func isIMDbTitleOfSeries(title string) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if strings.Contains(title, "(Miniserie ") {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
if strings.Contains(title, "(TV Series ") {
|
if strings.Contains(title, "(TV Series ") {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@ -159,6 +163,7 @@ func isIMDbTitleOfSeries(title string) bool {
|
|||||||
|
|
||||||
func prepareChunckOfIMDbTitleOfSeriesForYearExtraction(s string) string {
|
func prepareChunckOfIMDbTitleOfSeriesForYearExtraction(s string) string {
|
||||||
s = strings.Replace(s, "(Fernsehserie ", "(", -1)
|
s = strings.Replace(s, "(Fernsehserie ", "(", -1)
|
||||||
|
s = strings.Replace(s, "(Miniserie ", "(", -1)
|
||||||
s = strings.Replace(s, "(TV Series ", "(", -1)
|
s = strings.Replace(s, "(TV Series ", "(", -1)
|
||||||
|
|
||||||
sSplitted := strings.Split(s, "–")
|
sSplitted := strings.Split(s, "–")
|
||||||
|
@ -101,6 +101,11 @@ func TestExtractYearFromIMDbTitle(t *testing.T) {
|
|||||||
Title: "Rick and Morty",
|
Title: "Rick and Morty",
|
||||||
ExpectedResult: 2013,
|
ExpectedResult: 2013,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Data: "Unser Kosmos: Die Reise geht weiter (Miniserie 2014) - IMDb",
|
||||||
|
Title: "Unser Kosmos: Die Reise geht weiter",
|
||||||
|
ExpectedResult: 2014,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, r := range data {
|
for _, r := range data {
|
||||||
|
Loading…
Reference in New Issue
Block a user