From 29a3b1a904637a8be5fbec6e2a4ff880dd4c1ea0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 16 Jul 2022 00:32:20 +0200 Subject: fall back to productname via name --- bin/nvm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/nvm b/bin/nvm index 42a923a..51022cc 100755 --- a/bin/nvm +++ b/bin/nvm @@ -430,7 +430,8 @@ class Line: self.name = self.name[3:] self.css_class = "bus" - self.productName = obj.get("productName", 0) + if not "productName" in obj and " " in self.name: + self.productName = self.name.split(" ")[0] if "fahrtNr" in obj: self.fahrtNr = int(self.fahrtNr) else: -- cgit v1.2.3