public EmuMoviesMetadataProvider(MetadataRequestOptions options, EmuMoviesMetadataPlugin plugin)
        {
            _options = options;
            _plugin  = plugin;

            if (!string.IsNullOrWhiteSpace(_options?.GameData?.Platform?.Name))
            {
                _platform = _plugin.PlatformTranslationTable.ContainsKey(_options.GameData.Platform.Name)
                    ? _plugin.PlatformTranslationTable[_options.GameData.Platform.Name]
                    : Regex.Replace(_options.GameData.Platform.Name, @"[^A-Za-z0-9]", "_");
            }

            if (_options?.GameData != null)
            {
                if (!string.IsNullOrWhiteSpace(_options.GameData.GameImagePath))
                {
                    _gameNames.Add(Path.GetFileNameWithoutExtension(_options.GameData.GameImagePath));
                }

                if (!string.IsNullOrWhiteSpace(_options.GameData.Name))
                {
                    _gameNames.Add(_options.GameData.Name);
                }
            }
        }
예제 #2
0
 public EmuMoviesMetadataSettingsView(EmuMoviesMetadataPlugin plugin)
 {
     _plugin = plugin;
     InitializeComponent();
 }