use std::sync::Arc;
use unm_engine::executor::Executor;
pub fn build_full_executor() -> Executor {
log::debug!("Building the executor with all the official engines registered…");
let mut executor = Executor::new();
macro_rules! push_engine {
($engine_name:ident: $engine_struct:ident) => {
concat_idents::concat_idents!(engine_crate = unm_engine_, $engine_name {
executor.register(engine_crate::ENGINE_ID.into(), Arc::new(engine_crate::$engine_struct));
})
};
}
push_engine!(bilibili: BilibiliEngine);
push_engine!(kugou: KugouEngine);
push_engine!(pyncm: PyNCMEngine);
push_engine!(ytdl: YtDlEngine);
push_engine!(kuwo: KuwoEngine);
push_engine!(joox: JooxEngine);
push_engine!(qq: QQEngine);
executor
}