File: actor.py

package info (click to toggle)
mopidy-local 3.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 448 kB
  • sloc: python: 3,153; sql: 544; sh: 15; makefile: 3
file content (25 lines) | stat: -rw-r--r-- 618 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import logging

import pykka

from mopidy import backend

from mopidy_local import storage
from mopidy_local.library import LocalLibraryProvider
from mopidy_local.playback import LocalPlaybackProvider

logger = logging.getLogger(__name__)


class LocalBackend(pykka.ThreadingActor, backend.Backend):
    uri_schemes = ["local"]

    def __init__(self, config, audio):
        super().__init__()

        self.config = config

        storage.check_dirs_and_files(config)

        self.playback = LocalPlaybackProvider(audio=audio, backend=self)
        self.library = LocalLibraryProvider(backend=self, config=config)