|
| 1 | +-- @operation: export |
| 2 | +-- @entity: batch |
| 3 | +-- @name: Add x264 Bluray Fallbacks to 1080p Efficient Movie Side Only |
| 4 | +-- @exportedAt: 2026-05-12T00:19:18.483Z |
| 5 | +-- @opIds: 8834, 8835, 8836, 8837, 8838, 8839, 8840, 8841, 8842, 8843, 8844, 8845, 8846, 8847, 8848, 8849, 8850, 8851, 8852, 8853, 8854, 8855, 8856, 8857, 8858, 8859, 8860, 8861, 8862, 8863, 8864, 8865, 8866, 8867, 8868, 8869, 8870, 8871, 8872, 8873, 8874, 8875 |
| 6 | + |
| 7 | +-- --- BEGIN op 8834 ( create custom_format "1080p Bluray (x264)" ) |
| 8 | +insert into "custom_formats" ("name", "description") values ('1080p Bluray (x264)', ''); |
| 9 | +-- --- END op 8834 |
| 10 | + |
| 11 | +-- --- BEGIN op 8835 ( update custom_format "1080p Bluray (x264)" ) |
| 12 | +update "custom_formats" set "description" = 'Matches 1080p H264 WEB-DLs.' where "name" = '1080p Bluray (x264)' and "description" = ''; |
| 13 | +-- --- END op 8835 |
| 14 | + |
| 15 | +-- --- BEGIN op 8836 ( update custom_format "1080p Bluray (x264)" ) |
| 16 | +insert into "tags" ("name") values ('Source') on conflict ("name") do nothing; |
| 17 | + |
| 18 | +insert into "custom_format_tags" ("custom_format_name", "tag_name") values ('1080p Bluray (x264)', 'Source'); |
| 19 | +-- --- END op 8836 |
| 20 | + |
| 21 | +-- --- BEGIN op 8837 ( update custom_format "1080p Bluray (x264)" ) |
| 22 | +INSERT INTO custom_format_conditions (custom_format_name, name, type, arr_type, negate, required) |
| 23 | +VALUES ('1080p Bluray (x264)', '1080p', 'resolution', 'all', 0, 1); |
| 24 | + |
| 25 | +INSERT INTO condition_resolutions (custom_format_name, condition_name, resolution) VALUES ('1080p Bluray (x264)', '1080p', '1080p'); |
| 26 | +-- --- END op 8837 |
| 27 | + |
| 28 | +-- --- BEGIN op 8838 ( update custom_format "1080p Bluray (x264)" ) |
| 29 | +INSERT INTO custom_format_conditions (custom_format_name, name, type, arr_type, negate, required) |
| 30 | +VALUES ('1080p Bluray (x264)', 'WEB-DL', 'source', 'all', 0, 1); |
| 31 | + |
| 32 | +INSERT INTO condition_sources (custom_format_name, condition_name, source) VALUES ('1080p Bluray (x264)', 'WEB-DL', 'web_dl'); |
| 33 | +-- --- END op 8838 |
| 34 | + |
| 35 | +-- --- BEGIN op 8839 ( update custom_format "1080p Bluray (x264)" ) |
| 36 | +INSERT INTO custom_format_conditions (custom_format_name, name, type, arr_type, negate, required) |
| 37 | +VALUES ('1080p Bluray (x264)', 'h264', 'release_title', 'all', 0, 1); |
| 38 | + |
| 39 | +INSERT INTO condition_patterns (custom_format_name, condition_name, regular_expression_name) VALUES ('1080p Bluray (x264)', 'h264', 'AVC'); |
| 40 | +-- --- END op 8839 |
| 41 | + |
| 42 | +-- --- BEGIN op 8840 ( update custom_format "1080p Bluray (x264)" ) |
| 43 | +DELETE FROM custom_format_conditions |
| 44 | + WHERE custom_format_name = '1080p Bluray (x264)' |
| 45 | + AND name = 'WEB-DL' |
| 46 | + AND type = 'source' |
| 47 | + AND arr_type = 'all' |
| 48 | + AND negate = 0 |
| 49 | + AND required = 1; |
| 50 | +-- --- END op 8840 |
| 51 | + |
| 52 | +-- --- BEGIN op 8841 ( update custom_format "1080p Bluray (x264)" ) |
| 53 | +DELETE FROM custom_format_conditions |
| 54 | + WHERE custom_format_name = '1080p Bluray (x264)' |
| 55 | + AND name = 'h264' |
| 56 | + AND type = 'release_title' |
| 57 | + AND arr_type = 'all' |
| 58 | + AND negate = 0 |
| 59 | + AND required = 1; |
| 60 | +-- --- END op 8841 |
| 61 | + |
| 62 | +-- --- BEGIN op 8842 ( update custom_format "1080p Bluray (x264)" ) |
| 63 | +INSERT INTO custom_format_conditions (custom_format_name, name, type, arr_type, negate, required) |
| 64 | +VALUES ('1080p Bluray (x264)', 'Bluray', 'source', 'all', 0, 1); |
| 65 | + |
| 66 | +INSERT INTO condition_sources (custom_format_name, condition_name, source) VALUES ('1080p Bluray (x264)', 'Bluray', 'bluray'); |
| 67 | +-- --- END op 8842 |
| 68 | + |
| 69 | +-- --- BEGIN op 8843 ( update custom_format "1080p Bluray (x264)" ) |
| 70 | +INSERT INTO custom_format_conditions (custom_format_name, name, type, arr_type, negate, required) |
| 71 | +VALUES ('1080p Bluray (x264)', 'x264', 'release_title', 'all', 0, 1); |
| 72 | + |
| 73 | +INSERT INTO condition_patterns (custom_format_name, condition_name, regular_expression_name) VALUES ('1080p Bluray (x264)', 'x264', 'AVC'); |
| 74 | +-- --- END op 8843 |
| 75 | + |
| 76 | +-- --- BEGIN op 8844 ( update custom_format "1080p Bluray (x264)" ) |
| 77 | +update "custom_formats" set "description" = 'Matches 1080p H264 Blurays.' where "name" = '1080p Bluray (x264)' and "description" = 'Matches 1080p H264 WEB-DLs.'; |
| 78 | +-- --- END op 8844 |
| 79 | + |
| 80 | +-- --- BEGIN op 8845 ( update quality_profile "1080p Efficient" ) |
| 81 | +INSERT INTO quality_profile_custom_formats (quality_profile_name, custom_format_name, arr_type, score) |
| 82 | +SELECT '1080p Efficient', '1080p Bluray (x264)', 'radarr', 700000 |
| 83 | +WHERE NOT EXISTS ( |
| 84 | + SELECT 1 FROM quality_profile_custom_formats |
| 85 | + WHERE quality_profile_name = '1080p Efficient' |
| 86 | + AND custom_format_name = '1080p Bluray (x264)' |
| 87 | + AND arr_type = 'radarr' |
| 88 | +); |
| 89 | +-- --- END op 8845 |
| 90 | + |
| 91 | +-- --- BEGIN op 8846 ( update quality_profile "1080p Efficient" ) |
| 92 | +INSERT INTO quality_profile_custom_formats (quality_profile_name, custom_format_name, arr_type, score) |
| 93 | +SELECT '1080p Efficient', '1080p Bluray (x264)', 'sonarr', 700000 |
| 94 | +WHERE NOT EXISTS ( |
| 95 | + SELECT 1 FROM quality_profile_custom_formats |
| 96 | + WHERE quality_profile_name = '1080p Efficient' |
| 97 | + AND custom_format_name = '1080p Bluray (x264)' |
| 98 | + AND arr_type = 'sonarr' |
| 99 | +); |
| 100 | +-- --- END op 8846 |
| 101 | + |
| 102 | +-- --- BEGIN op 8847 ( update quality_profile "1080p Efficient" ) |
| 103 | +INSERT INTO quality_profile_custom_formats (quality_profile_name, custom_format_name, arr_type, score) |
| 104 | +SELECT '1080p Efficient', '1080p Quality Tier 1', 'radarr', 165000 |
| 105 | +WHERE NOT EXISTS ( |
| 106 | + SELECT 1 FROM quality_profile_custom_formats |
| 107 | + WHERE quality_profile_name = '1080p Efficient' |
| 108 | + AND custom_format_name = '1080p Quality Tier 1' |
| 109 | + AND arr_type = 'radarr' |
| 110 | +); |
| 111 | +-- --- END op 8847 |
| 112 | + |
| 113 | +-- --- BEGIN op 8848 ( update quality_profile "1080p Efficient" ) |
| 114 | +INSERT INTO quality_profile_custom_formats (quality_profile_name, custom_format_name, arr_type, score) |
| 115 | +SELECT '1080p Efficient', '1080p Quality Tier 2', 'radarr', 164000 |
| 116 | +WHERE NOT EXISTS ( |
| 117 | + SELECT 1 FROM quality_profile_custom_formats |
| 118 | + WHERE quality_profile_name = '1080p Efficient' |
| 119 | + AND custom_format_name = '1080p Quality Tier 2' |
| 120 | + AND arr_type = 'radarr' |
| 121 | +); |
| 122 | +-- --- END op 8848 |
| 123 | + |
| 124 | +-- --- BEGIN op 8849 ( update quality_profile "1080p Efficient" ) |
| 125 | +INSERT INTO quality_profile_custom_formats (quality_profile_name, custom_format_name, arr_type, score) |
| 126 | +SELECT '1080p Efficient', '1080p Quality Tier 3', 'radarr', 163000 |
| 127 | +WHERE NOT EXISTS ( |
| 128 | + SELECT 1 FROM quality_profile_custom_formats |
| 129 | + WHERE quality_profile_name = '1080p Efficient' |
| 130 | + AND custom_format_name = '1080p Quality Tier 3' |
| 131 | + AND arr_type = 'radarr' |
| 132 | +); |
| 133 | +-- --- END op 8849 |
| 134 | + |
| 135 | +-- --- BEGIN op 8850 ( update quality_profile "1080p Efficient" ) |
| 136 | +INSERT INTO quality_profile_custom_formats (quality_profile_name, custom_format_name, arr_type, score) |
| 137 | +SELECT '1080p Efficient', '1080p Quality Tier 4', 'radarr', 162000 |
| 138 | +WHERE NOT EXISTS ( |
| 139 | + SELECT 1 FROM quality_profile_custom_formats |
| 140 | + WHERE quality_profile_name = '1080p Efficient' |
| 141 | + AND custom_format_name = '1080p Quality Tier 4' |
| 142 | + AND arr_type = 'radarr' |
| 143 | +); |
| 144 | +-- --- END op 8850 |
| 145 | + |
| 146 | +-- --- BEGIN op 8851 ( update quality_profile "1080p Efficient" ) |
| 147 | +INSERT INTO quality_profile_custom_formats (quality_profile_name, custom_format_name, arr_type, score) |
| 148 | +SELECT '1080p Efficient', '1080p Quality Tier 5', 'radarr', 161000 |
| 149 | +WHERE NOT EXISTS ( |
| 150 | + SELECT 1 FROM quality_profile_custom_formats |
| 151 | + WHERE quality_profile_name = '1080p Efficient' |
| 152 | + AND custom_format_name = '1080p Quality Tier 5' |
| 153 | + AND arr_type = 'radarr' |
| 154 | +); |
| 155 | +-- --- END op 8851 |
| 156 | + |
| 157 | +-- --- BEGIN op 8852 ( update quality_profile "1080p Efficient" ) |
| 158 | +INSERT INTO quality_profile_custom_formats (quality_profile_name, custom_format_name, arr_type, score) |
| 159 | +SELECT '1080p Efficient', '1080p Quality Tier 6', 'radarr', 160000 |
| 160 | +WHERE NOT EXISTS ( |
| 161 | + SELECT 1 FROM quality_profile_custom_formats |
| 162 | + WHERE quality_profile_name = '1080p Efficient' |
| 163 | + AND custom_format_name = '1080p Quality Tier 6' |
| 164 | + AND arr_type = 'radarr' |
| 165 | +); |
| 166 | +-- --- END op 8852 |
| 167 | + |
| 168 | +-- --- BEGIN op 8853 ( update quality_profile "1080p Efficient" ) |
| 169 | +DELETE FROM quality_profile_custom_formats |
| 170 | +WHERE quality_profile_name = '1080p Efficient' |
| 171 | + AND custom_format_name = '1080p Bluray (x264)' |
| 172 | + AND arr_type = 'sonarr' |
| 173 | + AND score = 700000; |
| 174 | +-- --- END op 8853 |
| 175 | + |
| 176 | +-- --- BEGIN op 8854 ( update quality_profile "1080p Efficient" ) |
| 177 | +UPDATE quality_profile_custom_formats |
| 178 | +SET score = 881000 |
| 179 | +WHERE quality_profile_name = '1080p Efficient' |
| 180 | + AND custom_format_name = '1080p Balanced Tier 1' |
| 181 | + AND arr_type = 'radarr' |
| 182 | + AND score = 861000; |
| 183 | +-- --- END op 8854 |
| 184 | + |
| 185 | +-- --- BEGIN op 8855 ( update quality_profile "1080p Efficient" ) |
| 186 | +UPDATE quality_profile_custom_formats |
| 187 | +SET score = 880000 |
| 188 | +WHERE quality_profile_name = '1080p Efficient' |
| 189 | + AND custom_format_name = '1080p Balanced Tier 2' |
| 190 | + AND arr_type = 'radarr' |
| 191 | + AND score = 860000; |
| 192 | +-- --- END op 8855 |
| 193 | + |
| 194 | +-- --- BEGIN op 8856 ( update quality_profile "1080p Efficient" ) |
| 195 | +UPDATE quality_profile_custom_formats |
| 196 | +SET score = 960000 |
| 197 | +WHERE quality_profile_name = '1080p Efficient' |
| 198 | + AND custom_format_name = '1080p Bluray HEVC Tier 1' |
| 199 | + AND arr_type = 'radarr' |
| 200 | + AND score = 940000; |
| 201 | +-- --- END op 8856 |
| 202 | + |
| 203 | +-- --- BEGIN op 8857 ( update quality_profile "1080p Efficient" ) |
| 204 | +UPDATE quality_profile_custom_formats |
| 205 | +SET score = 923000 |
| 206 | +WHERE quality_profile_name = '1080p Efficient' |
| 207 | + AND custom_format_name = '1080p Efficient Movie Bluray Tier 1' |
| 208 | + AND arr_type = 'radarr' |
| 209 | + AND score = 903000; |
| 210 | +-- --- END op 8857 |
| 211 | + |
| 212 | +-- --- BEGIN op 8858 ( update quality_profile "1080p Efficient" ) |
| 213 | +UPDATE quality_profile_custom_formats |
| 214 | +SET score = 922000 |
| 215 | +WHERE quality_profile_name = '1080p Efficient' |
| 216 | + AND custom_format_name = '1080p Efficient Movie Bluray Tier 2' |
| 217 | + AND arr_type = 'radarr' |
| 218 | + AND score = 902000; |
| 219 | +-- --- END op 8858 |
| 220 | + |
| 221 | +-- --- BEGIN op 8859 ( update quality_profile "1080p Efficient" ) |
| 222 | +UPDATE quality_profile_custom_formats |
| 223 | +SET score = 921000 |
| 224 | +WHERE quality_profile_name = '1080p Efficient' |
| 225 | + AND custom_format_name = '1080p Efficient Movie Bluray Tier 3' |
| 226 | + AND arr_type = 'radarr' |
| 227 | + AND score = 901000; |
| 228 | +-- --- END op 8859 |
| 229 | + |
| 230 | +-- --- BEGIN op 8860 ( update quality_profile "1080p Efficient" ) |
| 231 | +UPDATE quality_profile_custom_formats |
| 232 | +SET score = 920000 |
| 233 | +WHERE quality_profile_name = '1080p Efficient' |
| 234 | + AND custom_format_name = '1080p Efficient Movie Bluray Tier 4' |
| 235 | + AND arr_type = 'radarr' |
| 236 | + AND score = 900000; |
| 237 | +-- --- END op 8860 |
| 238 | + |
| 239 | +-- --- BEGIN op 8861 ( update quality_profile "1080p Efficient" ) |
| 240 | +UPDATE quality_profile_custom_formats |
| 241 | +SET score = 903000 |
| 242 | +WHERE quality_profile_name = '1080p Efficient' |
| 243 | + AND custom_format_name = '1080p Efficient Movie WEB Tier 1' |
| 244 | + AND arr_type = 'radarr' |
| 245 | + AND score = 883000; |
| 246 | +-- --- END op 8861 |
| 247 | + |
| 248 | +-- --- BEGIN op 8862 ( update quality_profile "1080p Efficient" ) |
| 249 | +UPDATE quality_profile_custom_formats |
| 250 | +SET score = 902000 |
| 251 | +WHERE quality_profile_name = '1080p Efficient' |
| 252 | + AND custom_format_name = '1080p Efficient Movie WEB Tier 2' |
| 253 | + AND arr_type = 'radarr' |
| 254 | + AND score = 882000; |
| 255 | +-- --- END op 8862 |
| 256 | + |
| 257 | +-- --- BEGIN op 8863 ( update quality_profile "1080p Efficient" ) |
| 258 | +UPDATE quality_profile_custom_formats |
| 259 | +SET score = 901000 |
| 260 | +WHERE quality_profile_name = '1080p Efficient' |
| 261 | + AND custom_format_name = '1080p Efficient Movie WEB Tier 3' |
| 262 | + AND arr_type = 'radarr' |
| 263 | + AND score = 881000; |
| 264 | +-- --- END op 8863 |
| 265 | + |
| 266 | +-- --- BEGIN op 8864 ( update quality_profile "1080p Efficient" ) |
| 267 | +UPDATE quality_profile_custom_formats |
| 268 | +SET score = 900000 |
| 269 | +WHERE quality_profile_name = '1080p Efficient' |
| 270 | + AND custom_format_name = '1080p Efficient Movie WEB Tier 4' |
| 271 | + AND arr_type = 'radarr' |
| 272 | + AND score = 880000; |
| 273 | +-- --- END op 8864 |
| 274 | + |
| 275 | +-- --- BEGIN op 8865 ( update quality_profile "1080p Efficient" ) |
| 276 | +UPDATE quality_profile_custom_formats |
| 277 | +SET score = 880000 |
| 278 | +WHERE quality_profile_name = '1080p Efficient' |
| 279 | + AND custom_format_name = '1080p WEB-DL (h264)' |
| 280 | + AND arr_type = 'radarr' |
| 281 | + AND score = 860000; |
| 282 | +-- --- END op 8865 |
| 283 | + |
| 284 | +-- --- BEGIN op 8866 ( update quality_profile "1080p Efficient" ) |
| 285 | +UPDATE quality_profile_custom_formats |
| 286 | +SET score = 940000 |
| 287 | +WHERE quality_profile_name = '1080p Efficient' |
| 288 | + AND custom_format_name = '1080p WEB-DL HEVC Tier 1' |
| 289 | + AND arr_type = 'radarr' |
| 290 | + AND score = 920000; |
| 291 | +-- --- END op 8866 |
| 292 | + |
| 293 | +-- --- BEGIN op 8867 ( update quality_profile "1080p Efficient" ) |
| 294 | +UPDATE quality_profile_custom_formats |
| 295 | +SET score = 960000 |
| 296 | +WHERE quality_profile_name = '1080p Efficient' |
| 297 | + AND custom_format_name = 'HONE Bluray' |
| 298 | + AND arr_type = 'radarr' |
| 299 | + AND score = 940000; |
| 300 | +-- --- END op 8867 |
| 301 | + |
| 302 | +-- --- BEGIN op 8868 ( update quality_profile "1080p Efficient" ) |
| 303 | +UPDATE quality_profile_custom_formats |
| 304 | +SET score = 940000 |
| 305 | +WHERE quality_profile_name = '1080p Efficient' |
| 306 | + AND custom_format_name = 'HONE WEB' |
| 307 | + AND arr_type = 'radarr' |
| 308 | + AND score = 920000; |
| 309 | +-- --- END op 8868 |
| 310 | + |
| 311 | +-- --- BEGIN op 8869 ( update quality_profile "1080p Efficient" ) |
| 312 | +UPDATE quality_profile_custom_formats |
| 313 | +SET score = 923000 |
| 314 | +WHERE quality_profile_name = '1080p Efficient' |
| 315 | + AND custom_format_name = 'QxR Bluray' |
| 316 | + AND arr_type = 'radarr' |
| 317 | + AND score = 903000; |
| 318 | +-- --- END op 8869 |
| 319 | + |
| 320 | +-- --- BEGIN op 8870 ( update quality_profile "1080p Efficient" ) |
| 321 | +UPDATE quality_profile_custom_formats |
| 322 | +SET score = 903000 |
| 323 | +WHERE quality_profile_name = '1080p Efficient' |
| 324 | + AND custom_format_name = 'QxR WEB' |
| 325 | + AND arr_type = 'radarr' |
| 326 | + AND score = 883000; |
| 327 | +-- --- END op 8870 |
| 328 | + |
| 329 | +-- --- BEGIN op 8871 ( update quality_profile "1080p Efficient" ) |
| 330 | +UPDATE quality_profile_custom_formats |
| 331 | +SET score = 923000 |
| 332 | +WHERE quality_profile_name = '1080p Efficient' |
| 333 | + AND custom_format_name = 'TAoE Bluray' |
| 334 | + AND arr_type = 'radarr' |
| 335 | + AND score = 903000; |
| 336 | +-- --- END op 8871 |
| 337 | + |
| 338 | +-- --- BEGIN op 8872 ( update quality_profile "1080p Efficient" ) |
| 339 | +UPDATE quality_profile_custom_formats |
| 340 | +SET score = 903000 |
| 341 | +WHERE quality_profile_name = '1080p Efficient' |
| 342 | + AND custom_format_name = 'TAoE WEB' |
| 343 | + AND arr_type = 'radarr' |
| 344 | + AND score = 883000; |
| 345 | +-- --- END op 8872 |
| 346 | + |
| 347 | +-- --- BEGIN op 8873 ( update quality_profile "1080p Efficient" ) |
| 348 | +UPDATE quality_profile_custom_formats |
| 349 | +SET score = 922000 |
| 350 | +WHERE quality_profile_name = '1080p Efficient' |
| 351 | + AND custom_format_name = 'Vialle Bluray' |
| 352 | + AND arr_type = 'radarr' |
| 353 | + AND score = 902000; |
| 354 | +-- --- END op 8873 |
| 355 | + |
| 356 | +-- --- BEGIN op 8874 ( update quality_profile "1080p Efficient" ) |
| 357 | +UPDATE quality_profile_custom_formats |
| 358 | +SET score = 903000 |
| 359 | +WHERE quality_profile_name = '1080p Efficient' |
| 360 | + AND custom_format_name = 'Weasley WEB' |
| 361 | + AND arr_type = 'radarr' |
| 362 | + AND score = 883000; |
| 363 | +-- --- END op 8874 |
| 364 | + |
| 365 | +-- --- BEGIN op 8875 ( update custom_format "1080p Bluray (x264)" ) |
| 366 | +update "custom_formats" set "description" = 'Matches 1080p x264 Blurays.' where "name" = '1080p Bluray (x264)' and "description" = 'Matches 1080p H264 Blurays.'; |
| 367 | +-- --- END op 8875 |
0 commit comments