Проверка количества каналов в плейлисте перед проверкой
This commit is contained in:
@@ -143,6 +143,11 @@ func CheckChannels(pls playlist.Playlist) playlist.Playlist {
|
|||||||
}
|
}
|
||||||
|
|
||||||
count := len(pls.Channels)
|
count := len(pls.Channels)
|
||||||
|
if count == 0 {
|
||||||
|
log.Println("There are no channels to check, skipping")
|
||||||
|
return pls
|
||||||
|
}
|
||||||
|
|
||||||
timeout, routines := calcParameters(count)
|
timeout, routines := calcParameters(count)
|
||||||
httpClient := http.Client{Timeout: timeout}
|
httpClient := http.Client{Timeout: timeout}
|
||||||
chSemaphores := make(chan struct{}, routines)
|
chSemaphores := make(chan struct{}, routines)
|
||||||
|
|||||||
Reference in New Issue
Block a user