Renames project to Knight Crawler
This commit is contained in:
@@ -6,7 +6,7 @@ import { BadTokenError, AccessDeniedError, sameFilename } from './mochHelper.js'
|
||||
import StaticResponse from './static.js';
|
||||
|
||||
const KEY = 'alldebrid';
|
||||
const AGENT = 'torrentio';
|
||||
const AGENT = 'knightcrawler';
|
||||
|
||||
export async function getCachedStreams(streams, apiKey) {
|
||||
const options = await getDefaultOptions();
|
||||
|
||||
@@ -224,14 +224,14 @@ function blackListToken(token, mochKey) {
|
||||
function errorStreamResponse(mochKey, error, config) {
|
||||
if (error === BadTokenError) {
|
||||
return {
|
||||
name: `Torrentio\n${MochOptions[mochKey].shortName} error`,
|
||||
name: `Knightcrawler\n${MochOptions[mochKey].shortName} error`,
|
||||
title: `Invalid ${MochOptions[mochKey].name} ApiKey/Token!`,
|
||||
url: `${config.host}/${StaticResponse.FAILED_ACCESS}`
|
||||
};
|
||||
}
|
||||
if (error === AccessDeniedError) {
|
||||
return {
|
||||
name: `Torrentio\n${MochOptions[mochKey].shortName} error`,
|
||||
name: `Knightcrawler\n${MochOptions[mochKey].shortName} error`,
|
||||
title: `Expired/invalid ${MochOptions[mochKey].name} subscription!`,
|
||||
url: `${config.host}/${StaticResponse.FAILED_ACCESS}`
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: "torrentio-selfhostio",
|
||||
name: "knightcrawler",
|
||||
script: "npm start",
|
||||
cwd: "/app",
|
||||
watch: ["./dist/index.cjs"],
|
||||
|
||||
4
src/node/addon/package-lock.json
generated
4
src/node/addon/package-lock.json
generated
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "selfhostio-addon",
|
||||
"name": "knightcrawler-addon",
|
||||
"version": "0.0.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "selfhostio-addon",
|
||||
"name": "knightcrawler-addon",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"@putdotio/api-client": "^8.42.0",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "selfhostio-addon",
|
||||
"name": "knightcrawler-addon",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -44,7 +44,7 @@ builder.defineStreamHandler((args) => {
|
||||
|
||||
|
||||
builder.defineCatalogHandler((args) => {
|
||||
const mochKey = args.id.replace("selfhostio-", '');
|
||||
const mochKey = args.id.replace("knightcrawler-", '');
|
||||
console.log(`Incoming catalog ${args.id} request with skip=${args.extra.skip || 0}`)
|
||||
return getMochCatalog(mochKey, args.extra)
|
||||
.then(metas => ({
|
||||
|
||||
@@ -2,7 +2,7 @@ import cacheManager from 'cache-manager';
|
||||
import mangodbStore from 'cache-manager-mongodb';
|
||||
import { isStaticUrl } from '../moch/static.js';
|
||||
|
||||
const GLOBAL_KEY_PREFIX = 'selfhostio-addon';
|
||||
const GLOBAL_KEY_PREFIX = 'knightcrawler-addon';
|
||||
const STREAM_KEY_PREFIX = `${GLOBAL_KEY_PREFIX}|stream`;
|
||||
const AVAILABILITY_KEY_PREFIX = `${GLOBAL_KEY_PREFIX}|availability`;
|
||||
const RESOLVED_URL_KEY_PREFIX = `${GLOBAL_KEY_PREFIX}|resolved`;
|
||||
@@ -28,7 +28,7 @@ function initiateRemoteCache() {
|
||||
store: mangodbStore,
|
||||
uri: MONGO_URI,
|
||||
options: {
|
||||
collection: 'selfhostio_addon_collection',
|
||||
collection: 'knightcrawler_addon_collection',
|
||||
socketTimeoutMS: 120000,
|
||||
useNewUrlParser: true,
|
||||
useUnifiedTopology: false,
|
||||
|
||||
@@ -6,13 +6,15 @@ const CatalogMochs = Object.values(MochOptions).filter(moch => moch.catalog);
|
||||
|
||||
export function manifest(config = {}) {
|
||||
return {
|
||||
id: 'com.stremio.selfhostio.selfhostio',
|
||||
version: '0.0.1',
|
||||
id: 'com.stremio.knightcrawler.knightcrawler',
|
||||
version: 'v0.0.1',
|
||||
name: getName(config),
|
||||
description: getDescription(config),
|
||||
description: getDescription(),
|
||||
catalogs: getCatalogs(config),
|
||||
resources: getResources(config),
|
||||
types: [Type.MOVIE, Type.SERIES, Type.ANIME, Type.OTHER],
|
||||
background: "https://i.ibb.co/9pXGycn/logo-color.png",
|
||||
logo: "https://i.ibb.co/hYJPLdP/logo-only.png",
|
||||
behaviorHints: {
|
||||
configurable: true,
|
||||
configurationRequired: false,
|
||||
@@ -28,7 +30,7 @@ export function dummyManifest() {
|
||||
}
|
||||
|
||||
function getName(config) {
|
||||
const rootName = 'selfhostio';
|
||||
const rootName = 'Knight Crawler';
|
||||
const mochSuffix = Object.values(MochOptions)
|
||||
.filter(moch => config[moch.key])
|
||||
.map(moch => moch.shortName)
|
||||
@@ -36,15 +38,15 @@ function getName(config) {
|
||||
return [rootName, mochSuffix].filter(v => v).join(' ');
|
||||
}
|
||||
|
||||
function getDescription(config) {
|
||||
return 'Selfhostio the Torrentio brings you much Funio';
|
||||
function getDescription() {
|
||||
return 'Selfhost the Torrentio brings you much Funio';
|
||||
}
|
||||
|
||||
function getCatalogs(config) {
|
||||
return CatalogMochs
|
||||
.filter(moch => showDebridCatalog(config) && config[moch.key])
|
||||
.map(moch => ({
|
||||
id: `selfhostio-${moch.key}`,
|
||||
id: `knightcrawler-${moch.key}`,
|
||||
name: `${moch.name}`,
|
||||
type: 'other',
|
||||
extra: [{ name: 'skip' }],
|
||||
|
||||
@@ -4,7 +4,7 @@ import { getSources } from './magnetHelper.js';
|
||||
import { getSubtitles } from './subtitles.js';
|
||||
import { Type } from './types.js';
|
||||
|
||||
const ADDON_NAME = 'selfhostio';
|
||||
const ADDON_NAME = 'knightcrawler';
|
||||
const SIZE_DELTA = 0.02;
|
||||
const UNKNOWN_SIZE = 300000000;
|
||||
const CAM_SOURCES = ['CAM', 'TeleSync', 'TeleCine', 'SCR'];
|
||||
@@ -38,7 +38,7 @@ export function toStreamInfo(record) {
|
||||
'\n'
|
||||
);
|
||||
const bingeGroupParts = getBingeGroupParts(record, sameInfo, quality, torrentInfo, fileInfo);
|
||||
const bingeGroup = joinDetailParts(bingeGroupParts, "selfhostio|", "|")
|
||||
const bingeGroup = joinDetailParts(bingeGroupParts, "knightcrawler|", "|")
|
||||
const behaviorHints = bingeGroup ? { bingeGroup } : undefined;
|
||||
|
||||
return cleanOutputObject({
|
||||
|
||||
@@ -6,7 +6,7 @@ import { BadTokenError, AccessDeniedError, sameFilename } from './mochHelper.js'
|
||||
import StaticResponse from './static.js';
|
||||
|
||||
const KEY = 'alldebrid';
|
||||
const AGENT = 'selfhostio';
|
||||
const AGENT = 'knightcrawler';
|
||||
|
||||
export async function getCachedStreams(streams, apiKey) {
|
||||
const options = await getDefaultOptions();
|
||||
|
||||
@@ -224,14 +224,14 @@ function blackListToken(token, mochKey) {
|
||||
function errorStreamResponse(mochKey, error, config) {
|
||||
if (error === BadTokenError) {
|
||||
return {
|
||||
name: `Selfhostio\n${MochOptions[mochKey].shortName} error`,
|
||||
name: `KnightCrawler\n${MochOptions[mochKey].shortName} error`,
|
||||
title: `Invalid ${MochOptions[mochKey].name} ApiKey/Token!`,
|
||||
url: `${config.host}/${StaticResponse.FAILED_ACCESS}`
|
||||
};
|
||||
}
|
||||
if (error === AccessDeniedError) {
|
||||
return {
|
||||
name: `Selfhostio\n${MochOptions[mochKey].shortName} error`,
|
||||
name: `KnightCrawler\n${MochOptions[mochKey].shortName} error`,
|
||||
title: `Expired/invalid ${MochOptions[mochKey].name} subscription!`,
|
||||
url: `${config.host}/${StaticResponse.FAILED_ACCESS}`
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ import { cacheConfig } from './config.js';
|
||||
import { logger } from './logger.js';
|
||||
import { CacheType } from "./types.js";
|
||||
|
||||
const GLOBAL_KEY_PREFIX = 'selfhostio-consumer';
|
||||
const GLOBAL_KEY_PREFIX = 'knightcrawler-consumer';
|
||||
const IMDB_ID_PREFIX = `${GLOBAL_KEY_PREFIX}|imdb_id`;
|
||||
const KITSU_ID_PREFIX = `${GLOBAL_KEY_PREFIX}|kitsu_id`;
|
||||
const METADATA_PREFIX = `${GLOBAL_KEY_PREFIX}|metadata`;
|
||||
@@ -26,7 +26,7 @@ const initiateMongoCache = () => {
|
||||
url: cacheConfig.MONGO_URI,
|
||||
mongoConfig:{
|
||||
socketTimeoutMS: 120000,
|
||||
appName: 'selfhostio-consumer',
|
||||
appName: 'knightcrawler-consumer',
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
}
|
||||
|
||||
export const cacheConfig = {
|
||||
MONGO_URI: process.env.MONGODB_URI || 'mongodb://mongo:mongo@localhost:27017/selfhostio?authSource=admin',
|
||||
MONGO_URI: process.env.MONGODB_URI || 'mongodb://mongo:mongo@localhost:27017/knightcrawler?authSource=admin',
|
||||
NO_CACHE: parseBool(process.env.NO_CACHE, false),
|
||||
COLLECTION_NAME: process.env.MONGODB_COLLECTION || 'selfhostio_consumer_collection'
|
||||
COLLECTION_NAME: process.env.MONGODB_COLLECTION || 'knightcrawler_consumer_collection'
|
||||
}
|
||||
|
||||
export const databaseConfig = {
|
||||
DATABASE_URI: process.env.DATABASE_URI || 'postgres://postgres:postgres@localhost:5432/selfhostio',
|
||||
DATABASE_URI: process.env.DATABASE_URI || 'postgres://postgres:postgres@localhost:5432/knightcrawler',
|
||||
ENABLE_SYNC: parseBool(process.env.ENABLE_SYNC, true)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user