1
0
Fork 0
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:
Luke Pulverenti 2014-01-23 13:05:41 -05:00
parent 1fbbb143fe
commit e30d68fdd4
2 changed files with 8 additions and 4 deletions

View file

@ -1219,22 +1219,22 @@
result = (values[half - 1] + values[half]) / 2.0; result = (values[half - 1] + values[half]) / 2.0;
// If really close to 2:3 (poster image), just return 2:3 // 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; return 0.66666666667;
} }
// If really close to 16:9 (episode image), just return 16:9 // 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; return 1.777777778;
} }
// If really close to 1 (square image), just return 1 // If really close to 1 (square image), just return 1
if (Math.abs(1 - result) <= .05) { if (Math.abs(1 - result) <= .15) {
return 1; return 1;
} }
// If really close to 4:3 (poster image), just return 2:3 // 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; return 1.33333333333;
} }

View file

@ -621,6 +621,8 @@
// Some 1080- videos are reported as 1912? // Some 1080- videos are reported as 1912?
if (maxAllowedWidth >= 1910) { if (maxAllowedWidth >= 1910) {
options.push({ name: '1080p - 20Mbps', maxWidth: 1920, bitrate: 20000000 });
options.push({ name: '1080p - 15Mbps', maxWidth: 1920, bitrate: 15000000 });
options.push({ name: '1080p - 10Mbps', maxWidth: 1920, bitrate: 10000000 }); options.push({ name: '1080p - 10Mbps', maxWidth: 1920, bitrate: 10000000 });
options.push({ name: '1080p - 8Mbps', maxWidth: 1920, bitrate: 8000000 }); options.push({ name: '1080p - 8Mbps', maxWidth: 1920, bitrate: 8000000 });
options.push({ name: '1080p - 6Mbps', maxWidth: 1920, bitrate: 6000000 }); options.push({ name: '1080p - 6Mbps', maxWidth: 1920, bitrate: 6000000 });
@ -916,6 +918,8 @@
if (result.Items.length) { if (result.Items.length) {
channelsButton.show(); channelsButton.show();
} else {
channelsButton.hide();
} }
}); });