Account of screen modifier 'A' in sony models
This commit is contained in:
parent
7ab259a09e
commit
bc0216f832
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -27,6 +27,7 @@
|
||||
"headlessui",
|
||||
"hgetall",
|
||||
"hset",
|
||||
"IIIA",
|
||||
"ILCE",
|
||||
"ILIKE",
|
||||
"ILME",
|
||||
|
||||
@ -20,7 +20,9 @@ export const SONY_CAMERAS = {
|
||||
'SONY ILCE-9': 'Sony A9',
|
||||
'SONY ILCE-7RM5': 'Sony A7R V',
|
||||
'SONY ILCE-7RM4': 'Sony A7R IV',
|
||||
'SONY ILCE-7RM4A': 'Sony A7R IVA',
|
||||
'SONY ILCE-7RM3': 'Sony A7R III',
|
||||
'SONY ILCE-7RM3A': 'Sony A7R IIIA',
|
||||
'SONY ILCE-7RM2': 'Sony A7R II',
|
||||
'SONY ILCE-7R': 'Sony A7R',
|
||||
'SONY ILCE-7SM3': 'Sony A7S III',
|
||||
|
||||
@ -12,14 +12,17 @@ export const formatSonyModel = (model: string) => {
|
||||
series,
|
||||
letter,
|
||||
_version,
|
||||
] = /^SONY (ILCE|ILME)-([0-9]*)([a-ln-z]*)M*([0-9]*)/gi.exec(model) ?? [];
|
||||
modifier,
|
||||
// eslint-disable-next-line max-len
|
||||
] = /^SONY (ILCE|ILME)-([0-9]*)([a-ln-z]*)M*([0-9]*)([a-z]*)/gi.exec(model) ?? [];
|
||||
const version = parseInt(_version ?? '0');
|
||||
const versionRomanNumber = version > 1 && version < 10
|
||||
? ` ${convertNumberToRomanNumeral(version)}`
|
||||
: undefined;
|
||||
if (type === 'ILCE' || type === 'ILME') {
|
||||
return type === 'ILCE'
|
||||
? `A${series}${letter}${versionRomanNumber || version || ''}`
|
||||
// eslint-disable-next-line max-len
|
||||
? `A${series}${letter}${versionRomanNumber || version || ''}${modifier || ''}`
|
||||
: `FX${series}${_version}`;
|
||||
}
|
||||
return model;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user