mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-09-10 22:04:53 +02:00
Added an API to add & delete entries from the skippedArtists list in the settings. fixes [#405]
This commit is contained in:
@@ -4,6 +4,7 @@ import { settings } from "../../constants/settings";
|
||||
import { settingsStore } from "../../scripts/settings";
|
||||
import { addCurrentInfo } from "./features/current";
|
||||
import { addPlaybackControl } from "./features/player";
|
||||
import { addSettingsAPI } from "./features/settings/settings";
|
||||
import { addLegacyApi } from "./legacy";
|
||||
|
||||
/**
|
||||
@@ -11,12 +12,14 @@ import { addLegacyApi } from "./legacy";
|
||||
*/
|
||||
export const startApi = (mainWindow: BrowserWindow) => {
|
||||
const expressApp = express();
|
||||
expressApp.use(express.json());
|
||||
expressApp.get("/", (req, res) => res.send("Hello World!"));
|
||||
|
||||
// add features
|
||||
addLegacyApi(expressApp, mainWindow);
|
||||
addPlaybackControl(expressApp, mainWindow);
|
||||
addCurrentInfo(expressApp);
|
||||
addSettingsAPI(expressApp, mainWindow);
|
||||
|
||||
const port = settingsStore.get<string, number>(settings.apiSettings.port);
|
||||
const expressInstance = expressApp.listen(port, "127.0.0.1");
|
||||
|
Reference in New Issue
Block a user