Multiple corrections as advised in the codereview

This commit is contained in:
Philipp Beckmann 2016-06-20 18:44:37 +02:00
parent 7b154cedd7
commit f9ed53a096
2 changed files with 6 additions and 6 deletions

View file

@ -1167,7 +1167,7 @@ class BPDPlugin(BeetsPlugin):
server.run()
except NoGstreamerError:
global_log.error(u'Gstreamer Python bindings not found.')
global_log.error(u'Install "python-gst-1.0" '
global_log.error(u'Install "gstreamer1.0" and "python-gi"'
u'or similar package to use BPD.')
def commands(self):

View file

@ -25,13 +25,13 @@ import thread
import os
import copy
import urllib
from beets import ui
import gi
from gi.repository import GObject, Gst
from gi.repository import GLib, Gst
gi.require_version('Gst', '1.0')
GObject.threads_init()
Gst.init(None)
@ -70,12 +70,12 @@ class GstPlayer(object):
self.player = Gst.ElementFactory.make("playbin", "player")
if self.player is None:
raise RuntimeError("Could not create playbin")
raise ui.UserError("Could not create playbin")
fakesink = Gst.ElementFactory.make("fakesink", "fakesink")
if fakesink is None:
raise RuntimeError("Could not create fakesink")
raise ui.UserError("Could not create fakesink")
self.player.set_property("video-sink", fakesink)
bus = self.player.get_bus()
@ -161,7 +161,7 @@ class GstPlayer(object):
# If we don't use the MainLoop, messages are never sent.
def start():
loop = GObject.MainLoop()
loop = GLib.MainLoop()
loop.run()
thread.start_new_thread(start, ())