mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-10 10:11:46 +00:00
fix(tuna-obs): change to not print messages when not in development mode
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { ipcMain, net, BrowserWindow } from 'electron';
|
||||
import is from 'electron-is';
|
||||
|
||||
import registerCallback from '../../providers/song-info';
|
||||
|
||||
@ -41,7 +42,11 @@ const post = (data: Data) => {
|
||||
method: 'POST',
|
||||
headers,
|
||||
body: JSON.stringify({ data }),
|
||||
}).catch((error: { code: number, errno: number }) => console.log(`Error: '${error.code || error.errno}' - when trying to access obs-tuna webserver at port ${port}`));
|
||||
}).catch((error: { code: number, errno: number }) => {
|
||||
if (is.dev()) {
|
||||
console.debug(`Error: '${error.code || error.errno}' - when trying to access obs-tuna webserver at port ${port}`);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export default (win: BrowserWindow) => {
|
||||
|
||||
Reference in New Issue
Block a user