Base classes for matcher and library

This commit is contained in:
Ruud committed 2014-03-15 11:51:45 +01:00
1 parent 988d0d6e35
commit 8b2eb50f29
20 files changed
+2228

No files matched your search

@@ -0,0 +1,6 @@
from .main import Library
def autoload():
return Library()
config = []
@@ -0,0 +1,13 @@
from couchpotato.core.event import addEvent
from couchpotato.core.plugins.base import Plugin
class LibraryBase(Plugin):
_type = None
def initType(self):
addEvent('library.types', self.getType)
def getType(self):
return self._type
@@ -0,0 +1,18 @@
from couchpotato.core.event import addEvent, fireEvent
from couchpotato.core.media._base.library.base import LibraryBase
class Library(LibraryBase):
def __init__(self):
addEvent('library.title', self.title)
def title(self, library):
return fireEvent(
'library.query',
library,
condense = False,
include_year = False,
include_identifier = False,
single = True
)