mirror of
https://github.com/sakaljurgis/kodi-api-server.git
synced 2026-07-09 04:47:41 +00:00
move aliases to file storage
This commit is contained in:
@@ -8,8 +8,8 @@ import { RecentSearchesConfig } from './recent-searches.config';
|
||||
env.config();
|
||||
|
||||
export class ConfigService {
|
||||
private typeOrmConfig: TypeOrmConfig = new TypeOrmConfig(this);
|
||||
private pathsConfig: PathsConfig = new PathsConfig(this);
|
||||
private typeOrmConfig: TypeOrmConfig = new TypeOrmConfig(this);
|
||||
private videoFilesConfig: VideoFilesConfig = new VideoFilesConfig(this);
|
||||
private recentSearches: RecentSearchesConfig = new RecentSearchesConfig(this);
|
||||
|
||||
|
||||
@@ -23,6 +23,10 @@ export class PathsConfig {
|
||||
return this.getPath(relPath);
|
||||
}
|
||||
|
||||
public getDbFolderPath(): string {
|
||||
return '/srv/data/db';
|
||||
}
|
||||
|
||||
private getPath(relPath: string) {
|
||||
if (relPath[0] === '/') {
|
||||
//this is an absolute path
|
||||
|
||||
@@ -9,7 +9,10 @@ import { join } from 'path';
|
||||
export class TypeOrmConfig {
|
||||
constructor(configService: ConfigService) {
|
||||
this.type = 'sqlite';
|
||||
this.database = join('/srv/data/db', configService.getEnv('DB_FILENAME'));
|
||||
this.database = join(
|
||||
configService.getPaths().getDbFolderPath(),
|
||||
configService.getEnv('DB_FILENAME'),
|
||||
);
|
||||
this.entities = [LrtCategory, TitleEntity, FileEntity, TorrentEntity];
|
||||
}
|
||||
type: 'sqlite';
|
||||
|
||||
Reference in New Issue
Block a user