iptv/scripts/store/setters/resolution.js

10 lines
227 B
JavaScript
Raw Normal View History

2021-12-12 05:12:06 +01:00
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
}