Increased weight if name is equal

This commit is contained in:
Brage 2024-03-23 00:48:27 +01:00
parent 4acc058038
commit a92cc60b2f

View File

@ -31,7 +31,10 @@ class UseSource():
if (anii is not None) and (anii.status == "COMPLETED" and anii.data is not None): if (anii is not None) and (anii.status == "COMPLETED" and anii.data is not None):
result.append(WeightedData(anii, 4)) result.append(WeightedData(anii, 4))
if (imdb is not None) and (imdb.status == "COMPLETED" and imdb.data is not None): if (imdb is not None) and (imdb.status == "COMPLETED" and imdb.data is not None):
result.append(WeightedData(imdb, 1)) imdb_weight = 1
if (imdb.data.title == title):
imdb_weight = 6
result.append(WeightedData(imdb, imdb_weight))
if (mal is not None) and (mal.status == "COMPLETED" and mal.data is not None): if (mal is not None) and (mal.status == "COMPLETED" and mal.data is not None):
result.append(WeightedData(mal, 8)) result.append(WeightedData(mal, 8))
return result return result