Created
March 22, 2018 23:08
-
-
Save vishichoudhary/c922a5d463604e5c74c3d7d4b7416040 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import abc | |
from plugin import PluginFunctions, PluginPriority | |
class PluginBasic(metaclass=abc.ABCMeta): | |
@abc.abstractmethod | |
def activate(self): | |
""" | |
Will activate the plugin, this function will be trigrred by enabling the plugin. | |
Every plugins need to inherit this. | |
""" | |
@abc.abstractmethod | |
def deactivate(self): | |
""" | |
Will deactivate the plugin, and will be trigerred by disabling the plugin. | |
Every plugins need to inherit this. | |
""" | |
""" | |
Hooks available in the picard will be listed here. | |
""" | |
def register_track_metadata(obj, function, priority=PluginPriority.NORMAL): | |
track_metadata_processor.register(function, priority) | |
def unregister_track_metadata(obj, function, priority=PluginPriority.NORMAL): | |
track_metadata_processor.unregister(function, priority) | |
def register_album_metadata(obj, function, priority=PluginPriority.NORMAL): | |
album_metadata_processor.register(function, priority) | |
def unregister_album_metadata(obj, function, priority=PluginPriority.NORMAL): | |
album_metadata_processor.unregister(function, priority) | |
album_metadata_processor = PluginFunctions() | |
track_metadata_processor = PluginFunctions() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment