void IInitializeService.Initialize() { preferred_engine_id = EngineSchema.Get(); if (default_engine == null && engines.Count > 0) { default_engine = engines[0]; } foreach (TypeExtensionNode node in AddinManager.GetExtensionNodes("/Banshee/MediaEngine/PlayerEngine")) { LoadEngine(node); } if (default_engine != null) { active_engine = default_engine; Log.Debug(Catalog.GetString("Default player engine"), active_engine.Name); } else { default_engine = active_engine; } if (default_engine == null || active_engine == null || engines == null || engines.Count == 0) { Log.Warning(Catalog.GetString( "No player engines were found. Please ensure Banshee has been cleanly installed."), "Using the featureless NullPlayerEngine."); PlayerEngine null_engine = new NullPlayerEngine(); LoadEngine(null_engine); active_engine = null_engine; default_engine = null_engine; } MetadataService.Instance.HaveResult += OnMetadataServiceHaveResult; TrackInfo.IsPlayingMethod = track => IsPlaying(track) && track.CacheModelId == CurrentTrack.CacheModelId && (track.CacheEntryId == null || track.CacheEntryId.Equals(CurrentTrack.CacheEntryId)); }
void IInitializeService.Initialize() { preferred_engine_id = EngineSchema.Get(); if (default_engine == null && engines.Count > 0) { default_engine = engines[0]; } foreach (TypeExtensionNode node in AddinManager.GetExtensionNodes ("/Banshee/MediaEngine/PlayerEngine")) { LoadEngine (node); } if (default_engine != null) { active_engine = default_engine; Log.Debug (Catalog.GetString ("Default player engine"), active_engine.Name); } else { default_engine = active_engine; } if (default_engine == null || active_engine == null || engines == null || engines.Count == 0) { Log.Warning (Catalog.GetString ( "No player engines were found. Please ensure Banshee has been cleanly installed."), "Using the featureless NullPlayerEngine."); PlayerEngine null_engine = new NullPlayerEngine (); LoadEngine (null_engine); active_engine = null_engine; default_engine = null_engine; } MetadataService.Instance.HaveResult += OnMetadataServiceHaveResult; TrackInfo.IsPlayingMethod = track => IsPlaying (track) && track.CacheModelId == CurrentTrack.CacheModelId && (track.CacheEntryId == null || track.CacheEntryId.Equals (CurrentTrack.CacheEntryId)); }