Skip to content

Commit

Permalink
Merge branch 'Leia' into Matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuehlma committed Dec 1, 2019
2 parents 3ac1ab9 + 93d5590 commit d18e040
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
2 changes: 1 addition & 1 deletion pvr.zattoo/addon.xml.in
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon id="pvr.zattoo"
version="19.2.2"
version="19.2.3"
name="Zattoo PVR Client"
provider-name="trummerjo,rbuehlma">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
4 changes: 4 additions & 0 deletions pvr.zattoo/changelog.txt
@@ -1,3 +1,5 @@
v19.2.3
- Support Dolby
v19.2.2
- Serialize sending EPG to Kodi.
v19.2.1
Expand All @@ -16,6 +18,8 @@ v19.0.1
- Load description from xmltv file
v19.0.0
- Update to PVR addon API v6.0.0
v18.1.6
- Support Dolby
v18.1.5
- Serialize sending EPG to Kodi.
v18.1.4
Expand Down
27 changes: 8 additions & 19 deletions src/ZatData.cpp
Expand Up @@ -808,15 +808,14 @@ std::string ZatData::GetChannelStreamUrl(int uniqueId, std::map<std::string, std
XBMC->Log(LOG_DEBUG, "Get live url for channel %s", channel->cid.c_str());

std::ostringstream dataStream;
dataStream << "cid=" << channel->cid << "&stream_type=" << GetStreamTypeString()
<< "&format=json";
dataStream << "enable_eac3=true&stream_type=" << GetStreamTypeString() << "&format=json";

if (m_recallEnabled)
{
dataStream << "&timeshift=" << m_maxRecallSeconds;
}

std::string jsonString = HttpPost(m_providerUrl + "/zapi/watch", dataStream.str());
std::string jsonString = HttpPost(m_providerUrl + "/zapi/watch/live/" + channel->cid, dataStream.str());

return GetStreamUrl(jsonString, additionalPropertiesOut);
}
Expand Down Expand Up @@ -1342,7 +1341,7 @@ std::string ZatData::GetRecordingStreamUrl(const std::string& recordingId, std::
XBMC->Log(LOG_DEBUG, "Get url for recording %s", recordingId.c_str());

std::ostringstream dataStream;
dataStream << "recording_id=" << recordingId << "&stream_type=" << GetStreamTypeString();
dataStream << "recording_id=" << recordingId << "&enable_eac3=true&stream_type=" << GetStreamTypeString();

std::string jsonString = HttpPost(m_providerUrl + "/zapi/watch", dataStream.str());

Expand Down Expand Up @@ -1433,29 +1432,19 @@ std::string ZatData::GetEpgTagUrl(const EPG_TAG *tag, std::map<std::string, std:
{
std::ostringstream dataStream;
ZatChannel channel = m_channelsByUid[tag->iUniqueChannelId];
char timeStart[sizeof "2011-10-08T07:07:09Z"];
struct tm tm
{ };
gmtime_r(&tag->startTime, &tm);
strftime(timeStart, sizeof timeStart, "%FT%TZ", &tm);
char timeEnd[sizeof "2011-10-08T07:07:09Z"];
gmtime_r(&tag->endTime, &tm);
strftime(timeEnd, sizeof timeEnd, "%FT%TZ", &tm);

std::string jsonString;

XBMC->Log(LOG_DEBUG, "Get timeshift url for channel %s at %s",
channel.cid.c_str(), timeStart);

XBMC->Log(LOG_DEBUG, "Get timeshift url for channel %s and program %i", channel.cid.c_str(), tag->iUniqueBroadcastId);

if (m_recallEnabled)
{
dataStream << "cid=" << channel.cid << "&start=" << timeStart << "&end="
<< timeEnd << "&stream_type=" << GetStreamTypeString();
jsonString = HttpPost(m_providerUrl + "/zapi/watch", dataStream.str());
dataStream << "enable_eac3=true&stream_type=" << GetStreamTypeString();
jsonString = HttpPost(m_providerUrl + "/zapi/watch/recall/" + channel.cid + "/" + std::to_string(tag->iUniqueBroadcastId), dataStream.str());
}
else if (m_selectiveRecallEnabled)
{
dataStream << "https_watch_urls=True" << "&stream_type=" << GetStreamTypeString();
dataStream << "https_watch_urls=True" << "&enable_eac3=true&stream_type=" << GetStreamTypeString();
jsonString = HttpPost(
m_providerUrl + "/zapi/watch/selective_recall/" + channel.cid + "/"
+ std::to_string(tag->iUniqueBroadcastId), dataStream.str());
Expand Down

0 comments on commit d18e040

Please sign in to comment.