M3u playlist downloader and parser and extractor by playlist group
- Run
composer install
in project dir - Create own plugin for M3U file in
/src/Services/M3u/Plugins
use aApp\Interfaces\M3u\PluginInterface
(check example file) - Create own config file if need in
config
dir (check example file)
use App\Services\M3u\DownloaderService;
use App\Services\M3u\ParseService;
require __DIR__ . '/../vendor/autoload.php';
// load plugin
$downloaderService= new DownloaderService(new \App\Services\M3u\Plugins\ExamplePlugin());
// download playlist via plugin (path: storage/playlist/raw/in)
$pathToM3uFile = $downloaderService->download();
// if parse to extract in new playlist (path: storage/playlist/raw/out)
$parserService = new ParseService();
// extract optional groups
$parserService->parse($pathToM3uFile, ['group1', 'group2']);
- guzzlehttp/guzzle
- gemorroj/m3u-parser
- monolog/monolog
- symfony/yaml