Add publishing of match video split times to STEMtv.

This commit is contained in:
Patrick Fairbank
2016-08-28 00:49:52 -07:00
parent 16b955f481
commit 57725cb621
11 changed files with 125 additions and 3 deletions

View File

@@ -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 ""
}