Total Complexity | 2 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Coverage | 44.44% |
1 | 1 | from plugin.sync.core.enums import SyncMode |
|
9 | 1 | class Push(Mode): |
|
10 | 1 | mode = SyncMode.Push |
|
11 | |||
12 | 1 | children = [ |
|
13 | Movies, |
||
14 | Shows |
||
15 | ] |
||
16 | |||
17 | 1 | @elapsed.clock |
|
18 | def run(self): |
||
19 | # Fetch changes from trakt.tv |
||
20 | self.trakt.refresh() |
||
21 | |||
22 | # Build key table for lookups |
||
23 | self.trakt.build_table() |
||
24 | |||
25 | with self.plex.prime(): |
||
26 | # Run children |
||
27 | self.execute_children('run') |
||
28 | |||
29 | # Send artifacts to trakt |
||
30 | self.current.artifacts.send() |
||
31 |