add pandora.site.video.previewRatio
This commit is contained in:
parent
8c5bbfd716
commit
15534396a2
4 changed files with 5 additions and 3 deletions
|
@ -700,6 +700,7 @@
|
||||||
"video": {
|
"video": {
|
||||||
"download": false,
|
"download": false,
|
||||||
"formats": ["webm", "mp4"],
|
"formats": ["webm", "mp4"],
|
||||||
|
"previewRatio": 1.7777777778,
|
||||||
"resolutions": [96]
|
"resolutions": [96]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -602,6 +602,7 @@
|
||||||
"video": {
|
"video": {
|
||||||
"download": true,
|
"download": true,
|
||||||
"formats": ["webm", "mp4"],
|
"formats": ["webm", "mp4"],
|
||||||
|
"previewRatio": 1.3333333333,
|
||||||
"resolutions": [480, 240, 96]
|
"resolutions": [480, 240, 96]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -555,7 +555,7 @@ pandora.getInfoHeight = function(includeHidden) {
|
||||||
);
|
);
|
||||||
height = Math.min(
|
height = Math.min(
|
||||||
isVideoPreview
|
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,
|
: pandora.user.ui.sidebarSize,
|
||||||
window.innerHeight - 109 // 20 menu + 24 bar + 64 (4 closed folders) + 1 resizebar
|
window.innerHeight - 109 // 20 menu + 24 bar + 64 (4 closed folders) + 1 resizebar
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,8 +10,8 @@ pandora.ui.videoPreview = function(data) {
|
||||||
return resolution >= data.height;
|
return resolution >= data.height;
|
||||||
}),
|
}),
|
||||||
resolution = resolutions.length
|
resolution = resolutions.length
|
||||||
? Math.min(resolutions)
|
? Ox.min(resolutions)
|
||||||
: Math.max(pandora.site.video.resolutions);
|
: Ox.max(pandora.site.video.resolutions);
|
||||||
return '/' + data.id + '/' + resolution + 'p' + (
|
return '/' + data.id + '/' + resolution + 'p' + (
|
||||||
Ox.isUndefined(position) ? '' : position
|
Ox.isUndefined(position) ? '' : position
|
||||||
) + '.jpg';
|
) + '.jpg';
|
||||||
|
|
Loading…
Reference in a new issue