mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 12:42:06 +00:00
fix(MPRIS): Prevents player to start with invalid MPRIS interface (#1996)
Co-authored-by: andreas <andreas.angerer@github.com>
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
import { BrowserWindow, globalShortcut } from 'electron';
|
import { BrowserWindow, ipcMain, globalShortcut } from 'electron';
|
||||||
import is from 'electron-is';
|
import is from 'electron-is';
|
||||||
import { register as registerElectronLocalShortcut } from 'electron-localshortcut';
|
import { register as registerElectronLocalShortcut } from 'electron-localshortcut';
|
||||||
|
|
||||||
@ -48,7 +48,9 @@ export const onMainLoad = async ({
|
|||||||
_registerLocalShortcut(window, 'CommandOrControl+L', search);
|
_registerLocalShortcut(window, 'CommandOrControl+L', search);
|
||||||
|
|
||||||
if (is.linux()) {
|
if (is.linux()) {
|
||||||
registerMPRIS(window);
|
ipcMain.once('ytmd:video-src-changed', (_) => {
|
||||||
|
registerMPRIS(window);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const { global, local } = config;
|
const { global, local } = config;
|
||||||
|
|||||||
Reference in New Issue
Block a user