Bug Fix: Sort max stream column by total of streams from all profiles.
Some checks are pending
CI Pipeline / prepare (push) Waiting to run
CI Pipeline / docker (amd64, ubuntu-24.04) (push) Blocked by required conditions
CI Pipeline / docker (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
CI Pipeline / create-manifest (push) Blocked by required conditions
Build and Push Multi-Arch Docker Image / build-and-push (push) Waiting to run
Frontend Tests / test (push) Waiting to run

This commit is contained in:
SergeantPanda 2026-03-24 13:41:46 -05:00
parent 58f40ff276
commit 6d694c8475

View file

@ -585,15 +585,23 @@ const M3UTable = () => {
},
{
header: 'Max Streams',
accessorKey: 'max_streams',
id: 'max_streams',
accessorFn: (row) => {
const activeProfiles = (row.profiles || []).filter(
(p) => p.is_active
);
if (activeProfiles.length === 0) return row.max_streams;
if (activeProfiles.some((p) => p.max_streams === 0)) return Infinity;
return activeProfiles.reduce((sum, p) => sum + p.max_streams, 0);
},
sortable: true,
size: 125,
cell: ({ cell, row }) => {
cell: ({ row }) => {
const profiles = row.original.profiles || [];
const activeProfiles = profiles.filter((p) => p.is_active);
if (activeProfiles.length <= 1) {
const val = cell.getValue();
const val = row.original.max_streams;
return <Text size="xs">{val === 0 ? '∞' : val}</Text>;
}