htsbuf_queue_t q;
int delim;
size_t l;
+ int64_t chnum2;
const char *url, *name, *logo, *epgid;
char url2[512], custom[512], name2[128], buf[32], *n, *y;
strncmp(url, "rtp://", 6)))
return;
- if (chnum) {
+ epgid = htsmsg_get_str(item, "tvh-chnum");
+ chnum2 = epgid ? prop_intsplit_from_str(epgid, CHANNEL_SPLIT) : 0;
+ if (chnum2) {
+ chnum += chnum2;
+ } else if (chnum) {
if (chnum % CHANNEL_SPLIT)
chnum += *total;
else
}
case PT_S64: {
if (p->intsplit) {
- char *s;
if (!(new = htsmsg_field_get_str(f)))
continue;
- s64 = (int64_t)atol(new) * p->intsplit;
- if ((s = strchr(new, '.')) != NULL)
- s64 += (atol(s + 1) % p->intsplit);
+ s64 = prop_intsplit_from_str(new, p->intsplit);
} else {
if (htsmsg_field_get_s64(f, &s64))
continue;
(void *obj, const property_t *pl, htsmsg_t *m, htsmsg_t *list,
int optmask, const char *lang);
+static inline int64_t prop_intsplit_from_str(const char *s, int64_t intsplit)
+{
+ int64_t s64 = (int64_t)atol(s) * intsplit;
+ if ((s = strchr(s, '.')) != NULL)
+ s64 += (atol(s + 1) % intsplit);
+ return s64;
+}
+
#endif /* __TVH_PROP_H__ */
/******************************************************************************