Create scripts/store/setters
This commit is contained in:
9
scripts/store/setters/resolution.js
Normal file
9
scripts/store/setters/resolution.js
Normal file
@ -0,0 +1,9 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user