예제 #1
0
파일: pithos.py 프로젝트: Greenginer/pithos
 def on_gst_element(self, bus, message):
     if GstPbutils.is_missing_plugin_message(message):
         if GstPbutils.install_plugins_supported():
             details = GstPbutils.missing_plugin_message_get_installer_detail(message)
             GstPbutils.install_plugins_async([details,], None, self.on_gst_plugin_installed, None)
         else:
             self.error_dialog(_("Missing codec"), None,
                     submsg=_("GStreamer is missing a plugin and it could not be automatically installed. Either manually install it or try another quality setting."))
예제 #2
0
 def on_gst_element(self, bus, message):
     if GstPbutils.is_missing_plugin_message(message):
         if GstPbutils.install_plugins_supported():
             details = GstPbutils.missing_plugin_message_get_installer_detail(message)
             GstPbutils.install_plugins_async([details,], None, self.on_gst_plugin_installed, None)
         else:
             self.error_dialog(_("Missing codec"), None,
                     submsg=_("GStreamer is missing a plugin and it could not be automatically installed. Either manually install it or try another quality setting."))
예제 #3
0
 def _on_element(self, bus, message):
     if GstPbutils.is_missing_plugin_message(message):
         if GstPbutils.install_plugins_supported():
             details = (
                 GstPbutils.missing_plugin_message_get_installer_detail(
                     message))
             GstPbutils.install_plugins_async(
                 [details], None, self._plugin_installation_complete, None)
         else:
             self.emit("error", "Missing codec",
                       "GStreamer is missing a plugin and it could not be "
                       "automatically installed. Either manually install "
                       "it or try another quality setting.",
                       False)
예제 #4
0
def __handle_plugin_missing_message(message, engine):

    desc = GstPbutils.missing_plugin_message_get_description(message)
    installer_details = GstPbutils.missing_plugin_message_get_installer_detail(message)
    LOGGER.warning("A plugin for %s is missing, stopping playback", desc)

    user_message = _(
        "A GStreamer 1.x plugin for %s is missing. "
        "Without this software installed, Exaile will not be able to play the current file. "
        "Please install the required software on your computer. See %s for details."
    ) % (desc, MISSING_PLUGIN_URL)
    # TODO make URL clickable by utilizing xlgui.widgets.dialogs.MessageBar

    engine.stop()
    __notify_user_on_error(user_message, engine)
    if GstPbutils.install_plugins_supported():
        if __run_installer_helper(installer_details):
            return
    LOGGER.warning("Installation of GStreamer plugins not supported on this platform.")
예제 #5
0
def __handle_plugin_missing_message(message, engine):

    desc = GstPbutils.missing_plugin_message_get_description(message)
    installer_details = GstPbutils.missing_plugin_message_get_installer_detail(message)
    LOGGER.warn("A plugin for %s is missing, stopping playback", desc)

    user_message = _(
        "A GStreamer 1.x plugin for %s is missing. "
        "Without this software installed, Exaile will not be able to play the current file. "
        "Please install the required software on your computer. See %s for details."
    ) % (desc, MISSING_PLUGIN_URL)
    # TODO make URL clickable by utilizing xlgui.widgets.dialogs.MessageBar

    engine.stop()
    __notify_user_on_error(user_message, engine)
    if GstPbutils.install_plugins_supported():
        if __run_installer_helper(installer_details):
            return
    LOGGER.warn("Installation of GStreamer plugins not supported on this platform.")
예제 #6
0
 def install(self):
     """
         Install missing plugins
     """
     if not GstPbutils.install_plugins_supported():
         return
     try:
         context = GstPbutils.InstallPluginsContext.new()
         try:
             context.set_desktop_id('org.gnome.Lollypop.desktop')
         except:
             pass  # Not supported by Ubuntu VIVID
         details = []
         for message in self._messages:
             detail = \
                 GstPbutils.missing_plugin_message_get_installer_detail(
                     message)
             details.append(detail)
         GstPbutils.install_plugins_async(details, context, self.__null)
     except Exception as e:
         print("Codecs::__init__(): %s" % e)
예제 #7
0
 def install(self):
     """
         Install missing plugins
     """
     if not GstPbutils.install_plugins_supported():
         return
     try:
         context = GstPbutils.InstallPluginsContext.new()
         try:
             context.set_desktop_id('org.gnome.Lollypop.desktop')
         except:
             pass  # Not supported by Ubuntu VIVID
         details = []
         for message in self._messages:
             detail = \
                 GstPbutils.missing_plugin_message_get_installer_detail(
                     message)
             details.append(detail)
         GstPbutils.install_plugins_async(
             details,
             context,
             self.__null)
     except Exception as e:
         print("Codecs::__init__(): %s" % e)