mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
Allow user control of threshold
This commit is contained in:
@@ -48,6 +48,8 @@ UDP_TRACKERS_ENABLED=true
|
|||||||
CONSUMER_REPLICAS=3
|
CONSUMER_REPLICAS=3
|
||||||
## Fix for #66 - toggle on for development
|
## Fix for #66 - toggle on for development
|
||||||
AUTO_CREATE_AND_APPLY_MIGRATIONS=false
|
AUTO_CREATE_AND_APPLY_MIGRATIONS=false
|
||||||
|
## Allows control of the threshold for matching titles to the IMDB dataset. The closer to 0, the more strict the matching.
|
||||||
|
TITLE_MATCH_THRESHOLD=0.25
|
||||||
|
|
||||||
# Producer
|
# Producer
|
||||||
GITHUB_PAT=
|
GITHUB_PAT=
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
export const metadataConfig = {
|
export const metadataConfig = {
|
||||||
IMDB_CONCURRENT: parseInt(process.env.IMDB_CONCURRENT || "1", 10),
|
IMDB_CONCURRENT: parseInt(process.env.IMDB_CONCURRENT || "1", 10),
|
||||||
IMDB_INTERVAL_MS: parseInt(process.env.IMDB_INTERVAL_MS || "1000", 10)
|
IMDB_INTERVAL_MS: parseInt(process.env.IMDB_INTERVAL_MS || "1000", 10),
|
||||||
|
TITLE_MATCH_THRESHOLD: Number(process.env.TITLE_MATCH_THRESHOLD || 0.25),
|
||||||
};
|
};
|
||||||
@@ -13,7 +13,7 @@ import mongoose from 'mongoose';
|
|||||||
const fuseOptions : IFuseOptions<IImdbEntry> = {
|
const fuseOptions : IFuseOptions<IImdbEntry> = {
|
||||||
includeScore: true,
|
includeScore: true,
|
||||||
keys: ['PrimaryTitle', 'OriginalTitle'],
|
keys: ['PrimaryTitle', 'OriginalTitle'],
|
||||||
threshold: 0.25,
|
threshold: configurationService.metadataConfig.TITLE_MATCH_THRESHOLD,
|
||||||
};
|
};
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
|
|||||||
Reference in New Issue
Block a user