diff --git a/api/lines.go b/api/lines.go index 079a79e..eecca5a 100644 --- a/api/lines.go +++ b/api/lines.go @@ -99,6 +99,13 @@ func convertLineType(old string) string { func convertCode(t, code string) string { if !strings.HasPrefix(code, "line:IDFM:") { + if t == "tram" && !strings.HasPrefix(code, "T") { + code = "T" + code + } + if t == "noctilien" && !strings.HasPrefix(code, "N") { + code = "N" + code + } + if len(code) != 6 || !strings.HasPrefix(code, "C") { code = searchLine(t, code) }