This project is closed and read-only.
Bug #3281
closedUse m3u-duration as channel number
Added by Adrien CLERC almost 11 years ago. Updated almost 11 years ago.
100%
Description
With Freebox TV bouquet, the m3u is providing channel number using the m3u duration attribute:
#EXTINF:2,France 2 HD rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=201&flavour=hd
This is non-standard, but since m3u-duration is already parsed by the new misc/m3u.c, could it be used by iptv_auto.c when creating channels?
Updated by Jaroslav Kysela almost 11 years ago
Actions
#1
- Category changed from Parsers to IPTV
Updated by Jaroslav Kysela almost 11 years ago
Actions
#2
- Assignee changed from Andreas Smas to Jaroslav Kysela
Updated by Jaroslav Kysela almost 11 years ago
Actions
#3
The channel numbers ends with ? Is something else in the .m3u list which can identify this?
Updated by Jelly Frog almost 11 years ago
Actions
#4
This or some other way to specify channel number in m3u would be nice.
Without knowing any C, wouldn't it work to do something like:
diff --git a/src/input/mpegts/iptv/iptv_auto.c b/src/input/mpegts/iptv/iptv_auto.c
index ff86d79..f289990 100644
--- a/src/input/mpegts/iptv/iptv_auto.c
+++ b/src/input/mpegts/iptv/iptv_auto.c
@@ -74,6 +74,8 @@ iptv_auto_network_process_m3u_item(iptv_network_t *in,
chnum += *total;
else
chnum += (int64_t)*total * CHANNEL_SPLIT;
+ } else {
+ chnum = htsmsg_get_s64_or_default(item, "m3u-duration", 0);
}
name = htsmsg_get_str(item, "m3u-name");
Updated by Jaroslav Kysela almost 11 years ago
Actions
#5
The source for duration is correct, but the above patch isn't. It won't allow to add a custom offset to the channel numbers. Perhaps, adding a string match for mafreebox.freebox.fr in URL might solve this. I would like to add rather a custom attribute line 'tvh_chnum' to the m3u parser, so users might create own lists with the correct information.
Updated by Adrien CLERC almost 11 years ago
Actions
#6
Either a tvh_chnum, or an option in the IPTV auto network to parse m3u duration as channel number.
The second solution involves zero modification of the m3u. However, having a simple script that modifies the original m3u is not a real issue. This m3u is modified at most twice a year, so updating it is not an issue.
I think that having a special rule for some hosts (like mafreebox.freebox.fr) is not a good idea. Or at least, it shouldn't be hardcoded in C code.
Updated by Jaroslav Kysela almost 11 years ago
Actions
#7
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:tvheadend|bafa61277c3a5ba7178bca05a2e2f702a013b246.
Updated by Jaroslav Kysela almost 11 years ago
Actions
#8
Updated by Adrien CLERC almost 11 years ago
Actions
#9
Thanks!
Updated by B C almost 11 years ago
Actions
#10
this is not working for me, with this syntax I don't even get the Service name into tvh.
and would it be possible to tag the channel based on another parameter?
Updated by B C almost 11 years ago
Actions
#11
ok, forgot putting tvh-chnum in "", so I have at least my names back. Still I cannot see any channel number
Updated by Jaroslav Kysela almost 11 years ago
Actions
#12
The parsing without "" is fixed in v4.1-964-g7173bba . I see the channel number in the mux settings.
Updated by Jaroslav Kysela almost 11 years ago
Actions
#13
Mapping works too. The IPTV channel numbers are not visible in the service grid.