MCPcopy Index your code
hub / github.com/Dispatcharr/Dispatcharr / getStreamsRegexPreview

Method getStreamsRegexPreview

frontend/src/api.js:319–345  ·  view source on GitHub ↗
(
    channelGroupName,
    { find, replace, match, exclude, limit = 10, signal, m3uAccountId } = {}
  )

Source from the content-addressed store, hash-verified

317 // than a small client-side sample. The three patterns are independent;
318 // any combination can be supplied per call.
319 static async getStreamsRegexPreview(
320 channelGroupName,
321 { find, replace, match, exclude, limit = 10, signal, m3uAccountId } = {}
322 ) {
323 try {
324 const params = new URLSearchParams({
325 channel_group: channelGroupName,
326 });
327 if (m3uAccountId !== undefined && m3uAccountId !== null) {
328 params.set('m3u_account_id', String(m3uAccountId));
329 }
330 if (find) params.set('find', find);
331 if (replace !== undefined && replace !== null) {
332 params.set('replace', replace);
333 }
334 if (match) params.set('match', match);
335 if (exclude) params.set('exclude', exclude);
336 params.set('limit', String(limit));
337 const url = `${host}/api/channels/streams/regex-preview/?${params.toString()}`;
338 return await request(url, { signal });
339 } catch (e) {
340 if (e?.name === 'AbortError') {
341 throw e;
342 }
343 return null;
344 }
345 }
346
347 static async queryChannels(params) {
348 try {

Callers 1

getStreamsRegexPreviewFunction · 0.80

Calls 2

requestFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected