Initial commit
Build / run (push) Has been cancelled

This commit is contained in:
maher
2026-05-14 13:42:10 +02:00
commit 511fad8199
4595 changed files with 385164 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
<?php
namespace App\Services;
use Common\Channels\GenerateChannelsFromConfig;
class ChannelPresets
{
public function getAll(): array
{
return [
[
'name' => 'Movie database',
'preset' => 'database',
'description' =>
'Channel preset for a movie database site similar to IMDb',
],
[
'name' => 'Anime',
'preset' => 'anime',
'description' =>
'Channel preset for an anime based site similar to Crunchyroll',
],
[
'name' => 'Streaming',
'preset' => 'streaming',
'description' =>
'Channel preset for a streaming site similar to Netflix',
],
];
}
public function apply(string $preset): void
{
$presetConfig = match ($preset) {
'anime' => resource_path('defaults/channels/anime-channels.json'),
'streaming' => resource_path(
'defaults/channels/streaming-channels.json',
),
default => resource_path(
'defaults/channels/database-channels.json',
),
};
(new GenerateChannelsFromConfig())->execute([
resource_path('defaults/channels/shared-channels.json'),
$presetConfig,
]);
}
}