def cmd_update(self, conn, path=u'/'): """Updates the catalog to reflect the current database state. """ # Path is ignored. Also, the real MPD does this asynchronously; # this is done inline. self.tree = vfs.libtree(self.lib) self.updated_time = time.time()
def setUp(self): self.lib = library.Library( ":memory:", path_formats={"default": "albums/$album/$title", "singleton": "tracks/$artist/$title"} ) self.lib.add(_common.item()) self.lib.add_album([_common.item()]) self.lib.save() self.tree = vfs.libtree(self.lib)
def setUp(self): self.lib = library.Library(':memory:', path_formats=[ ('default', 'albums/$album/$title'), ('singleton:true', 'tracks/$artist/$title'), ]) self.lib.add(_common.item()) self.lib.add_album([_common.item()]) self.tree = vfs.libtree(self.lib)
def cmd_update(self, conn, path=u"/"): """Updates the catalog to reflect the current database state. """ # Path is ignored. Also, the real MPD does this asynchronously; # this is done inline. print(u"Building directory tree...") self.tree = vfs.libtree(self.lib) print(u"... done.") self.updated_time = time.time()
def cmd_update(self, conn, path=u'/'): """Updates the catalog to reflect the current database state. """ # Path is ignored. Also, the real MPD does this asynchronously; # this is done inline. self._log.debug(u'Building directory tree...') self.tree = vfs.libtree(self.lib) self._log.debug(u'Finished building directory tree.') self.updated_time = time.time()
def setUp(self): self.lib = library.Library(':memory:', path_formats={ 'default': 'albums/$album/$title', 'singleton': 'tracks/$artist/$title', }) self.lib.add(_common.item()) self.lib.add_album([_common.item()]) self.lib.save() self.tree = vfs.libtree(self.lib)
def _build_tree(): vfs.libtree(lib)