From 93eaf62b9dccd9be9bb884a8b2e1dacc955da4be Mon Sep 17 00:00:00 2001 From: blissful Date: Mon, 6 May 2024 11:00:45 -0400 Subject: [PATCH] new read is working --- rose_vfs/virtualfs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rose_vfs/virtualfs.py b/rose_vfs/virtualfs.py index 602373d..01be760 100644 --- a/rose_vfs/virtualfs.py +++ b/rose_vfs/virtualfs.py @@ -1160,13 +1160,17 @@ def readdir(self, p: VirtualPath) -> Iterator[tuple[str, dict[str, Any]]]: tags=["label"], pattern=MatcherPattern(f"^{p.label}$"), ) - + if p.view == "New": + matcher = MetadataMatcher( + tags=["new"], + pattern=MatcherPattern("^true$"), + ) releases = ( find_releases_matching_rule(self.config, matcher) if matcher else list_releases(self.config) ) - # TODO: new=True if p.view == "New" else None, + yield ALL_TRACKS, self.stat("dir") for rls, vname in self.vnames.list_release_paths(p, releases): yield vname, self.stat("dir", rls.source_path)