From 942972d5f05087450e50fefa582c39cef5db4dac Mon Sep 17 00:00:00 2001 From: McToel <36071676+McToel@users.noreply.github.com> Date: Fri, 10 Jan 2025 19:21:27 +0100 Subject: [PATCH] Use risZuglaufId to get fahrtNr (#8) --- parse/line.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse/line.js b/parse/line.js index 0b78103a..c8abb657 100644 --- a/parse/line.js +++ b/parse/line.js @@ -2,7 +2,7 @@ import slugg from 'slugg'; const parseLine = (ctx, p) => { const profile = ctx.profile; - const fahrtNr = p.verkehrsmittel?.nummer || p.transport?.number || p.train?.no || p.verkehrsmittelNummer || ((p.mitteltext || '') + ' ').split(' ')[1]; + const fahrtNr = p.verkehrsmittel?.nummer || p.transport?.number || p.train?.no || ((p.risZuglaufId || '') + '_').split('_')[1] || p.verkehrsmittelNummer || ((p.mitteltext || '') + ' ').split(' ')[1]; const res = { type: 'line', id: slugg(p.verkehrsmittel?.langText || p.transport?.journeyDescription || p.train && p.train.category + ' ' + p.train.lineName + ' ' + p.train.no || p.langtext || p.mitteltext), // TODO terrible