Add is_trakt_group field to PlaylistGroup and update sorting logic

- Introduced `is_trakt_group` field in `PlaylistGroup` struct to differentiate between Trakt and non-Trakt groups.
- Updated relevant parsing functions in `m3u.rs`, `xtream.rs`, and `trakt.rs` to set this field appropriately.
- Enhanced sorting logic in `sort.rs` to prioritize Trakt groups during playlist sorting.
- Ensured backward compatibility by defaulting `is_trakt_group` to false where applicable.
This commit is contained in:
Goldy
2025-08-19 17:09:20 +02:00
parent 1ca352bc83
commit 27d84edf9c
7 changed files with 32 additions and 1 deletions
@@ -55,6 +55,7 @@ fn filter_playlist(playlist: &mut [PlaylistGroup], target: &ConfigTarget) -> Opt
title: pg.title.clone(),
channels,
xtream_cluster: pg.xtream_cluster,
is_trakt_group: pg.is_trakt_group,
});
}
}
@@ -175,6 +176,7 @@ fn map_playlist(playlist: &mut [PlaylistGroup], target: &ConfigTarget) -> Option
title: title.to_string(),
channels: vec![channel.clone()],
xtream_cluster: *cluster,
is_trakt_group: false,
});
}
}