Skip to content

Commit 192974b

Browse files
committed
Fix Language CFs
1 parent 403510b commit 192974b

1 file changed

Lines changed: 65 additions & 0 deletions

File tree

ops/17.fix-language-cfs.sql

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
-- @operation: export
2+
-- @entity: batch
3+
-- @name: Fix Language CFs
4+
-- @exportedAt: 2026-02-04T19:18:18.544Z
5+
-- @opIds: 290, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305
6+
7+
-- --- BEGIN op 290 ( update custom_format "Not Original" )
8+
update "custom_formats" set "description" = 'Matches releases that don''''t include the Original language track. Dual audio is allowed' where "name" = 'Not Original' and "description" is null;
9+
-- --- END op 290
10+
11+
-- --- BEGIN op 294 ( create custom_format "Only Original" )
12+
insert into "custom_formats" ("name", "description") values ('Only Original', '');
13+
-- --- END op 294
14+
15+
-- --- BEGIN op 295 ( update custom_format "Only Original" )
16+
update "custom_formats" set "description" = 'Matches releases that don''t include an Original language track. Dual audio is NOT allowed.' where "name" = 'Only Original' and "description" = '';
17+
-- --- END op 295
18+
19+
-- --- BEGIN op 296 ( update custom_format "Only Original" )
20+
INSERT INTO custom_format_conditions (custom_format_name, name, type, arr_type, negate, required)
21+
VALUES ('Only Original', 'Original', 'language', 'all', 0, 1);
22+
23+
INSERT INTO condition_languages (custom_format_name, condition_name, language_name, except_language) VALUES ('Only Original', 'Original', 'Original', 0);
24+
-- --- END op 296
25+
26+
-- --- BEGIN op 297 ( update custom_format "Only Original" )
27+
INSERT INTO custom_format_conditions (custom_format_name, name, type, arr_type, negate, required)
28+
VALUES ('Only Original', 'Not Original', 'language', 'all', 0, 1);
29+
30+
INSERT INTO condition_languages (custom_format_name, condition_name, language_name, except_language) VALUES ('Only Original', 'Not Original', 'Original', 1);
31+
-- --- END op 297
32+
33+
-- --- BEGIN op 298 ( update custom_format "Only Original" )
34+
update "custom_formats" set "description" = 'Matches releases that don''t include the Original language track. Dual audio is NOT allowed.' where "name" = 'Only Original' and "description" = 'Matches releases that don''t include an Original language track. Dual audio is NOT allowed.';
35+
-- --- END op 298
36+
37+
-- --- BEGIN op 299 ( update custom_format "Not Only Original" )
38+
update "custom_formats" set "name" = 'Not Only Original' where "name" = 'Only Original';
39+
-- --- END op 299
40+
41+
-- --- BEGIN op 300 ( delete custom_format "Not Only English (Missing)" )
42+
delete from "custom_formats" where "name" = 'Not Only English (Missing)';
43+
-- --- END op 300
44+
45+
-- --- BEGIN op 301 ( delete custom_format "Not English" )
46+
delete from "custom_formats" where "name" = 'Not English';
47+
-- --- END op 301
48+
49+
-- --- BEGIN op 302 ( delete custom_format "Not Only English" )
50+
delete from "custom_formats" where "name" = 'Not Only English';
51+
-- --- END op 302
52+
53+
-- --- BEGIN op 303 ( update custom_format "Not Original" )
54+
update "custom_formats" set "description" = 'Matches releases that don''''t include the Original language track. Multiple audio tracks is allowed' where "name" = 'Not Original' and "description" = 'Matches releases that don''''t include the Original language track. Dual audio is allowed';
55+
-- --- END op 303
56+
57+
-- --- BEGIN op 304 ( update custom_format "Not Only Original" )
58+
update "custom_formats" set "description" = 'Matches releases that don''t include the Original language track. Multiple audio tracks is NOT allowed.' where "name" = 'Not Only Original' and "description" = 'Matches releases that don''t include the Original language track. Dual audio is NOT allowed.';
59+
-- --- END op 304
60+
61+
-- --- BEGIN op 305 ( update custom_format "Not Only Original" )
62+
insert into "tags" ("name") values ('Language') on conflict ("name") do nothing;
63+
64+
INSERT INTO custom_format_tags (custom_format_name, tag_name) VALUES ('Not Only Original', 'Language');
65+
-- --- END op 305

0 commit comments

Comments
 (0)