From ea11381d07167ab945141e9d05d8f76a70bf321f Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Tue, 6 May 2025 22:54:18 +0800 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BA=D0=BE=D0=BB=D0=B8=D1=87=D0=B5=D1=81=D1=82=D0=B2?= =?UTF-8?q?=D0=B0=20=D0=BA=D0=B0=D0=BD=D0=B0=D0=BB=D0=BE=D0=B2=20=D0=B2=20?= =?UTF-8?q?=D0=BF=D0=BB=D0=B5=D0=B9=D0=BB=D0=B8=D1=81=D1=82=D0=B5=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=B4=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=BA=D0=BE=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/checker/checker.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/checker/checker.go b/app/checker/checker.go index fd480ca..811af3e 100644 --- a/app/checker/checker.go +++ b/app/checker/checker.go @@ -143,6 +143,11 @@ func CheckChannels(pls playlist.Playlist) playlist.Playlist { } count := len(pls.Channels) + if count == 0 { + log.Println("There are no channels to check, skipping") + return pls + } + timeout, routines := calcParameters(count) httpClient := http.Client{Timeout: timeout} chSemaphores := make(chan struct{}, routines)