iptv/scripts/store/setters/resolution.js
2021-12-12 07:12:06 +03:00

10 lines
227 B
JavaScript

module.exports = function ({ title, resolution = {} }) {
if (title) {
const [_, h] = title.match(/\((\d+)P\)/i) || [null, null]
return h ? { height: parseInt(h), width: null } : resolution
}
return resolution
}