mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 21:56:50 -04:00
Add publishing of match video split times to STEMtv.
This commit is contained in:
11
match.go
11
match.go
@@ -6,6 +6,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
@@ -112,3 +113,13 @@ func (match *Match) CapitalizedType() string {
|
||||
}
|
||||
return strings.ToUpper(match.Type[0:1]) + match.Type[1:]
|
||||
}
|
||||
|
||||
func (match *Match) TbaCode() string {
|
||||
if match.Type == "qualification" {
|
||||
return fmt.Sprintf("qm%s", match.DisplayName)
|
||||
} else if match.Type == "elimination" {
|
||||
return fmt.Sprintf("%s%dm%d", strings.ToLower(elimRoundNames[match.ElimRound]), match.ElimGroup,
|
||||
match.ElimInstance)
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user