* optimize
This commit is contained in:
parent
9d1f33ae76
commit
7396e1fe68
|
@ -229,7 +229,8 @@ def similarity(o1, o2) {
|
|||
}
|
||||
|
||||
List.metaClass.sortBySimilarity = { prime, Closure toStringFunction = { obj -> obj.toString() } ->
|
||||
return delegate.sort{ a, b -> similarity(toStringFunction(b), prime).compareTo(similarity(toStringFunction(a), prime)) }
|
||||
def simetric = new NameSimilarityMetric()
|
||||
return delegate.sort{ a, b -> simetric.getSimilarity(toStringFunction(b), prime).compareTo(simetric.getSimilarity(toStringFunction(a), prime)) }
|
||||
}
|
||||
|
||||
// call scripts
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
^Completed$
|
||||
^Cover
|
||||
^Crime$
|
||||
^data$
|
||||
^deluge$
|
||||
^Documentary$
|
||||
^Done$
|
||||
^Download$
|
||||
|
@ -40,7 +42,9 @@
|
|||
^Movie[s]?
|
||||
^new$
|
||||
^other$
|
||||
^private$
|
||||
^Romance$
|
||||
^rtorrent$
|
||||
^Science.Fiction$
|
||||
^Scratch$
|
||||
^Season.[0-9]+
|
||||
|
@ -50,12 +54,14 @@
|
|||
^Staging$
|
||||
^Storage$
|
||||
^Test$
|
||||
^testdata$
|
||||
^Torrent[s]?
|
||||
^Tracker
|
||||
^Trailer
|
||||
^user$
|
||||
^VCD$
|
||||
^VIDEO_TS$
|
||||
^watch$
|
||||
A.Release.Lounge
|
||||
ABC
|
||||
Anime[s]?
|
||||
|
|
Loading…
Reference in New Issue