Enhance flatten_groups function to preserve Trakt group status during merging

- Updated the `flatten_groups` function to ensure that if either of the merged groups is a Trakt group, the resulting group retains the Trakt status.
This commit is contained in:
Goldy
2025-08-19 17:24:01 +02:00
parent 27d84edf9c
commit 239a07a3e2
@@ -455,6 +455,8 @@ fn flatten_groups(playlistgroups: Vec<PlaylistGroup>) -> Vec<PlaylistGroup> {
std::collections::hash_map::Entry::Occupied(o) => {
if let Some(pl_group) = sort_order.get_mut(*o.get()) {
pl_group.channels.extend(group.channels);
// Preserve Trakt group status: if either group is a Trakt group, the merged group should be too
pl_group.is_trakt_group = pl_group.is_trakt_group || group.is_trakt_group;
}
}
}