Skip to content

Commit 44d0ea4

Browse files
committed
Merge branch 'dev' into experimental
2 parents 9a7d8e2 + 8dcbb4e commit 44d0ea4

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

app/Filament/Resources/MergedPlaylists/MergedPlaylistResource.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,16 @@ public static function getForm($creating = false): array
316316
->type('number')
317317
->default(1) // Default to 1 stream
318318
->required(),
319+
TextInput::make('available_streams')
320+
->label('Available Streams')
321+
->hint('Set to 0 for unlimited streams.')
322+
->helperText('Number of streams available for this provider. If set to a value other than 0, will prevent any streams from starting if the number of active streams exceeds this value.')
323+
->columnSpan(1)
324+
->rules(['min:1'])
325+
->type('number')
326+
->default(0) // Default to 0 streams (for unlimted)
327+
->required()
328+
->hidden(fn(Get $get): bool => ! $get('enable_proxy')),
319329
TextInput::make('server_timezone')
320330
->label('Provider Timezone')
321331
->helperText('The portal/provider timezone (DST-aware). Needed to correctly use timeshift functionality when playlist proxy is enabled.')
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
return new class extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*/
12+
public function up(): void
13+
{
14+
Schema::table('merged_playlists', function (Blueprint $table) {
15+
$table->unsignedInteger('available_streams')
16+
->default(0)
17+
->after('streams');
18+
});
19+
}
20+
21+
/**
22+
* Reverse the migrations.
23+
*/
24+
public function down(): void
25+
{
26+
Schema::table('merged_playlists', function (Blueprint $table) {
27+
$table->dropColumn('available_streams');
28+
});
29+
}
30+
};

0 commit comments

Comments
 (0)