Project

General

Profile

Feature #4934 ยป SAT-IP-Subscription-shows-current-PIDS.diff

simple patch - Mono Polimorph, 2018-02-12 20:47

View differences:

src/subscriptions.c
1015 1015
  profile_t *pro;
1016 1016
  char buf[284];
1017 1017
  const char *state;
1018
  htsmsg_t *l;
1018 1019

  
1019 1020
  htsmsg_add_u32(m, "id", s->ths_id);
1020 1021
  htsmsg_add_u32(m, "start", s->ths_start);
......
1080 1081
  } else if(s->ths_dvrfile != NULL)
1081 1082
    htsmsg_add_str(m, "service", s->ths_dvrfile ?: "");
1082 1083

  
1084
#if ENABLE_MPEGTS
1085
  mpegts_service_t *ms = (mpegts_service_t *)s->ths_service;
1086
  mpegts_apids_t *pids;
1087
  if ((pids = ms->s_pids) != NULL) {
1088
    l = htsmsg_create_list();
1089
    if (pids->all) {
1090
      htsmsg_add_s32(l, NULL, 8192);
1091
    } else {
1092
      int i;
1093
      for (i = 0; i < pids->count; i++) {
1094
        htsmsg_add_s32(l, NULL, pids->pids[i].pid);
1095
      }
1096
    }
1097
    htsmsg_add_msg(m, "pids", l);
1098
  }
1099
#endif
1100

  
1083 1101
  htsmsg_add_u32(m, "in", atomic_get(&s->ths_bytes_in_avg));
1084 1102
  htsmsg_add_u32(m, "out", atomic_get(&s->ths_bytes_out_avg));
1085 1103
  htsmsg_add_s64(m, "total_in", atomic_get_u64(&s->ths_total_bytes_in));
src/webui/static/app/status.js
20 20
            r.data.channel = m.channel;
21 21
            r.data.service = m.service;
22 22
            r.data.state = m.state;
23
            if (m.pids) r.data.pids = m.pids;
23 24
            if (m.descramble) r.data.descramble = m.descramble;
24 25
            if (m.profile) r.data.profile = m.profile;
25 26
            r.data.errors = m.errors;
......
49 50
                { name: 'service', sortType: stype },
50 51
                { name: 'profile', sortType: stype },
51 52
                { name: 'state', sortType: stype },
53
                { name: 'pids' },
52 54
                { name: 'descramble', sortType: stype },
53 55
                { name: 'errors', sortType: stype },
54 56
                { name: 'in', sortType: stype },
......
115 117
                sortable: true
116 118
            },
117 119
            {
118
                width: 250,
120
                width: 210,
119 121
                id: 'service',
120 122
                header: _("Service"),
121 123
                dataIndex: 'service',
......
147 149
                sortable: true
148 150
            },
149 151
            {
152
                width: 90,
153
                id: 'pids',
154
                header: _("PID list"),
155
                dataIndex: 'pids',
156
                sortable: false,
157
                renderer: function(v) {
158
                    var r = [];
159
                    Ext.each(v, function(pid) {
160
                      r.push(pid);
161
                    });
162
                    if (r.length < 1) return "";
163
                    r.sort(function(a, b){return a-b});
164
                    return r.join(',');
165
                }
166
            },
167
            {
150 168
                width: 80,
151 169
                id: 'descramble',
152 170
                header: _("Descramble"),
    (1-1/1)