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)
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)
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)