Scrobbler   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 14
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A start() 0 6 1
1
from plugin.core.constants import ACTIVITY_MODE
2
from plugin.core.helpers.thread import module
3
from plugin.core.method_manager import MethodManager
4
from plugin.preferences import Preferences
5
from plugin.scrobbler.methods import Logging, WebSocket
6
7
8
@module(start=True, blocking=True)
9
class Scrobbler(object):
10
    methods = MethodManager([
11
        WebSocket,
12
        Logging
13
    ])
14
    started = []
15
16
    @classmethod
17
    def start(cls, blocking=False):
0 ignored issues
show
Unused Code introduced by
The argument blocking seems to be unused.
Loading history...
18
        enabled = ACTIVITY_MODE.get(Preferences.get('activity.mode'))
19
20
        # Start methods
21
        cls.started = cls.methods.start(enabled)
22