From f7f93c8b2abd870d2e9111b10b1e21cd43f89c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20N=C3=A1n=C3=A1si?= Date: Thu, 16 Jun 2022 08:54:54 +0200 Subject: [PATCH] Changelog and API design updated, ready for 1.0.7 release --- APIDESIGN.md | 6 ++++++ CHANGELOG.md | 4 +++- package.json | 2 +- remoteServer.js | 1 - 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/APIDESIGN.md b/APIDESIGN.md index 0cb3f26..76f93cd 100644 --- a/APIDESIGN.md +++ b/APIDESIGN.md @@ -36,6 +36,12 @@ Gets info about MPV. MPV remote plugin settings also included. Gets status of the player. +**Query parameters:** + +**exclude:** You can provide properties to exclude as list. + +- example value: exclude=playlist,track-list + Example response: ```json diff --git a/CHANGELOG.md b/CHANGELOG.md index 502b538..b1d7383 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,4 +39,6 @@ ## 1.0.7 -- Fixed IP getting on newer Node.JS versions +- Fixed IP getting on newer Node.JS versions, +- If the CPU usage high on the host machine returning cached properties, +- Ability to exclude properties on /status route as query param, check [APIDESIGN.MD](https://github.com/husudosu/mpv-remote-node/blob/master/APIDESIGN.md) diff --git a/package.json b/package.json index eb00730..6c56d6c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mpv-remote", - "version": "1.0.6", + "version": "1.0.7", "description": "MPV remote control", "main": "./remote.socketio.js", "scripts": { diff --git a/remoteServer.js b/remoteServer.js index 9b6ace8..50d2d2f 100644 --- a/remoteServer.js +++ b/remoteServer.js @@ -115,7 +115,6 @@ const asyncCallWithTimeout = async (asyncPromise, timeLimit) => { }; app.get("/api/v1/status", async (req, res) => { - setTimeout(async () => {}); try { const result = await asyncCallWithTimeout( getMPVProps(req.query.exclude),