diff --git a/formats/M3uFormat.php b/formats/M3uFormat.php index a8328cb7..f2218350 100644 --- a/formats/M3uFormat.php +++ b/formats/M3uFormat.php @@ -54,9 +54,14 @@ class M3uItem public $url = null; public $bytes = null; + public function isEmpty(): bool + { + return $this->url === null; + } + public function render(): string { - if ($this->url === null) { + if ($this->isEmpty()) { return ''; } $text = "\n";