mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
trim tv objects
This commit is contained in:
parent
1fbbb143fe
commit
e30d68fdd4
2 changed files with 8 additions and 4 deletions
|
@ -1219,22 +1219,22 @@
|
|||
result = (values[half - 1] + values[half]) / 2.0;
|
||||
|
||||
// If really close to 2:3 (poster image), just return 2:3
|
||||
if (Math.abs(0.66666666667 - result) <= .05) {
|
||||
if (Math.abs(0.66666666667 - result) <= .15) {
|
||||
return 0.66666666667;
|
||||
}
|
||||
|
||||
// If really close to 16:9 (episode image), just return 16:9
|
||||
if (Math.abs(1.777777778 - result) <= .05) {
|
||||
if (Math.abs(1.777777778 - result) <= .15) {
|
||||
return 1.777777778;
|
||||
}
|
||||
|
||||
// If really close to 1 (square image), just return 1
|
||||
if (Math.abs(1 - result) <= .05) {
|
||||
if (Math.abs(1 - result) <= .15) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// If really close to 4:3 (poster image), just return 2:3
|
||||
if (Math.abs(1.33333333333 - result) <= .05) {
|
||||
if (Math.abs(1.33333333333 - result) <= .15) {
|
||||
return 1.33333333333;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue