chore: fixed stock fallback thumbnnail

This commit is contained in:
2024-05-13 14:54:21 +02:00
parent ebd0eeb8c4
commit 328e8c0573
+4 -8
View File
@@ -116,14 +116,10 @@ export default defineComponent({
const isLoco = /.-\d{3}/.test(stockName); const isLoco = /.-\d{3}/.test(stockName);
if (isLoco) { if (isLoco) {
fallbackName += 'loco-'; if (/^\d?EN\d{2}/.test(stockName)) fallbackName = 'loco-ezt';
fallbackName += /^\d?EN\d{2}/.test(stockName) else if (/^SN\d{2}/.test(stockName)) fallbackName = 'loco-szt';
? 'ezt' else if (/^\d{1,}?E/.test(stockName)) fallbackName = 'loco-e';
: /^SN\d{2}/.test(stockName) else fallbackName = 'loco-s';
? 'szt'
: /^\d?E/.test(stockName)
? 'e'
: 's';
} else { } else {
const isCarPassenger = /(\d{3}a|(Bau|Gor)\d{2}|304C)_/.test(stockName); const isCarPassenger = /(\d{3}a|(Bau|Gor)\d{2}|304C)_/.test(stockName);