From d1fdc390c99179d9b7d5a700fa7ae8b3843ff422 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Fri, 10 Sep 2010 10:54:06 +0300 Subject: [PATCH] Enabled partial content responses for HTTP protocol. Updated README and PO headers. --- HISTORY | 3 ++- Makefile | 2 +- README | 7 +++++++ common.h | 2 ++ iptv.c | 2 +- po/de_DE.po | 5 +++-- po/fi_FI.po | 5 +++-- po/fr_FR.po | 5 +++-- po/it_IT.po | 5 +++-- po/nl_NL.po | 5 +++-- po/ru_RU.po | 5 +++-- protocolhttp.c | 9 +++++---- 12 files changed, 36 insertions(+), 19 deletions(-) diff --git a/HISTORY b/HISTORY index 04efced..74ba3a6 100644 --- a/HISTORY +++ b/HISTORY @@ -142,7 +142,7 @@ VDR Plugin 'iptv' Revision History - Updated for vdr-1.7.15. -2010-xx-xx: Version 0.4.3 +2010-09-09: Version 0.4.3 - Renamed Sid scanner to section id scanner and added experimental Tid/Nid support into it. @@ -150,3 +150,4 @@ VDR Plugin 'iptv' Revision History - Fixed audio pid detection in pid scanner. - Changed ProvidesChannel() to set the need of detaching receivers due to VDR's channel selection mechanism. +- Enabled partial content responses for HTTP protocol. diff --git a/Makefile b/Makefile index 9981d13..a87323e 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ PLUGIN = iptv ### The version number of this plugin (taken from the main source file): -VERSION = $(shell grep 'static const char VERSION\[\] *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') +VERSION = $(shell grep 'const char VERSION\[\] *=' $(PLUGIN).c | awk '{ print $$5 }' | sed -e 's/[";]//g') ### The C++ compiler and options: diff --git a/README b/README index 9c3d748..c0d4bfd 100644 --- a/README +++ b/README @@ -154,6 +154,13 @@ Notes: script and the iptvstream-notrap.sh script should be used instead in these cases. +- If received MPEG-2 TS streams carry CA descriptors, you'll have to apply + "disable_ca_updates" patch to the VDR in order to get rid of "Channel not + available" messages. + +- EIT scanning functionality can be disabled for all IPTV channels by applying + the "disable_eitscan" patch to the VDR. + Acknowledgements: - The IPTV section filtering code is derived from Linux kernel. diff --git a/common.h b/common.h index 38638d1..6203a15 100644 --- a/common.h +++ b/common.h @@ -77,5 +77,7 @@ struct section_filter_table_type { extern const section_filter_table_type section_filter_table[SECTION_FILTER_TABLE_SIZE]; +extern const char VERSION[]; + #endif // __IPTV_COMMON_H diff --git a/iptv.c b/iptv.c index 0770527..89c43aa 100644 --- a/iptv.c +++ b/iptv.c @@ -16,7 +16,7 @@ #error "VDR-1.7.15 API version or greater is required!" #endif -static const char VERSION[] = "0.4.3"; + const char VERSION[] = "0.4.3"; static const char DESCRIPTION[] = trNOOP("Experience the IPTV"); class cPluginIptv : public cPlugin { diff --git a/po/de_DE.po b/po/de_DE.po index f0cb13c..b51a02a 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -7,10 +7,11 @@ msgid "" msgstr "" "Project-Id-Version: iptv 0.4.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-07-02 21:05+0300\n" -"PO-Revision-Date: 2007-10-29 21:19+0100\n" +"POT-Creation-Date: 2010-09-09 09:09+0300\n" +"PO-Revision-Date: 2010-09-09 09:09+0300\n" "Last-Translator: Tobias Grimm \n" "Language-Team: German\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/po/fi_FI.po b/po/fi_FI.po index b9215c2..d45cd3f 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -7,10 +7,11 @@ msgid "" msgstr "" "Project-Id-Version: iptv 0.4.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-07-02 21:05+0300\n" -"PO-Revision-Date: 2007-08-12 23:22+0300\n" +"POT-Creation-Date: 2010-09-09 09:09+0300\n" +"PO-Revision-Date: 2010-09-09 09:09+0300\n" "Last-Translator: Rolf Ahrenberg\n" "Language-Team: \n" +"Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/po/fr_FR.po b/po/fr_FR.po index bb80de5..b9d568e 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: iptv 0.4.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-07-02 21:05+0300\n" -"PO-Revision-Date: 2008-01-26 13:14+0100\n" +"POT-Creation-Date: 2010-09-09 09:09+0300\n" +"PO-Revision-Date: 2010-09-09 09:09+0300\n" "Last-Translator: NIVAL Michaƫl \n" "Language-Team: French\n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/po/it_IT.po b/po/it_IT.po index b5555a2..987c51b 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -7,10 +7,11 @@ msgid "" msgstr "" "Project-Id-Version: iptv 0.4.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-07-02 21:05+0300\n" -"PO-Revision-Date: 2008-07-13 03:28+0100\n" +"POT-Creation-Date: 2010-09-09 09:09+0300\n" +"PO-Revision-Date: 2010-09-09 09:09+0300\n" "Last-Translator: Diego Pierotto \n" "Language-Team: Italian\n" +"Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/po/nl_NL.po b/po/nl_NL.po index 9e5b80f..3bb7848 100644 --- a/po/nl_NL.po +++ b/po/nl_NL.po @@ -7,10 +7,11 @@ msgid "" msgstr "" "Project-Id-Version: iptv 0.4.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-07-02 21:05+0300\n" -"PO-Revision-Date: 2007-10-29 21:19+0100\n" +"POT-Creation-Date: 2010-09-09 09:09+0300\n" +"PO-Revision-Date: 2010-09-09 09:09+0300\n" "Last-Translator: Carel\n" "Language-Team: Dutch\n" +"Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/po/ru_RU.po b/po/ru_RU.po index a79a5d8..2b62e31 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -7,10 +7,11 @@ msgid "" msgstr "" "Project-Id-Version: iptv 0.4.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-07-02 21:05+0300\n" -"PO-Revision-Date: 2008-03-16 12:14+0100\n" +"POT-Creation-Date: 2010-09-09 09:09+0300\n" +"PO-Revision-Date: 2010-09-09 09:09+0300\n" "Last-Translator: Alexander Gross \n" "Language-Team: Russian \n" +"Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/protocolhttp.c b/protocolhttp.c index e2d76ef..5b7a8ec 100644 --- a/protocolhttp.c +++ b/protocolhttp.c @@ -85,10 +85,10 @@ bool cIptvProtocolHttp::Connect(void) // Formulate and send HTTP request cString buffer = cString::sprintf("GET %s HTTP/1.1\r\n" "Host: %s\r\n" - "User-Agent: vdr-iptv\r\n" + "User-Agent: vdr-%s/%s\r\n" "Range: bytes=0-\r\n" "Connection: Close\r\n" - "\r\n", streamPath, streamAddr); + "\r\n", streamPath, streamAddr, PLUGIN_NAME_I18N, VERSION); debug("Sending http request: %s\n", *buffer); ssize_t err2 = send(socketDesc, buffer, strlen(buffer), 0); @@ -189,8 +189,9 @@ bool cIptvProtocolHttp::ProcessHeaders(void) } else responseFound = true; - if (response != 200) { - error("%s\n", buf); + // Allow only 'OK' and 'Partial Content' + if ((response != 200) && (response != 206)) { + error("Invalid HTTP response (%d): %s\n", response, buf); return false; } }