9 changed files with 41 additions and 29 deletions
@ -1,13 +1,6 @@ |
|||
from couchpotato.core.event import addEvent |
|||
from couchpotato.core.plugins.base import Plugin |
|||
from .main import Library |
|||
|
|||
def start(): |
|||
return Library() |
|||
|
|||
class LibraryBase(Plugin): |
|||
|
|||
_type = None |
|||
|
|||
def initType(self): |
|||
addEvent('library.types', self.getType) |
|||
|
|||
def getType(self): |
|||
return self._type |
|||
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 |
|||
) |
Loading…
Reference in new issue