From db8a3d674da5550dd7562665cbc477c7caec28f7 Mon Sep 17 00:00:00 2001 From: boyska Date: Mon, 4 Mar 2024 15:30:22 +0100 Subject: [PATCH] [M3uFormat] basic M3U support --- formats/M3uFormat.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 formats/M3uFormat.php diff --git a/formats/M3uFormat.php b/formats/M3uFormat.php new file mode 100644 index 00000000..be2895cf --- /dev/null +++ b/formats/M3uFormat.php @@ -0,0 +1,24 @@ +getItems() as $item) { + $itemArray = $item->toArray(); + + if (isset($itemArray['itunes']) && isset($itemArray['enclosure'])) { + $contents .= $itemArray['enclosure']['url'] . "\n"; + } + } + return mb_convert_encoding($contents, $this->getCharset(), 'UTF-8'); + } +}