|
1 | 1 | @./releasesource.groovy |
2 | 2 | { |
3 | | - def bdepth = bitdepth ? " ${bitdepth}bit" : "" |
4 | | - "$resolution $vcf $bdepth, $ac" |
| 3 | + def aspectRatio = width / height |
| 4 | + def isVertical = width < height |
| 5 | + def is16x9 = Math.abs(aspectRatio - 16/9) < 0.1 |
| 6 | + def is9x16 = Math.abs(aspectRatio - 9/16) < 0.1 |
| 7 | + def resos = isVertical && is9x16 ? "${width}P" : !isVertical && is16x9 ? "${height}P" : "${width}x${height}" |
| 8 | + def bdepth = bitdepth > 8 ? " ${bitdepth}bit" : "" |
| 9 | + "$resos $vcf$bdepth, $ac" |
5 | 10 | } |
6 | 11 | {" "} |
7 | 12 | {af.format( |
|
10 | 15 | 6: 'DD 5.1', |
11 | 16 | 5: '5.0', |
12 | 17 | 3: '2.1', |
13 | | - 2: '2.0', |
14 | | - 1: '1.0', |
| 18 | + 2: '', |
| 19 | + 1: '', |
15 | 20 | )} |
16 | 21 | { |
17 | 22 | def audioLangCount = any { audioLanguages.size() } { 0 } |
18 | | - def substat = audioLangCount > 2 ? " MULTi-AUD" : audioLangCount > 1 ? " DUAL-AUD" : "" |
| 23 | + def substat = audioLangCount > 2 ? " M-AUD" : audioLangCount > 1 ? " D-AUD" : "" |
19 | 24 | def langs_ = audioLangCount > 5 ? audioLanguages.take(5) : audioLanguages |
20 | | - def dub = audioLanguages.any { it.ISO3B == language.ISO3B } ? "" : " DUBBED" |
| 25 | + def dub = audioLanguages.any { it.ISO3B == language.ISO3B } ? "" : " DUB" |
21 | 26 | substat = audioLangCount == 1 && audioLanguages.any { it.ISO3B == "und" } ? "" : "$substat$dub" |
22 | 27 | // substat ? substat + langs_.ISO2.joining(" ", " (", "").upper() + (audioLangCount > 5 ? " ...)" : ")") : "" |
23 | 28 | substat |
|
30 | 35 | ].get(it,it).toUpperCase() |
31 | 36 | }.unique() |
32 | 37 | def textLangCount = any { text_arr.size() } { 0 } |
33 | | - def substat = textLangCount > 2 ? ", MULTi" : textLangCount > 1 ? ", DUAL" : textLangCount == 1 ? ", SUB" : null |
| 38 | + def substat = textLangCount > 2 ? ", M-SUB" : textLangCount > 1 ? ", D-SUB" : textLangCount == 1 ? ", SUB" : null |
34 | 39 | // def langs_ = textLangCount > 5 ? text_arr.take(5) : text_arr |
35 | 40 | // substat ? substat + langs_.joining(" ", " (", "").upper() + (textLangCount > 6 ? " ...)" : ")") : "" |
36 | 41 | substat |
37 | 42 | } |
38 | | -{"]["}{crc32.upper()}{"]"} |
| 43 | +{"]"} |
39 | 44 | { |
40 | 45 | if (f.subtitle) { |
41 | 46 | def langcode = [ |
|
0 commit comments