listPluginsLong = manager => {
  const config = manager.getConfig()
  const disabledExtensions = config.pluginManager?.disabled || []

  const plugins = manager.getPlugins()
  const extensions = manager.getExtensions()
  console.log(`Plugins: ${plugins.length} available`)
  plugins.forEach(plugin => {
    console.log(`\n- ${plugin.name} v${plugin.version}:`)
    if (plugin.requires?.length) {
      console.log(`  Requires:`)
      plugin.requires.forEach(dependency => {
        console.log(`  - ${dependency}`)
      })
    }
    const pluginExtensions = extensions.filter(e => e.plugin == plugin)
    if (!pluginExtensions.length) {
      return
    }

    const extractors = pluginExtensions.filter(e => e.type == 'extractor').map(e => e.extension)
    if (extractors?.length) {
      console.log(`  Extractors${extractors.length > 1 ? '(' + extractors.length + ')' : ''}:`)
      extractors.forEach(extractor => {
        const phase = extractor.phase != 'file' ? ', phase ' + extractor.phase : ''
        const disabled = disabledExtensions.includes(`${plugin.name}.${extractor.name}`) ? ' (disabled)' : ''
        console.log(`  - ${plugin.name}.${extractor.name}${phase}${disabled}`)
      })
    }

    const mappers = pluginExtensions.filter(e => e.type == 'database').map(e => e.extension)
    if (mappers?.length) {
      console.log(`  Database mappers${mappers.length > 1 ? '(' + mappers.length + ')' : ''}:`)
      mappers.forEach(mapper => {
        const order = typeof mapper.order != 'undefined' ? mapper.order : 1
        const disabled = disabledExtensions.includes(`${plugin.name}.${mapper.name}`) ? ' (disabled)' : ''
        console.log(`  - ${plugin.name}.${mapper.name}${order != 1 ? ', order ' + order : ''}${disabled}`)
      })
    }

    const queryPlugins = pluginExtensions.filter(e => e.type == 'query').map(e => e.extension)
    if (queryPlugins?.length) {
      console.log(`  Query plugins${queryPlugins.length > 1 ? '(' + queryPlugins.length + ')' : ''}:`)
      queryPlugins.forEach(query => {
        const order = typeof query.order != 'undefined' ? query.order : 1
        const disabled = disabledExtensions.includes(`${plugin.name}.${query.name}`) ? ' (disabled)' : ''
        console.log(`  - ${plugin.name}.${query.name}${order != 1 ? ', order ' + order : ''}${disabled}`)
      })
    }
  })
}
@param {import('@home-gallery/types').TGalleryPluginManager} manager