Show in the UI how long the user has been streaming for. Closes #59

This commit is contained in:
Gabe Kangas
2020-07-18 15:06:54 -07:00
parent addfce2ec9
commit 8ba0b6d7ce
6 changed files with 49 additions and 14 deletions

View File

@@ -2,15 +2,17 @@ package models
import (
"time"
"github.com/gabek/owncast/utils"
)
//Stats holds the stats for the system
type Stats struct {
SessionMaxViewerCount int `json:"sessionMaxViewerCount"`
OverallMaxViewerCount int `json:"overallMaxViewerCount"`
LastDisconnectTime time.Time `json:"lastDisconnectTime"`
SessionMaxViewerCount int `json:"sessionMaxViewerCount"`
OverallMaxViewerCount int `json:"overallMaxViewerCount"`
LastDisconnectTime utils.NullTime `json:"lastDisconnectTime"`
StreamConnected bool `json:"-"`
LastConnectTime time.Time `json:"-"`
LastConnectTime utils.NullTime `json:"-"`
Clients map[string]time.Time `json:"-"`
}

View File

@@ -1,8 +1,6 @@
package models
import (
"time"
)
import "github.com/gabek/owncast/utils"
//Status represents the status of the system
type Status struct {
@@ -11,6 +9,6 @@ type Status struct {
OverallMaxViewerCount int `json:"overallMaxViewerCount"`
SessionMaxViewerCount int `json:"sessionMaxViewerCount"`
LastConnectTime time.Time `json:"lastConnectTime"`
LastDisconnectTime time.Time `json:"lastDisconnectTime"`
LastConnectTime utils.NullTime `json:"lastConnectTime"`
LastDisconnectTime utils.NullTime `json:"lastDisconnectTime"`
}