Skip to content

Commit

Permalink
Add SyncCollectionPlugin plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Apr 8, 2024
1 parent 476183c commit 923e293
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions plextraktsync/sync/SyncCollectionPlugin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from __future__ import annotations

from typing import TYPE_CHECKING

from plextraktsync.factory import logging
from plextraktsync.sync.plugin import hookimpl

if TYPE_CHECKING:
from pluggy import PluginManager

from plextraktsync.sync.Sync import Sync


class SyncCollectionPlugin:
logger = logging.getLogger(__name__)

@classmethod
def register(cls, pm: PluginManager, sync: Sync):
if not sync.config.plex_to_trakt["collection"]:
print("Will not register SyncCollectionPlugin")
return

print("Register SyncCollectionPlugin")
pm.register(cls())

@hookimpl
def init(self, sync, trakt_lists, is_partial):
...

0 comments on commit 923e293

Please sign in to comment.