return self.__combo.set_active(_CUSTOM_INDEX) class Crossfeed(GStreamerPlugin): PLUGIN_ID = _PLUGIN_ID PLUGIN_NAME = _("Crossfeed") PLUGIN_DESC = _("Mixes the left and right channel in a way that simulates" " a speaker setup while using headphones, or to adjust " "for early Stereo recordings.") PLUGIN_ICON = "audio-volume-high" @classmethod def setup_element(cls): return Gst.ElementFactory.make('bs2b', cls.PLUGIN_ID) @classmethod def update_element(cls, element): element.set_property("feed", get_cfg("feed")) element.set_property("fcut", get_cfg("fcut")) @classmethod def PluginPreferences(cls, window): prefs = Preferences() prefs.connect("changed", lambda *x: cls.queue_update()) return prefs if not Crossfeed.setup_element(): raise plugins.MissingGstreamerElementPluginException("bs2b")
# it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation import os import sys if os.name == "nt" or sys.platform == "darwin": from quodlibet.plugins import PluginNotSupportedError raise PluginNotSupportedError try: from pyinotify import WatchManager, EventsCodes, ProcessEvent from pyinotify import Notifier, ThreadedNotifier except ImportError as e: from quodlibet import plugins raise (plugins.MissingGstreamerElementPluginException("pyinotify") if hasattr(plugins, "MissingPluginDependencyException") else e) from quodlibet import print_d from quodlibet.plugins.events import EventPlugin from quodlibet.util.library import get_scan_dirs from quodlibet import app from gi.repository import GLib import os class LibraryEvent(ProcessEvent): """pynotify event handler for library changes""" # Slightly dodgy state mechanism for updates _being_created = set()
# Copyright 2011,2013 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation from gi.repository import Gtk, Gst if not Gst.ElementFactory.find("chromaprint"): from quodlibet import plugins raise plugins.MissingGstreamerElementPluginException("chromaprint") from .submit import FingerprintDialog from .util import get_api_key from quodlibet import config from quodlibet import util from quodlibet.qltk import Button, Frame from quodlibet.qltk.entry import UndoEntry from quodlibet.qltk.msg import ErrorMessage from quodlibet.plugins.songsmenu import SongsMenuPlugin class AcoustidSearch(SongsMenuPlugin): PLUGIN_ID = "AcoustidSearch" PLUGIN_NAME = _("Acoustic Fingerprint Lookup") PLUGIN_DESC = _("Lookup song metadata through acoustic fingerprinting") PLUGIN_ICON = Gtk.STOCK_CONNECT PLUGIN_VERSION = "0.1" def plugin_songs(self, songs):
return self.__combo.set_active(_CUSTOM_INDEX) class Crossfeed(GStreamerPlugin): PLUGIN_ID = _PLUGIN_ID PLUGIN_NAME = _("Crossfeed") PLUGIN_DESC = _("Mixes the left and right channel in a way that simulates" " a speaker setup while using headphones, or to adjust " "for early Stereo recordings.") PLUGIN_ICON = "audio-volume-high" @classmethod def setup_element(cls): return Gst.ElementFactory.make('crossfeed', cls.PLUGIN_ID) @classmethod def update_element(cls, element): element.set_property("feed", get_cfg("feed")) element.set_property("fcut", get_cfg("fcut")) @classmethod def PluginPreferences(cls, window): prefs = Preferences() gobject_weak(prefs.connect, "changed", lambda *x: cls.queue_update()) return prefs if not Crossfeed.setup_element(): raise plugins.MissingGstreamerElementPluginException("crossfeed")