mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 01:56:16 -08:00
fix: define path to userData folder as db store
This commit is contained in:
1 parent
817884cbde
commit
8e8c107ca7
1 file changed
+6
-2
@@ -1,4 +1,4 @@
|
||||
import { ipcMain } from 'electron';
|
||||
import { app, ipcMain } from 'electron';
|
||||
import { parse } from 'iptv-playlist-parser';
|
||||
import axios from 'axios';
|
||||
import { guid } from '@datorama/akita';
|
||||
@@ -7,7 +7,11 @@ import Nedb from 'nedb-promises-ts';
|
||||
|
||||
const join = require('path').join;
|
||||
const openAboutWindow = require('about-window').default;
|
||||
const db = new Nedb<Playlist>({ filename: 'data.db', autoload: true });
|
||||
const userData = app.getPath('userData');
|
||||
const db = new Nedb<Playlist>({
|
||||
filename: `${userData}/db/data.db`,
|
||||
autoload: true,
|
||||
});
|
||||
|
||||
export class Api {
|
||||
constructor() {
|
||||
|
||||
Reference in new issue
Block a user