mirror of https://github.com/EasyDarwin/EasyDarwin
parent
0b29274186
commit
3917853f89
|
@ -51,15 +51,15 @@ func (h *APIHandler) Pushers(c *gin.Context) {
|
||||||
pushers := make([]interface{}, 0)
|
pushers := make([]interface{}, 0)
|
||||||
for _, pusher := range rtsp.Instance.GetPushers() {
|
for _, pusher := range rtsp.Instance.GetPushers() {
|
||||||
port := pusher.Server().TCPPort
|
port := pusher.Server().TCPPort
|
||||||
rtsp := fmt.Sprintf("rtsp://%s:%d%s", hostname, port, pusher.Path)
|
rtsp := fmt.Sprintf("rtsp://%s:%d%s", hostname, port, pusher.Path())
|
||||||
if port == 554 {
|
if port == 554 {
|
||||||
rtsp = fmt.Sprintf("rtsp://%s%s", hostname, pusher.Path)
|
rtsp = fmt.Sprintf("rtsp://%s%s", hostname, pusher.Path())
|
||||||
}
|
}
|
||||||
if form.Q != "" && !strings.Contains(strings.ToLower(rtsp), strings.ToLower(form.Q)) {
|
if form.Q != "" && !strings.Contains(strings.ToLower(rtsp), strings.ToLower(form.Q)) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
pushers = append(pushers, map[string]interface{}{
|
pushers = append(pushers, map[string]interface{}{
|
||||||
"id": pusher.ID,
|
"id": pusher.ID(),
|
||||||
"path": rtsp,
|
"path": rtsp,
|
||||||
"transType": pusher.TransType.String(),
|
"transType": pusher.TransType.String(),
|
||||||
"inBytes": pusher.InBytes(),
|
"inBytes": pusher.InBytes(),
|
||||||
|
|
Loading…
Reference in New Issue