concurrentAdd method

void concurrentAdd(
  1. HlsSegment hlsSegment
)

Adds a new HlsSegment to the segment list if not already present.

Implementation

void concurrentAdd(HlsSegment hlsSegment) {
  bool match = _list.where((e) => e.url == hlsSegment.url).isNotEmpty;
  if (!match) _list.add(hlsSegment);
}