Compare commits

..

3 Commits

Author SHA1 Message Date
Kai Sommerfeld
80ea2539ec Merge pull request #53 from AlwinEsch/Matrix-change
[Matrix] final Matrix change to correct test builds and take as Version 19.0.0
2021-09-19 10:33:29 +02:00
Alwin Esch
fcb500b4df increase version to 19.0.0 (see note below)
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.

For here now used by Kodi 19 Matrix.
2021-09-19 09:52:42 +02:00
Alwin Esch
43b1881487 change test builds to 'Kodi Matrix' 2021-09-19 09:52:19 +02:00
12 changed files with 47 additions and 37 deletions

View File

@@ -27,14 +27,14 @@ jobs:
env:
DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }}
run: |
if [[ $DEBIAN_BUILD == true ]]; then sudo add-apt-repository -y ppa:team-xbmc/xbmc-nightly; fi
if [[ $DEBIAN_BUILD == true ]]; then sudo add-apt-repository -y ppa:team-xbmc/ppa; fi
if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get update; fi
if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get install fakeroot; fi
- name: Checkout Kodi repo
uses: actions/checkout@v2
with:
repository: xbmc/xbmc
ref: master
ref: Matrix
path: xbmc
- name: Checkout pvr.argustv repo
uses: actions/checkout@v2
@@ -48,7 +48,7 @@ jobs:
run: |
if [[ $DEBIAN_BUILD != true ]]; then cd ${app_id} && mkdir -p build && cd build; fi
if [[ $DEBIAN_BUILD != true ]]; then cmake -DADDONS_TO_BUILD=${app_id} -DADDON_SRC_PREFIX=${{ github.workspace }} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/xbmc/addons -DPACKAGE_ZIP=1 ${{ github.workspace }}/xbmc/cmake/addons; fi
if [[ $DEBIAN_BUILD == true ]]; then wget https://raw.githubusercontent.com/xbmc/xbmc/master/xbmc/addons/kodi-dev-kit/tools/debian-addon-package-test.sh && chmod +x ./debian-addon-package-test.sh; fi
if [[ $DEBIAN_BUILD == true ]]; then wget https://raw.githubusercontent.com/xbmc/xbmc/Matrix/xbmc/addons/kodi-dev-kit/tools/debian-addon-package-test.sh && chmod +x ./debian-addon-package-test.sh; fi
if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get build-dep ${{ github.workspace }}/${app_id}; fi
- name: Build
env:

View File

@@ -133,7 +133,7 @@ jobs:
shell: bash
# Create a release at {steps.required-variables.outputs.branch}
# - tag and release name format: {steps.required-variables.outputs.version}-{steps.required-variables.outputs.branch} ie. 20.0.0-Nexus
# - tag and release name format: {steps.required-variables.outputs.version}-{steps.required-variables.outputs.branch} ie. 1.0.0-Matrix
# - release body: {steps.required-variables.outputs.changes}
- name: Create Release
id: create-release

View File

@@ -50,7 +50,7 @@ jobs:
working-directory: ${{ github.event.repository.name }}
# Create a release at {steps.required-variables.outputs.branch}
# - tag and release name format: {steps.required-variables.outputs.version}-{steps.required-variables.outputs.branch} ie. 20.0.0-Nexus
# - tag and release name format: {steps.required-variables.outputs.version}-{steps.required-variables.outputs.branch} ie. 1.0.0-Matrix
# - release body: {steps.required-variables.outputs.changes}
- name: Create Release
id: create-release

View File

@@ -31,7 +31,7 @@ matrix:
osx_image: xcode10.2
before_install:
- if [[ $DEBIAN_BUILD == true ]]; then sudo add-apt-repository -y ppa:team-xbmc/xbmc-nightly; fi
- if [[ $DEBIAN_BUILD == true ]]; then sudo add-apt-repository -y ppa:team-xbmc/ppa; fi
- if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get update; fi
- if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get install fakeroot; fi
@@ -41,12 +41,12 @@ before_install:
#
before_script:
- if [[ $DEBIAN_BUILD != true ]]; then cd $TRAVIS_BUILD_DIR/..; fi
- if [[ $DEBIAN_BUILD != true ]]; then git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git; fi
- if [[ $DEBIAN_BUILD != true ]]; then git clone --branch Matrix --depth=1 https://github.com/xbmc/xbmc.git; fi
- if [[ $DEBIAN_BUILD != true ]]; then cd ${app_id} && mkdir build && cd build; fi
- if [[ $DEBIAN_BUILD != true ]]; then mkdir -p definition/${app_id}; fi
- if [[ $DEBIAN_BUILD != true ]]; then echo ${app_id} $TRAVIS_BUILD_DIR $TRAVIS_COMMIT > definition/${app_id}/${app_id}.txt; fi
- if [[ $DEBIAN_BUILD != true ]]; then cmake -DADDONS_TO_BUILD=${app_id} -DADDON_SRC_PREFIX=$TRAVIS_BUILD_DIR/.. -DADDONS_DEFINITION_DIR=$TRAVIS_BUILD_DIR/build/definition -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/../xbmc/addons -DPACKAGE_ZIP=1 $TRAVIS_BUILD_DIR/../xbmc/cmake/addons; fi
- if [[ $DEBIAN_BUILD == true ]]; then wget https://raw.githubusercontent.com/xbmc/xbmc/master/xbmc/addons/kodi-dev-kit/tools/debian-addon-package-test.sh && chmod +x ./debian-addon-package-test.sh; fi
- if [[ $DEBIAN_BUILD == true ]]; then wget https://raw.githubusercontent.com/xbmc/xbmc/Matrix/xbmc/addons/kodi-dev-kit/tools/debian-addon-package-test.sh && chmod +x ./debian-addon-package-test.sh; fi
- if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get build-dep $TRAVIS_BUILD_DIR; fi
script:

2
Jenkinsfile vendored
View File

@@ -1 +1 @@
buildPlugin(version: "Nexus")
buildPlugin(version: "Matrix")

View File

@@ -3,7 +3,7 @@ Digital Devices [Octonet](http://www.digital-devices.eu/shop/de/netzwerk-tv/) PV
| Platform | Status |
|----------|--------|
| Linux + OS X (github) | [![Build and run tests](https://github.com/kodi-pvr/pvr.octonet/actions/workflows/build.yml/badge.svg?branch=Nexus)](https://github.com/kodi-pvr/pvr.octonet/actions/workflows/build.yml) |
| Linux + OS X (github) | [![Build and run tests](https://github.com/kodi-pvr/pvr.octonet/actions/workflows/build.yml/badge.svg?branch=Matrix)](https://github.com/kodi-pvr/pvr.octonet/actions/workflows/build.yml) |
| Windows (AppVeyor) | [![Build status](https://ci.appveyor.com/api/projects/status/m7dhmpmuf5coir5h?svg=true)](https://ci.appveyor.com/project/julianscheel/pvr-octonet) |
# Building
@@ -14,13 +14,13 @@ adjusted according to your OS (`/` vs `\`). We use Linux paths here as an exampl
Clone the `pvr.octonet` repository:
```
$ git clone https://github.com/DigitalDevices/pvr.octonet.git
$ git clone --branch Matrix https://github.com/DigitalDevices/pvr.octonet.git
```
Clone the Kodi repository:
```
$ git clone --branch master https://github.com/xbmc/xbmc.git
$ git clone --branch Matrix https://github.com/xbmc/xbmc.git
```
```

View File

@@ -23,7 +23,7 @@ environment:
build_script:
- cd ..
- git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git
- git clone --branch Matrix --depth=1 https://github.com/xbmc/xbmc.git
- cd %app_id%
- mkdir build
- cd build

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.octonet"
version="20.2.0"
version="19.0.0"
name="Digital Devices Octopus NET Client"
provider-name="digitaldevices">
<requires>@ADDON_DEPENDS@</requires>

View File

@@ -23,8 +23,9 @@
#endif
OctonetData::OctonetData(const std::string& octonetAddress,
const kodi::addon::IInstanceInfo& instance)
: kodi::addon::CInstancePVRClient(instance)
KODI_HANDLE instance,
const std::string& kodiVersion)
: kodi::addon::CInstancePVRClient(instance, kodiVersion)
{
m_serverAddress = octonetAddress;
m_channels.clear();
@@ -32,7 +33,7 @@ OctonetData::OctonetData(const std::string& octonetAddress,
m_lastEpgLoad = 0;
if (!LoadChannelList())
kodi::QueueFormattedNotification(QUEUE_ERROR, kodi::addon::GetLocalizedString(30001).c_str(),
kodi::QueueFormattedNotification(QUEUE_ERROR, kodi::GetLocalizedString(30001).c_str(),
m_channels.size());
/*

View File

@@ -43,11 +43,12 @@ struct OctonetGroup
std::vector<int> members;
};
class ATTR_DLL_LOCAL OctonetData : public kodi::addon::CInstancePVRClient
class ATTRIBUTE_HIDDEN OctonetData : public kodi::addon::CInstancePVRClient
{
public:
OctonetData(const std::string& octonetAddress,
const kodi::addon::IInstanceInfo& instance);
KODI_HANDLE instance,
const std::string& kodiVersion);
~OctonetData() override;
PVR_ERROR GetCapabilities(kodi::addon::PVRCapabilities& capabilities) override;

View File

@@ -13,41 +13,45 @@
#include "OctonetData.h"
ADDON_STATUS COctonetAddon::SetSetting(const std::string& settingName,
const kodi::addon::CSettingValue& settingValue)
const kodi::CSettingValue& settingValue)
{
/* For simplicity do a full addon restart whenever settings are
* changed */
return ADDON_STATUS_NEED_RESTART;
}
ADDON_STATUS COctonetAddon::CreateInstance(const kodi::addon::IInstanceInfo& instance,
KODI_ADDON_INSTANCE_HDL& hdl)
ADDON_STATUS COctonetAddon::CreateInstance(int instanceType,
const std::string& instanceID,
KODI_HANDLE instance,
const std::string& version,
KODI_HANDLE& addonInstance)
{
if (instance.IsType(ADDON_INSTANCE_PVR))
if (instanceType == ADDON_INSTANCE_PVR)
{
kodi::Log(ADDON_LOG_DEBUG, "%s: Creating octonet pvr instance", __func__);
/* IP or hostname of the octonet to be connected to */
std::string octonetAddress = kodi::addon::GetSettingString("octonetAddress");
std::string octonetAddress = kodi::GetSettingString("octonetAddress");
OctonetData* usedInstance = new OctonetData(octonetAddress, instance);
hdl = usedInstance;
OctonetData* usedInstance = new OctonetData(octonetAddress, instance, version);
addonInstance = usedInstance;
m_usedInstances.emplace(instance.GetID(), usedInstance);
m_usedInstances.emplace(instanceID, usedInstance);
return ADDON_STATUS_OK;
}
return ADDON_STATUS_UNKNOWN;
}
void COctonetAddon::DestroyInstance(const kodi::addon::IInstanceInfo& instance,
const KODI_ADDON_INSTANCE_HDL hdl)
void COctonetAddon::DestroyInstance(int instanceType,
const std::string& instanceID,
KODI_HANDLE addonInstance)
{
if (instance.IsType(ADDON_INSTANCE_PVR))
if (instanceType == ADDON_INSTANCE_PVR)
{
kodi::Log(ADDON_LOG_DEBUG, "%s: Destoying octonet pvr instance", __func__);
const auto& it = m_usedInstances.find(instance.GetID());
const auto& it = m_usedInstances.find(instanceID);
if (it != m_usedInstances.end())
{
m_usedInstances.erase(it);

View File

@@ -15,17 +15,21 @@
class OctonetData;
class ATTR_DLL_LOCAL COctonetAddon : public kodi::addon::CAddonBase
class ATTRIBUTE_HIDDEN COctonetAddon : public kodi::addon::CAddonBase
{
public:
COctonetAddon() = default;
ADDON_STATUS SetSetting(const std::string& settingName,
const kodi::addon::CSettingValue& settingValue) override;
ADDON_STATUS CreateInstance(const kodi::addon::IInstanceInfo& instance,
KODI_ADDON_INSTANCE_HDL& hdl) override;
void DestroyInstance(const kodi::addon::IInstanceInfo& instance,
const KODI_ADDON_INSTANCE_HDL hdl) override;
const kodi::CSettingValue& settingValue) override;
ADDON_STATUS CreateInstance(int instanceType,
const std::string& instanceID,
KODI_HANDLE instance,
const std::string& version,
KODI_HANDLE& addonInstance) override;
void DestroyInstance(int instanceType,
const std::string& instanceID,
KODI_HANDLE addonInstance) override;
private:
std::unordered_map<std::string, OctonetData*> m_usedInstances;