From 87de25052a86a059c8dfde0a8a2920364280923f Mon Sep 17 00:00:00 2001 From: jo Date: Sat, 11 Feb 2023 00:44:44 +0100 Subject: [PATCH] cuepoints analyzer disabled by default --- analyzer/libretime_analyzer/pipeline/pipeline.py | 2 +- .../migrations/0044_add_track_types_analyzer_options.py | 4 +++- api/libretime_api/legacy/migrations/sql/schema.sql | 2 +- legacy/application/forms/AddTracktype.php | 1 - .../application/models/airtime/map/CcTracktypesTableMap.php | 2 +- legacy/application/models/airtime/om/BaseCcTracktypes.php | 6 +++--- legacy/build/schema.xml | 2 +- 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/analyzer/libretime_analyzer/pipeline/pipeline.py b/analyzer/libretime_analyzer/pipeline/pipeline.py index 89e39353b..10a577138 100644 --- a/analyzer/libretime_analyzer/pipeline/pipeline.py +++ b/analyzer/libretime_analyzer/pipeline/pipeline.py @@ -25,7 +25,7 @@ class PipelineStatus(int, Enum): class PipelineOptions(BaseModel): - analyze_cue_points: bool = True + analyze_cue_points: bool = False class Pipeline: diff --git a/api/libretime_api/legacy/migrations/0044_add_track_types_analyzer_options.py b/api/libretime_api/legacy/migrations/0044_add_track_types_analyzer_options.py index 41bf48dc1..dfd6003b5 100644 --- a/api/libretime_api/legacy/migrations/0044_add_track_types_analyzer_options.py +++ b/api/libretime_api/legacy/migrations/0044_add_track_types_analyzer_options.py @@ -5,7 +5,9 @@ from django.db import migrations from ._migrations import legacy_migration_factory UP = """ -alter table "cc_track_types" add column "analyze_cue_points" boolean default 't' not null; +alter table "cc_track_types" add column "analyze_cue_points" boolean default 'f' not null; + +update "cc_track_types" set "analyze_cue_points" = 't'; """ DOWN = """ diff --git a/api/libretime_api/legacy/migrations/sql/schema.sql b/api/libretime_api/legacy/migrations/sql/schema.sql index 529db67f6..a07a6ceed 100644 --- a/api/libretime_api/legacy/migrations/sql/schema.sql +++ b/api/libretime_api/legacy/migrations/sql/schema.sql @@ -95,7 +95,7 @@ CREATE TABLE "cc_track_types" "visibility" BOOLEAN DEFAULT 't' NOT NULL, "type_name" VARCHAR(64) DEFAULT '' NOT NULL, "description" VARCHAR(255) DEFAULT '' NOT NULL, - "analyze_cue_points" BOOLEAN DEFAULT 't' NOT NULL, + "analyze_cue_points" BOOLEAN DEFAULT 'f' NOT NULL, PRIMARY KEY ("id"), CONSTRAINT "cc_track_types_id_idx" UNIQUE ("id"), CONSTRAINT "cc_track_types_code_idx" UNIQUE ("code") diff --git a/legacy/application/forms/AddTracktype.php b/legacy/application/forms/AddTracktype.php index b7b180c8f..798794f20 100644 --- a/legacy/application/forms/AddTracktype.php +++ b/legacy/application/forms/AddTracktype.php @@ -55,7 +55,6 @@ class Application_Form_AddTracktype extends Zend_Form $analyze_cue_points = new Zend_Form_Element_Checkbox('analyze_cue_points'); $analyze_cue_points->setLabel(_('Analyze cue points:')); - $analyze_cue_points->setAttrib('checked', true); $analyze_cue_points->setRequired(true); $this->addElement($analyze_cue_points); diff --git a/legacy/application/models/airtime/map/CcTracktypesTableMap.php b/legacy/application/models/airtime/map/CcTracktypesTableMap.php index a612bc9f9..742588bb4 100644 --- a/legacy/application/models/airtime/map/CcTracktypesTableMap.php +++ b/legacy/application/models/airtime/map/CcTracktypesTableMap.php @@ -44,7 +44,7 @@ class CcTracktypesTableMap extends TableMap $this->addColumn('visibility', 'DbVisibility', 'BOOLEAN', true, null, true); $this->addColumn('type_name', 'DbTypeName', 'VARCHAR', true, 64, ''); $this->addColumn('description', 'DbDescription', 'VARCHAR', true, 255, ''); - $this->addColumn('analyze_cue_points', 'DbAnalyzeCuePoints', 'BOOLEAN', true, null, true); + $this->addColumn('analyze_cue_points', 'DbAnalyzeCuePoints', 'BOOLEAN', true, null, false); // validators } // initialize() diff --git a/legacy/application/models/airtime/om/BaseCcTracktypes.php b/legacy/application/models/airtime/om/BaseCcTracktypes.php index 7c8be5ec6..f1d470acd 100644 --- a/legacy/application/models/airtime/om/BaseCcTracktypes.php +++ b/legacy/application/models/airtime/om/BaseCcTracktypes.php @@ -65,7 +65,7 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent /** * The value for the analyze_cue_points field. - * Note: this column has a database default value of: true + * Note: this column has a database default value of: false * @var boolean */ protected $analyze_cue_points; @@ -114,7 +114,7 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent $this->visibility = true; $this->type_name = ''; $this->description = ''; - $this->analyze_cue_points = true; + $this->analyze_cue_points = false; } /** @@ -361,7 +361,7 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent return false; } - if ($this->analyze_cue_points !== true) { + if ($this->analyze_cue_points !== false) { return false; } diff --git a/legacy/build/schema.xml b/legacy/build/schema.xml index 4e4ef4968..8e5beecf0 100644 --- a/legacy/build/schema.xml +++ b/legacy/build/schema.xml @@ -92,7 +92,7 @@ - +