def extension_register(self): if sys.platform == "linux2" or sys.platform == 'linux3': #import unix players extension.register(CATEGORY, handler_mpris.Amarok2Handler) extension.register(CATEGORY, handler_mpris.AudaciousHandler) extension.register(CATEGORY, handler_banshee.BansheeHandler) extension.register(CATEGORY, handler_mpris.ClementineHandler) extension.register(CATEGORY, handler_exaile.ExaileHandler) extension.register(CATEGORY, handler_mpris2.GMusicBrowserHandler) extension.register(CATEGORY, handler_mpris.GuayadequeHandler) extension.register(CATEGORY, handler_lastfm.LastfmHandler) extension.register(CATEGORY, handler_moc.MocHandler) extension.register(CATEGORY, handler_mpd.MpdHandler) extension.register(CATEGORY, handler_mpris2.PraghaHandler) extension.register(CATEGORY, handler_mpris2.RhythmboxHandler) extension.register(CATEGORY, handler_mpris2.AudaciousHandler) extension.register(CATEGORY, handler_rhythmbox.RhythmboxHandler) if XMMSCLIENT: extension.register(CATEGORY, handler_xmms2.Xmms2Handler) handler_id = self.session.config.d_extensions.get(CATEGORY, None) if handler_id is None: handler_id = extension._get_class_name(handler_rhythmbox.RhythmboxHandler) self.session.config.d_extensions.get(CATEGORY, handler_id) elif sys.platform == "darwin": #OS X players extension.register(CATEGORY, handler_itunes.iTunesHandler) extension.register(CATEGORY, handler_spotify.SpotifyHandler) handler_id = self.session.config.d_extensions.get(CATEGORY, None) if handler_id is None: handler_id = extension._get_class_name(handler_rhythmbox.RhythmboxHandler) self.session.config.d_extensions.get(CATEGORY, handler_id) else: #import Windows players extension.register(CATEGORY, handler_atunes.aTunesHandler) extension.register(CATEGORY, handler_foobar2000.Foobar2000Handler) extension.register(CATEGORY, handler_gomplayer.GOMPlayerHandler) extension.register(CATEGORY, handler_mediamonkey.MediaMonkeyHandler) extension.register(CATEGORY, handler_mediaplayerclassic.MediaPlayerClassicHandler) extension.register(CATEGORY, handler_onebyone.OneByOneHandler) extension.register(CATEGORY, handler_realplayer.RealPlayerHandler) extension.register(CATEGORY, handler_smplayer.SMPlayerHandler) extension.register(CATEGORY, handler_winamp.WinampHandler) extension.register(CATEGORY, handler_xmplay.XMPlayHandler) handler_id = self.session.config.d_extensions.get(CATEGORY, None) if handler_id is None: handler_id = extension._get_class_name(handler_winamp.WinampHandler) self.session.config.d_extensions.get(CATEGORY, handler_id) extension.set_default_by_id(CATEGORY, handler_id) if hasattr(extension, 'unregister'): extension.register('userpanel button', MusicButton.MusicButton, force_default=True) else: extension.register('userpanel button', MusicButton.MusicButton)
def _setup(self): """register core extensions""" extension.category_register("session", dummy.Session, single_instance=True) # extension.category_register('session', msn.Session, # single_instance=True) if jabber is not None: extension.register("session", jabber.Session) extension.register("session", dummy.Session) # extension.register('session', msn.Session) if papylib is not None: extension.register("session", papylib.Session) extension.set_default("session", papylib.Session) else: extension.set_default("session", dummy.Session) # DBus extension stuffs if DBusController is not None: extension.category_register("external api", DBusController) extension.set_default("external api", DBusController) self.dbus_ext = extension.get_and_instantiate("external api") else: self.dbus_ext = None extension.category_register("sound", e3.common.play_sound.play) extension.category_register("notification", e3.common.notification.Notification) extension.category_register("history exporter", e3.Logger.save_logs_as_txt) if self.config.session is None: default_id = extension.get_category("session").default_id self.config.session = default_id else: default_id = self.config.session extension.set_default_by_id("session", default_id)
def set_default_extensions_from_config(self): '''get the ids of the default extensions stored on config and set them as default on the extensions module''' if self.config.d_extensions is not None: for cat_name, ext_id in self.config.d_extensions.iteritems(): extension.set_default_by_id(cat_name, ext_id)
def _setup(self): """register core extensions""" extension.category_register("session", dummy.Session, single_instance=True) if xmpp is not None: extension.register("session", xmpp.Session) extension.register("session", dummy.Session) if webqq is not None: extension.register("session", webqq.Session) extension.register("session", dummy.Session) if papylib is not None: extension.register("session", papylib.Session) extension.set_default("session", papylib.Session) else: extension.set_default("session", dummy.Session) # external API stuff self.dbus_ext = extension.get_and_instantiate("external api") self.network_checker = extension.get_and_instantiate("network checker") self.unity_launcher = extension.get_and_instantiate("unity launcher") extension.category_register("sound", e3.common.Sounds.SoundPlayer, None, True) extension.category_register("notification", e3.common.notification.Notification) extension.category_register("history exporter", e3.Logger.save_logs_as_txt) extension.register("history exporter", e3.Logger.save_logs_as_xml) if self.config.session is None: default_id = extension.get_category("session").default_id self.config.session = default_id else: default_id = self.config.session extension.set_default_by_id("session", default_id)
def _setup(self): """register core extensions""" extension.category_register("session", msn.Session, single_instance=True) extension.register("session", jabber.Session) extension.register("session", dummy.Session) extension.register("session", msn.Session) if papylib is not None: extension.register("session", papylib.Session) extension.set_default("session", papylib.Session) else: extension.set_default("session", msn.Session) extension.category_register("sound", e3.common.play_sound.play) extension.category_register("notification", e3.common.notification.Notification) extension.category_register("history exporter", e3.Logger.save_logs_as_txt) if self.config.session is None: default_id = extension.get_category("session").default_id self.config.session = default_id else: default_id = self.config.session extension.set_default_by_id("session", default_id) get_pluginmanager().scan_directory("plugins")
def _setup(self): '''register core extensions''' extension.category_register('session', msn.Session, single_instance=True) extension.register('session', jabber.Session) extension.register('session', dummy.Session) if papylib is not None: extension.register('session', papylib.Session) extension.set_default('session', papylib.Session) extension.category_register('sound', e3.common.play_sound.play) extension.category_register('notification', e3.common.notification.Notification) extension.category_register('history exporter', e3.Logger.save_logs_as_txt) if self.config.session is None: default_id = extension.get_category('session').default_id self.config.session = default_id else: default_id = self.config.session extension.set_default_by_id('session', default_id) get_pluginmanager().scan_directory('plugins')
def _setup(self): '''register core extensions''' extension.category_register('session', msn.Session, single_instance=True) extension.register('session', jabber.Session) extension.register('session', dummy.Session) extension.register('session', msn.Session) if papylib is not None: extension.register('session', papylib.Session) extension.set_default('session', papylib.Session) else: extension.set_default('session', msn.Session) extension.category_register('sound', e3.common.play_sound.play) extension.category_register('notification', e3.common.notification.Notification) extension.category_register('history exporter', e3.Logger.save_logs_as_txt) if self.config.session is None: default_id = extension.get_category('session').default_id self.config.session = default_id else: default_id = self.config.session extension.set_default_by_id('session', default_id) get_pluginmanager().scan_directory('plugins')
def _setup(self): '''register core extensions''' extension.category_register('session', dummy.Session, single_instance=True) #extension.category_register('session', msn.Session, # single_instance=True) extension.register('session', jabber.Session) extension.register('session', dummy.Session) #extension.register('session', msn.Session) if papylib is not None: extension.register('session', papylib.Session) extension.set_default('session', papylib.Session) else: extension.set_default('session', dummy.Session) #DBus extension stuffs extension.category_register('external api', DBusController) extension.set_default('external api', DBusController) self.dbus_ext = extension.get_and_instantiate('external api') extension.category_register('sound', e3.common.play_sound.play) extension.category_register('notification', e3.common.notification.Notification) extension.category_register('history exporter', e3.Logger.save_logs_as_txt) if self.config.session is None: default_id = extension.get_category('session').default_id self.config.session = default_id else: default_id = self.config.session extension.set_default_by_id('session', default_id)
def on_preferences_changed(self, use_http, proxy, session_id, service): '''called when the preferences on login change''' self.config.session = session_id extension.set_default_by_id('session', session_id) self.config.b_use_http = use_http self.config.service = service self._save_proxy_settings(proxy)
def on_preferences_changed(self, use_http, use_ipv6, proxy, session_id, service): """called when the preferences on login change""" self.config.session = session_id extension.set_default_by_id("session", session_id) self.config.b_use_http = use_http self.config.b_use_ipv6 = use_ipv6 self.config.service = service self._save_proxy_settings(proxy)
def _setup(self): '''register core extensions''' extension.category_register('session', dummy.Session, single_instance=True) #extension.category_register('session', msn.Session, # single_instance=True) if jabber is not None: extension.register('session', jabber.Session) extension.register('session', dummy.Session) #extension.register('session', msn.Session) if papylib is not None: extension.register('session', papylib.Session) extension.set_default('session', papylib.Session) else: extension.set_default('session', dummy.Session) #DBus extension stuffs if DBusController is not None: extension.category_register('external api', DBusController) extension.set_default('external api', DBusController) self.dbus_ext = extension.get_and_instantiate('external api') else: self.dbus_ext = None if DBusNetworkChecker is not None: extension.category_register('network checker', DBusNetworkChecker) extension.set_default('network checker', DBusNetworkChecker) self.network_checker = extension.get_and_instantiate( 'network checker') else: self.network_checker = None if UnityLauncher is not None: extension.category_register('unity launcher', UnityLauncher) extension.set_default('unity launcher', UnityLauncher) self.unity_launcher = extension.get_and_instantiate( 'unity launcher', self.close_session) else: self.unity_launcher = None extension.category_register('sound', e3.common.Sounds.SoundPlayer, None, True) extension.category_register('notification', e3.common.notification.Notification) extension.category_register('history exporter', e3.Logger.save_logs_as_txt) if self.config.session is None: default_id = extension.get_category('session').default_id self.config.session = default_id else: default_id = self.config.session extension.set_default_by_id('session', default_id)
def _setup(self): '''register core extensions''' extension.category_register('session', dummy.Session, single_instance=True) if Info.EMESENE_VERSION.endswith("dev"): extension.register('session', dummy.Session) if webqq is not None: extension.register('session', webqq.Session) extension.set_default('session', webqq.Session) if xmpp is not None: extension.register('session', xmpp.Session) extension.set_default('session', xmpp.Session) if papylib is not None: extension.register('session', papylib.Session) extension.set_default('session', papylib.Session) #external API stuff self.dbus_ext = extension.get_and_instantiate('external api') self.network_checker = extension.get_and_instantiate('network checker') handler = gui.base.TrayIconHandler(self.session, gui.theme, self.close_session) unitylaunchercls = extension.get_default('unity launcher') self.unity_launcher = unitylaunchercls(handler) extension.category_register('sound', e3.common.Sounds.SoundPlayer, None, True) extension.category_register('notification', e3.common.notification.Notification) extension.category_register('history exporter', e3.Logger.ExporterTxt) extension.register('history exporter', e3.Logger.ExporterXml) extension.register('history exporter', e3.Logger.ExporterHtml) extension.register('history exporter', e3.Logger.ExporterCsv) extension.register('history exporter', e3.Logger.ExporterJSON) # ui callbacks for plugins extension.category_register('send message callback handler', e3.common.PriorityList, single_instance=True) extension.category_register('receive message callback handler', e3.common.PriorityList, single_instance=True) if self.config.session is None: default_id = extension.get_category('session').default_id self.config.session = default_id else: default_id = self.config.session extension.set_default_by_id('session', default_id)
def _setup(self): '''register core extensions''' #extension.category_register('session', dummy.Session, # single_instance=True) #if Info.EMESENE_VERSION.endswith("dev"): # extension.register('session', dummy.Session) #if webqq is not None: # extension.register('session', webqq.Session) # extension.set_default('session', webqq.Session) #if xmpp is not None: # extension.register('session', xmpp.Session) # extension.set_default('session', xmpp.Session) if whatsapp is not None: extension.register('session', whatsapp.Session) extension.set_default('session', whatsapp.Session) #if papylib is not None: # extension.register('session', papylib.Session) # extension.set_default('session', papylib.Session) #external API stuff self.dbus_ext = extension.get_and_instantiate('external api') self.network_checker = extension.get_and_instantiate( 'network checker') self.unity_launcher = extension.get_and_instantiate('unity launcher') extension.category_register('sound', e3.common.Sounds.SoundPlayer, None, True) extension.category_register('notification', e3.common.notification.Notification) extension.category_register('history exporter', e3.Logger.ExporterTxt) extension.register('history exporter', e3.Logger.ExporterXml) extension.register('history exporter', e3.Logger.ExporterHtml) extension.register('history exporter', e3.Logger.ExporterCsv) extension.register('history exporter', e3.Logger.ExporterJSON) # ui callbacks for plugins extension.category_register('send message callback handler', e3.common.PriorityList, single_instance=True) extension.category_register('receive message callback handler', e3.common.PriorityList, single_instance=True) if self.config.session is None: default_id = extension.get_category('session').default_id self.config.session = default_id else: default_id = self.config.session extension.set_default_by_id('session', default_id)
def _setup(self): '''register core extensions''' extension.category_register('session', dummy.Session, single_instance=True) #extension.category_register('session', msn.Session, # single_instance=True) if jabber is not None: extension.register('session', jabber.Session) extension.register('session', dummy.Session) #extension.register('session', msn.Session) if papylib is not None: extension.register('session', papylib.Session) extension.set_default('session', papylib.Session) else: extension.set_default('session', dummy.Session) #DBus extension stuffs if DBusController is not None: extension.category_register('external api', DBusController) extension.set_default('external api', DBusController) self.dbus_ext = extension.get_and_instantiate('external api') else: self.dbus_ext = None if DBusNetworkChecker is not None: extension.category_register('network checker', DBusNetworkChecker) extension.set_default('network checker', DBusNetworkChecker) self.network_checker = extension.get_and_instantiate( 'network checker') else: self.network_checker = None self.unity_launcher = extension.get_and_instantiate('unity launcher') extension.category_register('sound', e3.common.Sounds.SoundPlayer, None, True) extension.category_register('notification', e3.common.notification.Notification) extension.category_register('history exporter', e3.Logger.save_logs_as_txt) if self.config.session is None: default_id = extension.get_category('session').default_id self.config.session = default_id else: default_id = self.config.session extension.set_default_by_id('session', default_id)
def _setup(self): '''register core extensions''' extension.category_register('session', dummy.Session, single_instance=True) extension.register('session', dummy.Session) if webqq is not None: extension.register('session', webqq.Session) extension.set_default('session', webqq.Session) if xmpp is not None: extension.register('session', xmpp.Session) extension.set_default('session', xmpp.Session) if papylib is not None: extension.register('session', papylib.Session) extension.set_default('session', papylib.Session) #external API stuff self.dbus_ext = extension.get_and_instantiate('external api') self.network_checker = extension.get_and_instantiate( 'network checker') self.unity_launcher = extension.get_and_instantiate('unity launcher') extension.category_register('sound', e3.common.Sounds.SoundPlayer, None, True) extension.category_register('notification', e3.common.notification.Notification) extension.category_register('history exporter', e3.Logger.ExporterTxt) extension.register('history exporter', e3.Logger.ExporterXml) extension.register('history exporter', e3.Logger.ExporterHtml) extension.register('history exporter', e3.Logger.ExporterCsv) extension.register('history exporter', e3.Logger.ExporterJSON) if self.config.session is None: default_id = extension.get_category('session').default_id self.config.session = default_id else: default_id = self.config.session extension.set_default_by_id('session', default_id)
def extensions_register(self): import handler_amarok2 import handler_audacious2 import handler_banshee import handler_exaile import handler_gmusicbrowser import handler_guayadeque import handler_lastfm import handler_moc import handler_mpd import handler_mpris import handler_rhythmbox try: import handler_xmms2 XMMSCLIENT = True except ImportError: XMMSCLIENT = False extension.register(CATEGORY, handler_amarok2.Amarok2Handler) extension.register(CATEGORY, handler_audacious2.Audacious2Handler) extension.register(CATEGORY, handler_banshee.BansheeHandler) extension.register(CATEGORY, handler_exaile.ExaileHandler) extension.register(CATEGORY, handler_gmusicbrowser.GMusicBrowserHandler) extension.register(CATEGORY, handler_guayadeque.GuayadequeHandler) extension.register(CATEGORY, handler_lastfm.LastfmHandler) extension.register(CATEGORY, handler_moc.MocHandler) extension.register(CATEGORY, handler_mpd.MpdHandler) extension.register(CATEGORY, handler_mpris.MprisHandler) extension.register(CATEGORY, handler_rhythmbox.RhythmboxHandler) if XMMSCLIENT: extension.register(CATEGORY, handler_xmms2.Xmms2Handler) handler_id = self.session.config.d_extensions.get(CATEGORY, None) if handler_id is None: handler_id = extension._get_class_name(handler_rhythmbox.RhythmboxHandler) self.session.config.d_extensions.get(CATEGORY, handler_id) extension.set_default_by_id(CATEGORY, handler_id)
def _on_extension_changed(self, combo): """callback called when the extension on the combo changes""" category = str(self.categories_cmb.currentText()) extension_index = self.extensions_cmb.currentIndex() # when the model is cleared this event is emited if extension_index == -1: return ext, identifier = self.extension_list[extension_index] if not extension.set_default_by_id(category, identifier): # TODO: revert the selection to the previous selected extension log.warning(("Could not set %s as default extension for %s") % (extension_id, category)) return ext = extension.get_default(category) self._set_extension_info(ext)
def _on_extension_changed(self, combo): """callback called when the extension on the combo changes""" category = self.categories.get_active_text() extension_index = self.extensions.get_active() # when the model is cleared this event is emited if extension_index == -1: return ext, identifier = self.extension_list[extension_index] if not extension.set_default_by_id(category, identifier): # TODO: revert the selection to the previous selected extension log.warning('Could not set %s as default extension for %s' % \ (extension_id, category)) return ext = extension.get_default(category) self._set_extension_info(ext)
def _on_extension_changed(self, combo): """callback called when the extension on the combo changes """ category = self.categories.get_active_text() extension_index = self.extensions.get_active() # when the model is cleared this event is emited if extension_index == -1: return ext, identifier = self.extension_list[extension_index] if not extension.set_default_by_id(category, identifier): # TODO: revert the selection to the previous selected extension dbg('Could not set %s as default extension for %s' % (extension_id, category), 'gtk-preferences') return ext = extension.get_default(category) self._set_extension_info(ext)
def _on_extension_changed(self, combo): """callback called when the extension on the combo changes""" category = self.categories.get_active_text() extension_index = self.extensions.get_active() # when the model is cleared this event is emited if extension_index == -1: return ext, identifier = self.extension_list[extension_index] if not extension.set_default_by_id(category, identifier): # TODO: revert the selection to the previous selected extension log.warning(_('Could not set %1 as default extension for %2') % \ (extension_index, category)) return else: self.session.config.d_extensions[category] = identifier ext = extension.get_default(category) self._set_extension_info(ext)
def extensions_register(self): if os.name != "nt": #import unix players import handler_amarok2 import handler_audacious2 import handler_banshee import handler_clementine import handler_exaile import handler_gmusicbrowser import handler_guayadeque import handler_lastfm import handler_moc import handler_mpd import handler_mpris import handler_rhythmbox try: import handler_xmms2 XMMSCLIENT = True except ImportError: XMMSCLIENT = False extension.register(CATEGORY, handler_amarok2.Amarok2Handler) extension.register(CATEGORY, handler_audacious2.Audacious2Handler) extension.register(CATEGORY, handler_banshee.BansheeHandler) extension.register(CATEGORY, handler_clementine.ClementineHandler) extension.register(CATEGORY, handler_exaile.ExaileHandler) extension.register(CATEGORY, handler_gmusicbrowser.GMusicBrowserHandler) extension.register(CATEGORY, handler_guayadeque.GuayadequeHandler) extension.register(CATEGORY, handler_lastfm.LastfmHandler) extension.register(CATEGORY, handler_moc.MocHandler) extension.register(CATEGORY, handler_mpd.MpdHandler) extension.register(CATEGORY, handler_mpris.MprisHandler) extension.register(CATEGORY, handler_rhythmbox.RhythmboxHandler) #Import OS X players import handler_itunes import handler_spotify extension.register(CATEGORY, handler_itunes.iTunesHandler) extension.register(CATEGORY, handler_spotify.SpotifyHandler) if XMMSCLIENT: extension.register(CATEGORY, handler_xmms2.Xmms2Handler) handler_id = self.session.config.d_extensions.get(CATEGORY, None) if handler_id is None: handler_id = extension._get_class_name(handler_rhythmbox.RhythmboxHandler) self.session.config.d_extensions.get(CATEGORY, handler_id) else: #import Windows players import handler_atunes import handler_foobar2000 import handler_gomplayer import handler_mediamonkey import handler_mediaplayerclassic import handler_onebyone import handler_realplayer import handler_smplayer import handler_winamp import handler_xmplay extension.register(CATEGORY, handler_atunes.aTunesHandler) extension.register(CATEGORY, handler_foobar2000.Foobar2000Handler) extension.register(CATEGORY, handler_gomplayer.GOMPlayerHandler) extension.register(CATEGORY, handler_mediamonkey.MediaMonkeyHandler) extension.register(CATEGORY, handler_mediaplayerclassic.MediaPlayerClassicHandler) extension.register(CATEGORY, handler_onebyone.OneByOneHandler) extension.register(CATEGORY, handler_realplayer.RealPlayerHandler) extension.register(CATEGORY, handler_smplayer.SMPlayerHandler) extension.register(CATEGORY, handler_winamp.WinampHandler) extension.register(CATEGORY, handler_xmplay.XMPlayHandler) handler_id = self.session.config.d_extensions.get(CATEGORY, None) if handler_id is None: handler_id = extension._get_class_name(handler_winamp.WinampHandler) self.session.config.d_extensions.get(CATEGORY, handler_id) extension.set_default_by_id(CATEGORY, handler_id)
def extensions_register(self): if os.name != "nt": #import unix players import handler_banshee import handler_exaile import handler_lastfm import handler_moc import handler_mpd import handler_mpris import handler_mpris2 import handler_rhythmbox try: import handler_xmms2 XMMSCLIENT = True except ImportError: XMMSCLIENT = False extension.register(CATEGORY, handler_mpris.Amarok2Handler) extension.register(CATEGORY, handler_mpris.AudaciousHandler) extension.register(CATEGORY, handler_banshee.BansheeHandler) extension.register(CATEGORY, handler_mpris.ClementineHandler) extension.register(CATEGORY, handler_exaile.ExaileHandler) extension.register(CATEGORY, handler_mpris2.GMusicBrowserHandler) extension.register(CATEGORY, handler_mpris.GuayadequeHandler) extension.register(CATEGORY, handler_lastfm.LastfmHandler) extension.register(CATEGORY, handler_moc.MocHandler) extension.register(CATEGORY, handler_mpd.MpdHandler) extension.register(CATEGORY, handler_mpris2.PraghaHandler) extension.register(CATEGORY, handler_mpris2.RhythmboxHandler) extension.register(CATEGORY, handler_rhythmbox.RhythmboxHandler) #Import OS X players import handler_itunes import handler_spotify extension.register(CATEGORY, handler_itunes.iTunesHandler) extension.register(CATEGORY, handler_spotify.SpotifyHandler) if XMMSCLIENT: extension.register(CATEGORY, handler_xmms2.Xmms2Handler) handler_id = self.session.config.d_extensions.get(CATEGORY, None) if handler_id is None: handler_id = extension._get_class_name( handler_rhythmbox.RhythmboxHandler) self.session.config.d_extensions.get(CATEGORY, handler_id) else: #import Windows players import handler_atunes import handler_foobar2000 import handler_gomplayer import handler_mediamonkey import handler_mediaplayerclassic import handler_onebyone import handler_realplayer import handler_smplayer import handler_winamp import handler_xmplay extension.register(CATEGORY, handler_atunes.aTunesHandler) extension.register(CATEGORY, handler_foobar2000.Foobar2000Handler) extension.register(CATEGORY, handler_gomplayer.GOMPlayerHandler) extension.register(CATEGORY, handler_mediamonkey.MediaMonkeyHandler) extension.register( CATEGORY, handler_mediaplayerclassic.MediaPlayerClassicHandler) extension.register(CATEGORY, handler_onebyone.OneByOneHandler) extension.register(CATEGORY, handler_realplayer.RealPlayerHandler) extension.register(CATEGORY, handler_smplayer.SMPlayerHandler) extension.register(CATEGORY, handler_winamp.WinampHandler) extension.register(CATEGORY, handler_xmplay.XMPlayHandler) handler_id = self.session.config.d_extensions.get(CATEGORY, None) if handler_id is None: handler_id = extension._get_class_name( handler_winamp.WinampHandler) self.session.config.d_extensions.get(CATEGORY, handler_id) extension.set_default_by_id(CATEGORY, handler_id)