コード例 #1
0
ファイル: json.py プロジェクト: AddBassStudios/mopidy
    def __init__(self, config):
        self._tracks = {}
        self._browse_cache = None
        self._media_dir = config['local']['media_dir']
        self._json_file = os.path.join(
            local.Extension.get_data_dir(config), b'library.json.gz')

        storage.check_dirs_and_files(config)
コード例 #2
0
ファイル: json.py プロジェクト: vrs01/mopidy
    def __init__(self, config):
        self._tracks = {}
        self._browse_cache = None
        self._media_dir = config['local']['media_dir']
        self._json_file = os.path.join(local.Extension.get_data_dir(config),
                                       b'library.json.gz')

        storage.check_dirs_and_files(config)
コード例 #3
0
    def __init__(self, config, audio):
        super(LocalBackend, self).__init__()

        self.config = config

        storage.check_dirs_and_files(config)

        libraries = dict((l.name, l) for l in self.libraries)
        library_name = config['local']['library']

        if library_name in libraries:
            library = libraries[library_name](config)
            logger.debug('Using %s as the local library', library_name)
        else:
            library = None
            logger.warning('Local library %s not found', library_name)

        self.playback = LocalPlaybackProvider(audio=audio, backend=self)
        self.library = LocalLibraryProvider(backend=self, library=library)
コード例 #4
0
ファイル: actor.py プロジェクト: AddBassStudios/mopidy
    def __init__(self, config, audio):
        super(LocalBackend, self).__init__()

        self.config = config

        storage.check_dirs_and_files(config)

        libraries = dict((l.name, l) for l in self.libraries)
        library_name = config['local']['library']

        if library_name in libraries:
            library = libraries[library_name](config)
            logger.debug('Using %s as the local library', library_name)
        else:
            library = None
            logger.warning('Local library %s not found', library_name)

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