Skip to content

Commit

Permalink
feat(patchbay): update node props on listing
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Oct 23, 2023
1 parent 8d603b4 commit c0ceb57
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/patchbay.impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,20 @@ namespace vencord

core->update();

auto rtn = nodes //
| ranges::views::filter(desireable) //
| ranges::views::filter(can_output) //
auto filtered = nodes //
| ranges::views::filter(desireable) //
| ranges::views::filter(can_output);

// Some nodes update their props (metadata) over time, and there is no pipewire event to catch this. Thus we
// re-bind them.

for (auto &[id, node] : filtered)
{
auto updated = registry->bind<pw::node>(id).get();
node.info.props = updated->info().props;
}

auto rtn = filtered //
| ranges::views::transform(to_node) //
| ranges::to<std::set>;

Expand Down

0 comments on commit c0ceb57

Please sign in to comment.