Wip Blacklisting dmm porn

Create adult text classifier ML Model

wip - starting to write PTN in c#

More work on season, show and movie parsing

Remove ML project
This commit is contained in:
iPromKnight
2024-03-09 14:25:06 +00:00
parent 5aba05f2b4
commit 6600fceb1a
52 changed files with 7699 additions and 82 deletions

View File

@@ -103,10 +103,12 @@ describe('Configuration Tests', () => {
it('should populate metadataConfig correctly', async() => {
process.env.IMDB_CONCURRENT = '1';
process.env.IMDB_INTERVAL_MS = '1000';
process.env.TITLE_MATCH_THRESHOLD = '0.1';
const {configurationService} = await import("@services/configuration_service");
const {metadataConfig} = configurationService;
expect(metadataConfig.IMDB_CONCURRENT).toBe(1);
expect(metadataConfig.IMDB_INTERVAL_MS).toBe(1000);
expect(metadataConfig.TITLE_MATCH_THRESHOLD).toBe(0.1);
});
it('should populate rabbitConfig correctly', async () => {

View File

@@ -5,20 +5,28 @@ import {MongoRepository} from "@mongo/mongo_repository";
import {IocTypes} from "@setup/ioc_types";
import {Container, inject} from "inversify";
jest.mock('@services/configuration_service', () => {
const metadataConfig = {
TITLE_MATCH_THRESHOLD: 0.25,
}
const cacheConfig = {
MONGODB_HOST: 'localhost',
MONGODB_PORT: '27017',
MONGODB_DB: 'knightcrawler',
MONGODB_USER: 'mongo',
MONGODB_PASSWORD: 'mongo',
get MONGO_URI(): string {
return `mongodb://${this.MONGODB_USER}:${this.MONGODB_PASSWORD}@${this.MONGODB_HOST}:${this.MONGODB_PORT}/${this.MONGODB_DB}?authSource=admin`;
},
};
jest.doMock('@services/configuration_service', () => {
return {
configurationService: {
cacheConfig: {
MONGODB_HOST: 'localhost',
MONGODB_PORT: '27017',
MONGODB_DB: 'knightcrawler',
MONGODB_USER: 'mongo',
MONGODB_PASSWORD: 'mongo',
get MONGO_URI(): string {
return `mongodb://${this.MONGODB_USER}:${this.MONGODB_PASSWORD}@${this.MONGODB_HOST}:${this.MONGODB_PORT}/${this.MONGODB_DB}?authSource=admin`;
}
},
}
cacheConfig: cacheConfig,
metadataConfig: metadataConfig,
},
}
});