mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
@ -1,16 +1,17 @@
|
||||
import is from 'electron-is';
|
||||
|
||||
import defaultConfig from '../../../config/defaults';
|
||||
import { pluginBuilders } from 'virtual:PluginBuilders';
|
||||
|
||||
export const getAvailablePluginNames = () => {
|
||||
return Object.keys(defaultConfig.plugins).filter((name) => {
|
||||
if (is.windows() && name === 'touchbar') {
|
||||
return false;
|
||||
} else if (is.macOS() && name === 'taskbar-mediacontrol') {
|
||||
return false;
|
||||
} else if (is.linux() && (name === 'taskbar-mediacontrol' || name === 'touchbar')) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
return Object.keys(pluginBuilders)
|
||||
.filter((id) => {
|
||||
if (is.windows() && id === 'touchbar') {
|
||||
return false;
|
||||
} else if (is.macOS() && id === 'taskbar-mediacontrol') {
|
||||
return false;
|
||||
} else if (is.linux() && (id === 'taskbar-mediacontrol' || id === 'touchbar')) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user