Skip to content

Commit

Permalink
Merge pull request #87 from AlwinEsch/Matrix-change
Browse files Browse the repository at this point in the history
[Matrix] API change update / cleanups
  • Loading branch information
AlwinEsch committed Apr 24, 2020
2 parents 4bc6cf8 + 5b8db03 commit c967b8f
Show file tree
Hide file tree
Showing 22 changed files with 167 additions and 49 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,8 @@ obj-x86_64-linux-gnu/

# to prevent add if project code opened by Visual Studio over CMake file
.vs/

# General MacOS
.DS_Store
.AppleDouble
.LSOverride
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![License: GPL v2+](https://img.shields.io/badge/License-GPL%20v2+-blue.svg)](LICENSE.md)
[![License: GPL-2.0-or-later](https://img.shields.io/badge/License-GPL%20v2+-blue.svg)](LICENSE.md)
[![Build Status](https://travis-ci.org/kodi-pvr/pvr.dvbviewer.svg?branch=Matrix)](https://travis-ci.org/kodi-pvr/pvr.dvbviewer/branches)
[![Build Status](https://ci.appveyor.com/api/projects/status/github/manuelm/pvr.dvbviewer?svg=true)](https://ci.appveyor.com/project/manuelm/pvr.dvbviewer)
[![Build Status](https://jenkins.kodi.tv/view/Addons/job/kodi-pvr/job/pvr.dvbviewer/job/Matrix/badge/icon)](https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.dvbviewer/branches/)
Expand Down Expand Up @@ -28,7 +28,7 @@ the addon will be available as a system addon.

##### Useful links

* [DVBViewer PVR setup guide] (https://kodi.wiki/view/Add-on:DVBViewer_Client)
* [DVBViewer PVR user support] (https://forum.kodi.tv/forumdisplay.php?fid=219)
* [Kodi's PVR user support] (https://forum.kodi.tv/forumdisplay.php?fid=167)
* [Kodi's PVR development support] (https://forum.kodi.tv/forumdisplay.php?fid=136)
* [DVBViewer PVR setup guide](https://kodi.wiki/view/Add-on:DVBViewer_Client)
* [DVBViewer PVR user support](https://forum.kodi.tv/forumdisplay.php?fid=219)
* [Kodi's PVR user support](https://forum.kodi.tv/forumdisplay.php?fid=167)
* [Kodi's PVR development support](https://forum.kodi.tv/forumdisplay.php?fid=136)
5 changes: 4 additions & 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="4.1.6"
version="4.1.7"
name="DVBViewer Client"
provider-name="Manuel Mausz">
<requires>@ADDON_DEPENDS@</requires>
Expand Down Expand Up @@ -179,6 +179,9 @@
<disclaimer lang="zh_CN">作者不对录像失败、错误定时造成时间浪费或其它不良影响负责。</disclaimer>
<disclaimer lang="zh_TW">這是測試版軟體!其原創作者並無法對於以下情況負責,包含:錄影失敗,不正確的定時設定,多餘時數,或任何產生的其它不良影響...</disclaimer>
<platform>@PLATFORM@</platform>
<license>GPL-2.0-or-later</license>
<source>https://github.com/kodi-pvr/pvr.dvbviewer</source>
<forum>https://forum.kodi.tv/forumdisplay.php?fid=219</forum>
<assets>
<icon>icon.png</icon>
</assets>
Expand Down
6 changes: 6 additions & 0 deletions pvr.dvbviewer/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
4.1.7:
[updated] PVR API 6.4.0
[updated] Add license name, forum url and source url to addon.xml
[updated] Change source license to use SPDX
[updated] Minor cleanups

4.1.6:
[updated] PVR API 6.3.0

Expand Down
26 changes: 17 additions & 9 deletions src/DvbData.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#include "DvbData.h"
#include "client.h"
#include "LocalizedString.h"
Expand Down Expand Up @@ -707,7 +715,7 @@ bool Dvb::GetRecordingEdl(const PVR_RECORDING &recinfo, PVR_EDL_ENTRY edl[],
if (std::sscanf(buffer, "%f %f %u", &start, &stop, &type) < 2
|| type > PVR_EDL_TYPE_COMBREAK)
{
XBMC->Log(LOG_NOTICE, "Unable to parse EDL entry at line %zu. Skipping.",
XBMC->Log(LOG_INFO, "Unable to parse EDL entry at line %zu. Skipping.",
lineNumber);
continue;
}
Expand Down Expand Up @@ -945,7 +953,7 @@ Dvb::httpResponse Dvb::OpenFromAPI(const char* format, va_list args)
// NOTE: this doesn't work for now. see above
if (res.code >= 300)
{
XBMC->Log(LOG_NOTICE, "Endpoint %s returned non-successful status code %hu",
XBMC->Log(LOG_INFO, "Endpoint %s returned non-successful status code %hu",
url.c_str(), res.code);
XBMC->CloseFile(file);
return res;
Expand Down Expand Up @@ -1012,7 +1020,7 @@ bool Dvb::LoadChannels()
TiXmlElement *root = doc.RootElement();
if (!root->FirstChildElement("root"))
{
XBMC->Log(LOG_NOTICE, "Channel list is empty");
XBMC->Log(LOG_INFO, "Channel list is empty");
return true; // empty channel is fine
}

Expand All @@ -1031,7 +1039,7 @@ bool Dvb::LoadChannels()
// user wants to use remote favourites but doesn't have any defined
if (m_settings.m_useFavourites && !m_settings.m_useFavouritesFile && !hasFavourites)
{
XBMC->Log(LOG_NOTICE, "Favourites enabled but non defined");
XBMC->Log(LOG_INFO, "Favourites enabled but non defined");
XBMC->QueueNotification(QUEUE_ERROR, LocalizedString(30509).c_str());
return false; // empty favourites is an error
}
Expand Down Expand Up @@ -1126,7 +1134,7 @@ bool Dvb::LoadChannels()
});
if (!channel)
{
XBMC->Log(LOG_NOTICE, "Favourites contains unresolvable channel: %s."
XBMC->Log(LOG_INFO, "Favourites contains unresolvable channel: %s."
" Ignoring.", xChannel->Attribute("name"));
XBMC->QueueNotification(QUEUE_WARNING, LocalizedString(30508).c_str(),
xChannel->Attribute("name"));
Expand Down Expand Up @@ -1232,7 +1240,7 @@ bool Dvb::LoadChannels()
{
const char *descr = (channelName.empty()) ? xEntry->GetText()
: channelName.c_str();
XBMC->Log(LOG_NOTICE, "Favourites contains unresolvable channel: %s."
XBMC->Log(LOG_INFO, "Favourites contains unresolvable channel: %s."
" Ignoring.", descr);
XBMC->QueueNotification(QUEUE_WARNING, LocalizedString(30508).c_str(),
descr);
Expand Down Expand Up @@ -1318,15 +1326,15 @@ bool Dvb::CheckBackendVersion()
}

m_backendVersion = 0;
XBMC->Log(LOG_NOTICE, "Checking backend version...");
XBMC->Log(LOG_INFO, "Checking backend version...");
if (doc.RootElement()->QueryUnsignedAttribute("iver", &m_backendVersion)
!= TIXML_SUCCESS)
{
XBMC->Log(LOG_ERROR, "Unable to parse version");
SetConnectionState(PVR_CONNECTION_STATE_SERVER_MISMATCH);
return false;
}
XBMC->Log(LOG_NOTICE, "Version: %u / %u.%u.%u.%u", m_backendVersion,
XBMC->Log(LOG_INFO, "Version: %u / %u.%u.%u.%u", m_backendVersion,
m_backendVersion >> 24 & 0xFF, m_backendVersion >> 16 & 0xFF,
m_backendVersion >> 8 & 0xFF, m_backendVersion & 0xFF);

Expand Down Expand Up @@ -1393,7 +1401,7 @@ bool Dvb::UpdateBackendStatus(bool updateSettings)
std::string rights("");
XMLUtils::GetString(root, "rights", rights);
if ((m_isguest = (rights != "full")))
XBMC->Log(LOG_NOTICE, "Only guest permissions available!");
XBMC->Log(LOG_INFO, "Only guest permissions available!");

/* read some settings from backend */
m_settings.ReadFromBackend(*this);
Expand Down
8 changes: 8 additions & 0 deletions src/DvbData.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#pragma once

#include "KVStore.h"
Expand Down
8 changes: 8 additions & 0 deletions src/IStreamReader.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#pragma once

#include "kodi/libXBMC_addon.h"
Expand Down
8 changes: 8 additions & 0 deletions src/KVStore.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#include "KVStore.h"
#include "client.h"
#include "DvbData.h"
Expand Down
8 changes: 8 additions & 0 deletions src/KVStore.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#pragma once

#include "kodi/libXBMC_pvr.h"
Expand Down
8 changes: 8 additions & 0 deletions src/LocalizedString.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#pragma once

#include "client.h"
Expand Down
8 changes: 8 additions & 0 deletions src/RecordingReader.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#include "RecordingReader.h"
#include "client.h"

Expand Down
8 changes: 8 additions & 0 deletions src/RecordingReader.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#pragma once

#include "kodi/libXBMC_addon.h"
Expand Down
8 changes: 8 additions & 0 deletions src/Settings.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#include "Settings.h"
#include "client.h"
#include "DvbData.h"
Expand Down
8 changes: 8 additions & 0 deletions src/Settings.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#pragma once

#include "kodi/AddonBase.h"
Expand Down
8 changes: 8 additions & 0 deletions src/StreamReader.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#include "StreamReader.h"
#include "client.h"
#include "Settings.h"
Expand Down
8 changes: 8 additions & 0 deletions src/StreamReader.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#pragma once

#include "IStreamReader.h"
Expand Down
12 changes: 10 additions & 2 deletions src/Timers.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#include "Timers.h"
#include "client.h"
#include "DvbData.h"
Expand Down Expand Up @@ -518,7 +526,7 @@ Timers::Error Timers::ParseTimerFrom(const TiXmlElement *xml, unsigned int pos,
});
if (!timer.channel)
{
XBMC->Log(LOG_NOTICE, "Found timer for unknown channel (backendid=%"
XBMC->Log(LOG_INFO, "Found timer for unknown channel (backendid=%"
PRIu64 "). Ignoring.", backendId);
return CHANNEL_UNKNOWN;
}
Expand Down Expand Up @@ -844,7 +852,7 @@ Timers::Error Timers::ParseTimerFrom(const TiXmlElement *xml, unsigned int pos,
{ return channel->epgId == backendId; });
if (!timer.channel)
{
XBMC->Log(LOG_NOTICE, "Found timer for unknown channel (backendid=%"
XBMC->Log(LOG_INFO, "Found timer for unknown channel (backendid=%"
PRIu64 "). Ignoring.", backendId);
return CHANNEL_UNKNOWN;
}
Expand Down
8 changes: 8 additions & 0 deletions src/Timers.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#pragma once

#include "kodi/libXBMC_pvr.h"
Expand Down
8 changes: 8 additions & 0 deletions src/TimeshiftBuffer.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#include "TimeshiftBuffer.h"
#include "Settings.h"
#include "StreamReader.h"
Expand Down
8 changes: 8 additions & 0 deletions src/TimeshiftBuffer.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#pragma once

#include "IStreamReader.h"
Expand Down
20 changes: 4 additions & 16 deletions src/client.cpp
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
/*
* Copyright (C) 2005-2020 Team Kodi
* https://kodi.tv
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This Program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Kodi; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#include "client.h"
Expand Down
20 changes: 4 additions & 16 deletions src/client.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
/*
* Copyright (C) 2005-2020 Team Kodi
* https://kodi.tv
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This Program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Kodi; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
* Copyright (C) 2005-2020 Team Kodi (https://kodi.tv)
* Copyright (C) 2013-2020 Manuel Mausz
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSE.md for more information.
*/

#pragma once
Expand Down

0 comments on commit c967b8f

Please sign in to comment.