Skip to content

Commit

Permalink
Merge pull request #143 from manuelm/Matrix
Browse files Browse the repository at this point in the history
[Matrix] Release version 19.1.0
  • Loading branch information
manuelm authored Apr 27, 2022
2 parents e2907ed + ecb9ed2 commit 069ca91
Show file tree
Hide file tree
Showing 21 changed files with 120 additions and 158 deletions.
6 changes: 3 additions & 3 deletions debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Format: http://dep.debian.net/deps/dep5
Upstream-Name: pvr.dvbviewer

Files: *
Copyright: 2005-2021 Team Kodi
2013-2021 Manuel Mausz
Copyright: 2005-2022 Team Kodi
2013-2022 Manuel Mausz
2012-2013 A600
License: GPL-2+
This package is free software; you can redistribute it and/or modify
Expand All @@ -24,7 +24,7 @@ License: GPL-2+


Files: debian/*
Copyright: 2020-2021 Team Kodi
Copyright: 2020-2022 Team Kodi
2015 Manuel Mausz <[email protected]>
2013 wsnipex <[email protected]>
License: GPL-2+
Expand Down
2 changes: 1 addition & 1 deletion pvr.dvbviewer/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.dvbviewer"
version="19.0.2"
version="19.1.0"
name="DVBViewer Client"
provider-name="Manuel Mausz">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
18 changes: 11 additions & 7 deletions pvr.dvbviewer/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
v19.1.0
- Require DMS 3.0.0 or higher
- Make sure to only reference non-hidden channels

v19.0.2
- Translations updates from Weblate
- be_by, ca_es, da_dk, es_mx, et_ee, lt_lt, nl_nl, tr_tr, zh_tw
- be_by, ca_es, da_dk, es_mx, et_ee, lt_lt, nl_nl, tr_tr, zh_tw

v19.0.1
- Translations updates from Weblate
- da_dk, eo, et_ee, ko_kr, pl_pl
- da_dk, eo, et_ee, ko_kr, pl_pl

v19.0.0
- Translations updates from Weblate
- Korean (ko_kr), Esperanto, Danish (da_dk)
- Also allow addon.xml content update by Weblate
- Korean (ko_kr), Esperanto, Danish (da_dk)
- Also allow addon.xml content update by Weblate
- Changed test builds to 'Kodi 19 Matrix'
- Increased version to 19.0.0
- With start of Kodi 20 Nexus, takes addon as major the same version number as Kodi.
This done to know easier to which Kodi the addon works.
- With start of Kodi 20 Nexus, takes addon as major the same version number as Kodi.
This done to know easier to which Kodi the addon works.

v7.3.3
- Translations updates from Weblate
- pl_pl
- pl_pl

v7.3.2
- Fix for extra assets tag in addon.xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,6 @@ msgctxt "#30510"
msgid "The time period cannot span more than 24 hours"
msgstr ""

msgctxt "#30511"
msgid "EDL support requires DVBViewer Media Server %s or higher"
msgstr ""

msgctxt "#30512"
msgid "PVR is running with guest permissions"
msgstr ""
Expand Down
71 changes: 25 additions & 46 deletions src/DvbData.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2021 Manuel Mausz
* Copyright (C) 2005-2022 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2022 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
Expand Down Expand Up @@ -188,8 +188,8 @@ PVR_ERROR Dvb::GetCapabilities(kodi::addon::PVRCapabilities& capabilities)
capabilities.SetSupportsChannelSettings(false);
capabilities.SetHandlesInputStream(true);
capabilities.SetHandlesDemuxing(false);
capabilities.SetSupportsRecordingPlayCount(false);
capabilities.SetSupportsLastPlayedPosition(false);
capabilities.SetSupportsRecordingPlayCount(true);
capabilities.SetSupportsLastPlayedPosition(true);
capabilities.SetSupportsRecordingEdl(true);
capabilities.SetSupportsRecordingsRename(false);
capabilities.SetSupportsRecordingsLifetimeChange(false);
Expand All @@ -199,12 +199,6 @@ PVR_ERROR Dvb::GetCapabilities(kodi::addon::PVRCapabilities& capabilities)
{
if (IsGuest())
capabilities.SetSupportsTimers(false);

if (HasKVStore())
{
capabilities.SetSupportsRecordingPlayCount(true);
capabilities.SetSupportsLastPlayedPosition(true);
}
}
return PVR_ERROR_NO_ERROR;
}
Expand Down Expand Up @@ -719,13 +713,10 @@ PVR_ERROR Dvb::GetRecordings(bool deleted,
recording.group = groups.emplace(group, 0).first;
++recording.group->second;

if (m_kvstore.IsSupported())
{
m_kvstore.Get<int>("recplaycount_" + recording.id,
recording.playCount, KVStore::Hint::FETCH_ALL);
m_kvstore.Get<int>("recplaypos_" + recording.id,
recording.lastPlayPosition, KVStore::Hint::FETCH_ALL);
}
m_kvstore.Get<int>("recplaycount_" + recording.id,
recording.playCount, KVStore::Hint::FETCH_ALL);
m_kvstore.Get<int>("recplaypos_" + recording.id,
recording.lastPlayPosition, KVStore::Hint::FETCH_ALL);

recordings.push_back(recording);
}
Expand Down Expand Up @@ -888,15 +879,6 @@ PVR_ERROR Dvb::GetRecordingEdl(const kodi::addon::PVRRecording& recinfo,
if (!IsConnected())
return PVR_ERROR_SERVER_ERROR;

if (m_backendVersion < DMS_VERSION_NUM(2, 1, 0, 0))
{
kodi::Log(ADDON_LOG_ERROR, "Backend server is too old. Disabling EDL support.");
kodi::QueueFormattedNotification(QUEUE_ERROR, kodi::GetLocalizedString(30511).c_str(),
DMS_VERSION_STR(2, 1, 0, 0));
m_settings.m_edl.enabled = false;
return PVR_ERROR_NOT_IMPLEMENTED;
}

std::unique_ptr<httpResponse> res = OpenFromAPI("api/sideload.html?rec=1&file=.edl"
"&fileid=%s", recinfo.GetRecordingId().c_str());
if (res->error)
Expand Down Expand Up @@ -945,8 +927,6 @@ PVR_ERROR Dvb::SetRecordingPlayCount(const kodi::addon::PVRRecording& recinfo,
{
if (!IsConnected())
return PVR_ERROR_SERVER_ERROR;
if (!HasKVStore())
return PVR_ERROR_NOT_IMPLEMENTED;

const std::string value = std::string("recplaycount_") + recinfo.GetRecordingId();
return m_kvstore.Set(value, count)
Expand All @@ -958,8 +938,6 @@ PVR_ERROR Dvb::SetRecordingLastPlayedPosition(
{
if (!IsConnected())
return PVR_ERROR_SERVER_ERROR;
if (!HasKVStore())
return PVR_ERROR_NOT_IMPLEMENTED;

const std::string value = std::string("recplaypos_") + recinfo.GetRecordingId();
return m_kvstore.Set<int>(value, lastplayedposition)
Expand All @@ -971,8 +949,6 @@ PVR_ERROR Dvb::GetRecordingLastPlayedPosition(
{
if (!IsConnected())
return PVR_ERROR_SERVER_ERROR;
if (!HasKVStore())
return PVR_ERROR_NOT_IMPLEMENTED;

const std::string value = std::string("recplaypos_") + recinfo.GetRecordingId();
return m_kvstore.Get<int>(value, position)
Expand Down Expand Up @@ -1219,8 +1195,7 @@ void Dvb::Process()
kodi::addon::CInstancePVRClient::TriggerRecordingUpdate();

/* actually the DMS should do this itself... */
if (m_kvstore.IsSupported())
m_kvstore.Save();
m_kvstore.Save();
}
}
}
Expand Down Expand Up @@ -1432,6 +1407,18 @@ bool Dvb::LoadChannels()
}
}

auto searchChannelByBackendId = [&](uint64_t backendId) -> DvbChannel* {
for (auto channel : m_channels)
{
bool found = (std::find(channel->backendIds.begin(),
channel->backendIds.end(), backendId)
!= channel->backendIds.end());
if (found)
return channel;
}
return nullptr;
};

if (m_settings.m_useFavourites && !m_settings.m_useFavouritesFile)
{
m_groups.clear();
Expand All @@ -1454,12 +1441,7 @@ bool Dvb::LoadChannels()
{
uint64_t backendId = 0;
xChannel->QueryValueAttribute<uint64_t>("ID", &backendId);
DvbChannel *channel = GetChannel([&](const DvbChannel *channel)
{
return (std::find(channel->backendIds.begin(),
channel->backendIds.end(), backendId)
!= channel->backendIds.end());
});
DvbChannel *channel = searchChannelByBackendId(backendId);
if (!channel)
{
kodi::Log(ADDON_LOG_INFO, "Favourites contains unresolvable channel: %s."
Expand Down Expand Up @@ -1559,12 +1541,7 @@ bool Dvb::LoadChannels()
channelName = ConvertToUtf8(channelName);
}

DvbChannel *channel = GetChannel([&](const DvbChannel *channel)
{
return (std::find(channel->backendIds.begin(),
channel->backendIds.end(), backendId)
!= channel->backendIds.end());
});
DvbChannel *channel = searchChannelByBackendId(backendId);
if (!channel)
{
const char *descr = (channelName.empty()) ? xEntry->GetText()
Expand Down Expand Up @@ -1628,6 +1605,8 @@ DvbChannel *Dvb::GetChannel(std::function<bool (const DvbChannel*)> func)
{
for (auto channel : m_channels)
{
if (channel->hidden)
continue;
if (func(channel))
return channel;
}
Expand Down
8 changes: 3 additions & 5 deletions src/DvbData.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2021 Manuel Mausz
* Copyright (C) 2005-2022 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2022 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
Expand All @@ -25,7 +25,7 @@
#include <thread>

// minimum version required
#define DMS_MIN_VERSION 1, 33, 2, 0
#define DMS_MIN_VERSION 3, 0, 0, 0

#define DMS_MIN_VERSION_NUM DMS_VERSION_NUM2(DMS_MIN_VERSION)
#define DMS_MIN_VERSION_STR DMS_VERSION_STR2(DMS_MIN_VERSION)
Expand Down Expand Up @@ -158,8 +158,6 @@ class Dvb
unsigned int GetBackendVersion();
bool IsGuest()
{ return m_isguest; }
bool HasKVStore()
{ return m_kvstore.IsSupported(); };
dvbviewer::Settings &GetSettings()
{ return m_settings; };

Expand Down
4 changes: 2 additions & 2 deletions src/IStreamReader.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2021 Manuel Mausz
* Copyright (C) 2005-2022 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2022 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
Expand Down
9 changes: 2 additions & 7 deletions src/KVStore.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2021 Manuel Mausz
* Copyright (C) 2005-2022 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2022 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
Expand All @@ -16,11 +16,6 @@

using namespace dvbviewer;

bool KVStore::IsSupported() const
{
return m_cli.GetBackendVersion() >= DMS_VERSION_NUM(2, 1, 2, 0);
}

bool KVStore::IsErrorState() const
{
return m_error;
Expand Down
5 changes: 2 additions & 3 deletions src/KVStore.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2021 Manuel Mausz
* Copyright (C) 2005-2022 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2022 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
Expand Down Expand Up @@ -48,7 +48,6 @@ class KVStore
{};
KVStore(const KVStore &kvstore) = delete;

bool IsSupported() const;
bool IsErrorState() const;
void Reset();

Expand Down
4 changes: 2 additions & 2 deletions src/RecordingReader.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2021 Manuel Mausz
* Copyright (C) 2005-2022 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2022 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
Expand Down
4 changes: 2 additions & 2 deletions src/RecordingReader.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2021 Manuel Mausz
* Copyright (C) 2005-2022 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2022 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
Expand Down
4 changes: 2 additions & 2 deletions src/Settings.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2021 Manuel Mausz
* Copyright (C) 2005-2022 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2022 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
Expand Down
4 changes: 2 additions & 2 deletions src/Settings.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2021 Manuel Mausz
* Copyright (C) 2005-2022 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2022 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
Expand Down
4 changes: 2 additions & 2 deletions src/StreamReader.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2021 Manuel Mausz
* Copyright (C) 2005-2022 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2022 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
Expand Down
4 changes: 2 additions & 2 deletions src/StreamReader.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2021 Manuel Mausz
* Copyright (C) 2005-2022 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2022 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
Expand Down
Loading

0 comments on commit 069ca91

Please sign in to comment.