diff --git a/pvr.iptvsimple/addon.xml.in b/pvr.iptvsimple/addon.xml.in index d26e36b5..adebeec3 100644 --- a/pvr.iptvsimple/addon.xml.in +++ b/pvr.iptvsimple/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff --git a/pvr.iptvsimple/changelog.txt b/pvr.iptvsimple/changelog.txt index f153da49..2b1b261c 100644 --- a/pvr.iptvsimple/changelog.txt +++ b/pvr.iptvsimple/changelog.txt @@ -1,3 +1,9 @@ +v21.8.6 +- Always add mimetype for inputstream.adaptive +- Better handled user-agent header for inputstream.adaptive use cases +- Fix missing manifest user-agent header for inputstream.adaptive +- Add missing SmoothStreaming mimetype for inputstream.adaptive + v21.8.5 - Translations updates from Weblate - be_by, de_de, es_es, it_it, pt_br, sl_si, zh_cn diff --git a/src/iptvsimple/utilities/StreamUtils.cpp b/src/iptvsimple/utilities/StreamUtils.cpp index 76eddc79..cda87912 100644 --- a/src/iptvsimple/utilities/StreamUtils.cpp +++ b/src/iptvsimple/utilities/StreamUtils.cpp @@ -22,7 +22,15 @@ using namespace iptvsimple::utilities; void StreamUtils::SetAllStreamProperties(std::vector& properties, const iptvsimple::data::Channel& channel, const std::string& streamURL, bool isChannelURL, std::map& catchupProperties, std::shared_ptr& settings) { - if (ChannelSpecifiesInputstream(channel)) + // Check if the channel has explicitly set up the use of inputstream.adaptive, + // if so, the best behaviour for media services is: + // - Always add mimetype to prevent kodi core to make an HTTP HEADER requests + // this because in some cases services refuse this request and can also deny downloads + // - If requested by settings, always add the "user-agent" header to ISA properties + const bool isISAdaptiveSet = + channel.GetProperty(PVR_STREAM_PROPERTY_INPUTSTREAM) == INPUTSTREAM_ADAPTIVE; + + if (!isISAdaptiveSet && ChannelSpecifiesInputstream(channel)) { // Channel has an inputstream class set so we only set the stream URL properties.emplace_back(PVR_STREAM_PROPERTY_STREAMURL, streamURL); @@ -40,7 +48,7 @@ void StreamUtils::SetAllStreamProperties(std::vector