diff --git a/pandora/0xdb.jsonc b/pandora/0xdb.jsonc index 7195f9eb..542420bf 100644 --- a/pandora/0xdb.jsonc +++ b/pandora/0xdb.jsonc @@ -700,6 +700,7 @@ "video": { "download": false, "formats": ["webm", "mp4"], + "previewRatio": 1.7777777778, "resolutions": [96] } } diff --git a/pandora/padma.jsonc b/pandora/padma.jsonc index d9121a6e..aadbe94c 100644 --- a/pandora/padma.jsonc +++ b/pandora/padma.jsonc @@ -602,6 +602,7 @@ "video": { "download": true, "formats": ["webm", "mp4"], + "previewRatio": 1.3333333333, "resolutions": [480, 240, 96] } } diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index 9287f8a7..bf0ae154 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -555,7 +555,7 @@ pandora.getInfoHeight = function(includeHidden) { ); height = Math.min( isVideoPreview - ? Math.round(pandora.user.ui.sidebarSize / (16/9)) + 16 + ? Math.round(pandora.user.ui.sidebarSize / pandora.site.video.previewRatio) + 16 : pandora.user.ui.sidebarSize, window.innerHeight - 109 // 20 menu + 24 bar + 64 (4 closed folders) + 1 resizebar ); diff --git a/static/js/pandora/videoPreview.js b/static/js/pandora/videoPreview.js index 198d1174..5dc57523 100644 --- a/static/js/pandora/videoPreview.js +++ b/static/js/pandora/videoPreview.js @@ -10,8 +10,8 @@ pandora.ui.videoPreview = function(data) { return resolution >= data.height; }), resolution = resolutions.length - ? Math.min(resolutions) - : Math.max(pandora.site.video.resolutions); + ? Ox.min(resolutions) + : Ox.max(pandora.site.video.resolutions); return '/' + data.id + '/' + resolution + 'p' + ( Ox.isUndefined(position) ? '' : position ) + '.jpg';