for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
from plugin.sync.core.enums import SyncData, SyncMedia, SyncMode
from plugin.sync.handlers.collection.base import CollectionHandler
from plugin.sync.handlers.core.base import DataHandler, PullHandler
import logging
log = logging.getLogger(__name__)
class Base(PullHandler, CollectionHandler):
build_action
MediaHandler
Methods which raise NotImplementedError should be overridden in concrete child classes.
NotImplementedError
full
on_added
on_changed
on_removed
push
#
# Modes
def fast_pull(self, action, p_item, t_item, **kwargs):
# Nothing to do
return True
def pull(self, p_item, t_item, **kwargs):
class Movies(Base):
media = SyncMedia.Movies
class Episodes(Base):
media = SyncMedia.Episodes
class Pull(DataHandler):
data = SyncData.Collection
mode = [SyncMode.FastPull, SyncMode.Pull]
children = [
Movies,
Episodes
]
Methods which raise
NotImplementedError
should be overridden in concrete child classes.