}
}
}
+ restreamConsent
restreamUrls {
url
language
if (!$episode) {
$episode = new Episode();
$episode->ext_id = $ext_id;
+ $episode->estimate = 120 * 60;
+ $episode->confirmed = true;
}
$episode->event()->associate($event);
$episode->title = $hthEntry['phase'].' '.$hthEntry['round'];
if (!$episode->start || $start->ne($episode->start)) {
$episode->start = $start;
}
- $episode->estimate = 120 * 60;
- $episode->confirmed = true;
if ($hthEntry['room']) {
$episode->raceroom = $hthEntry['room'];
}
+ if (!$hthEntry['restreamConsent']) {
+ $episode->do_not_restream = false;
+ }
$episode->save();
$this->purgePlayers($episode, $hthEntry);
protected $casts = [
'confirmed' => 'boolean',
'create_raceroom' => 'boolean',
+ 'do_not_restream' => 'boolean',
'start' => 'datetime',
];
--- /dev/null
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+ /**
+ * Run the migrations.
+ */
+ public function up(): void
+ {
+ Schema::table('episodes', function (Blueprint $table) {
+ $table->boolean('do_not_restream')->default(false);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::table('episodes', function (Blueprint $table) {
+ $table->dropColumn('do_not_restream');
+ });
+ }
+};