Compare commits

..

16 Commits

Author SHA1 Message Date
Kai Sommerfeld
419998ff98 Merge pull request #66 from phunkyfish/fix-multiline-workflows-nexus
Fix github workflows Nexus
2024-02-25 22:32:00 +01:00
phunkyfish
2ff3523183 [github] fix workflows nexus 2024-02-22 20:21:43 +00:00
Kai Sommerfeld
bf39731a50 Merge pull request #63 from phunkyfish/update-workflow-nexus
Update deprecated github workflows nexus
2024-02-17 13:48:24 +01:00
phunkyfish
f62c9b9cd5 [github] Updated deprecated workflows actions 2024-02-13 17:17:13 +00:00
Kai Sommerfeld
656912b9f1 Merge pull request #61 from ksooo/ci-fixes-nexus
[Nexus] CI fixes/updates
2023-11-07 17:41:22 +01:00
ksooo
39dc489001 CI fixes/updates 2023-11-07 12:50:37 +01:00
Kai Sommerfeld
c2a3daa691 Merge pull request #57 from AlwinEsch/Nexus-changes
[Nexus] increase version to 20.3.0 (API related)
2022-09-16 16:01:46 +02:00
Alwin Esch
51cd4c4c90 increase version to 20.3.0 (API related) 2022-09-16 11:45:19 +02:00
Kai Sommerfeld
23b4f3eecf Merge pull request #56 from AlwinEsch/Nexus-change
[Nexus] API related update
2022-01-01 19:38:39 +01:00
Alwin Esch
2a4230567c increase version to 20.2.0 2022-01-01 19:19:06 +01:00
Alwin Esch
567232b5fb API related update 2021-12-28 13:27:10 +01:00
Kai Sommerfeld
fb17e25ef6 Merge pull request #55 from AlwinEsch/Nexus-change
[Nexus] Update for PVR API 8.0.0
2021-10-04 16:00:27 +02:00
Alwin Esch
41a9829054 increase version to 20.1.0 (API update related) 2021-09-20 05:30:34 +02:00
Kai Sommerfeld
046acf1636 Merge pull request #54 from AlwinEsch/Nexus-change
[Nexus] initial release change for new Kodi 20 Nexus version
2021-09-19 10:33:47 +02:00
Alwin Esch
df13aef650 increase version to 20.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 20 Nexus.
2021-09-19 09:56:56 +02:00
Alwin Esch
bacefe5194 change test builds to 'Kodi Nexus' 2021-09-19 09:56:27 +02:00
14 changed files with 72 additions and 175 deletions

View File

@@ -11,33 +11,26 @@ jobs:
matrix: matrix:
include: include:
- name: "Debian package test" - name: "Debian package test"
os: ubuntu-18.04 os: ubuntu-latest
CC: gcc CC: gcc
CXX: g++ CXX: g++
DEBIAN_BUILD: true DEBIAN_BUILD: true
- os: ubuntu-18.04
CC: gcc
CXX: g++
- os: ubuntu-18.04
CC: clang
CXX: clang++
- os: macos-10.15
steps: steps:
- name: Install needed ubuntu depends - name: Install needed ubuntu depends
env: env:
DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }} DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }}
run: | run: |
if [[ $DEBIAN_BUILD == true ]]; then sudo add-apt-repository -y ppa:team-xbmc/ppa; fi if [[ $DEBIAN_BUILD == true ]]; then sudo add-apt-repository -y ppa:team-xbmc/xbmc-nightly; fi
if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get update; fi if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get update; fi
if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get install fakeroot; fi if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get install fakeroot; fi
- name: Checkout Kodi repo - name: Checkout Kodi repo
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
repository: xbmc/xbmc repository: xbmc/xbmc
ref: Matrix ref: Nexus
path: xbmc path: xbmc
- name: Checkout pvr.argustv repo - name: Checkout add-on repo
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
path: ${{ env.app_id }} path: ${{ env.app_id }}
- name: Configure - name: Configure
@@ -48,7 +41,7 @@ jobs:
run: | run: |
if [[ $DEBIAN_BUILD != true ]]; then cd ${app_id} && mkdir -p build && cd build; fi 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 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/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 wget https://raw.githubusercontent.com/xbmc/xbmc/Nexus/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 if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get build-dep ${{ github.workspace }}/${app_id}; fi
- name: Build - name: Build
env: env:

View File

@@ -39,28 +39,29 @@ jobs:
# Checkout the current repository into a directory (repositories name) # Checkout the current repository into a directory (repositories name)
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
path: ${{ github.event.repository.name }} path: ${{ github.event.repository.name }}
# Checkout the required scripts from kodi-pvr/pvr-scripts into the 'scripts' directory # Checkout the required scripts from xbmc/binary-addon-scripts into the 'scripts' directory
- name: Checkout Scripts - name: Checkout Scripts
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
repository: kodi-pvr/pvr-scripts repository: xbmc/binary-addon-scripts
path: scripts path: scripts
# Install all dependencies required by the following steps # Install all dependencies required by the following steps
# - libxml2-utils, xmlstarlet: reading news and version from addon.xml.in # - libxml2-utils, xmlstarlet: reading news and version from addon.xml.in
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update
sudo apt-get install libxml2-utils xmlstarlet sudo apt-get install libxml2-utils xmlstarlet
# Setup python version 3.9 # Setup python version 3.9
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v5
with: with:
python-version: '3.9' python-version: '3.9'
@@ -84,6 +85,7 @@ jobs:
# - steps.required-variables.outputs.version: version element from addon.xml.in # - steps.required-variables.outputs.version: version element from addon.xml.in
# - steps.required-variables.outputs.branch: branch of the triggering ref # - steps.required-variables.outputs.branch: branch of the triggering ref
# - steps.required-variables.outputs.today: today's date in format '%Y-%m-%d' # - steps.required-variables.outputs.today: today's date in format '%Y-%m-%d'
# Note: we use a random EOF for 'changes' as is best practice for for multiline variables
- name: Get required variables - name: Get required variables
id: required-variables id: required-variables
run: | run: |
@@ -92,17 +94,15 @@ jobs:
then then
changes=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/extension/news)' | awk -v RS= 'NR==1') changes=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/extension/news)' | awk -v RS= 'NR==1')
fi fi
changes="${changes//'%'/'%25'}" EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
changes="${changes//$'\n'/'%0A'}" echo "changes<<$EOF" >> $GITHUB_OUTPUT
changes="${changes//$'\r'/'%0D'}" echo "$changes" >> $GITHUB_OUTPUT
changes="${changes//$'\\n'/'%0A'}" echo "$EOF" >> $GITHUB_OUTPUT
changes="${changes//$'\\r'/'%0D'}"
echo ::set-output name=changes::$changes
version=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/@version)') version=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/@version)')
echo ::set-output name=version::$version echo "version=$version" >> $GITHUB_OUTPUT
branch=$(echo ${GITHUB_REF#refs/heads/}) branch=$(echo ${GITHUB_REF#refs/heads/})
echo ::set-output name=branch::$branch echo "branch=$branch" >> $GITHUB_OUTPUT
echo ::set-output name=today::$(date +'%Y-%m-%d') echo "today=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
working-directory: ${{ github.event.repository.name }} working-directory: ${{ github.event.repository.name }}
# Create a commit of the incremented version and changelog, news changes # Create a commit of the incremented version and changelog, news changes
@@ -133,7 +133,7 @@ jobs:
shell: bash shell: bash
# Create a release at {steps.required-variables.outputs.branch} # 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. 1.0.0-Matrix # - tag and release name format: {steps.required-variables.outputs.version}-{steps.required-variables.outputs.branch} ie. 20.0.0-Nexus
# - release body: {steps.required-variables.outputs.changes} # - release body: {steps.required-variables.outputs.changes}
- name: Create Release - name: Create Release
id: create-release id: create-release

View File

@@ -15,20 +15,20 @@ jobs:
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
path: ${{ github.event.repository.name }} path: ${{ github.event.repository.name }}
- name: Checkout Scripts - name: Checkout Scripts
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
repository: xbmc/weblate-supplementary-scripts repository: xbmc/weblate-supplementary-scripts
path: scripts path: scripts
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v5
with: with:
python-version: '3.9' python-version: '3.9'
@@ -42,13 +42,14 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update
sudo apt-get install libxml2-utils xmlstarlet sudo apt-get install libxml2-utils xmlstarlet
- name: Get required variables - name: Get required variables
id: required-variables id: required-variables
run: | run: |
version=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/@version)') version=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/@version)')
echo ::set-output name=version::$version echo "version=$version" >> $GITHUB_OUTPUT
working-directory: ${{ github.event.repository.name }} working-directory: ${{ github.event.repository.name }}
- name: Create PR for incrementing add-on versions - name: Create PR for incrementing add-on versions

View File

@@ -14,7 +14,7 @@ jobs:
# Checkout the current repository into a directory (repositories name) # Checkout the current repository into a directory (repositories name)
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
path: ${{ github.event.repository.name }} path: ${{ github.event.repository.name }}
@@ -23,12 +23,14 @@ jobs:
# - libxml2-utils, xmlstarlet: reading news and version from addon.xml.in # - libxml2-utils, xmlstarlet: reading news and version from addon.xml.in
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update
sudo apt-get install libxml2-utils xmlstarlet sudo apt-get install libxml2-utils xmlstarlet
# Create the variables required by the following steps # Create the variables required by the following steps
# - steps.required-variables.outputs.changes: latest entry in the changelog.txt (if exists), or addon.xml.in news element # - steps.required-variables.outputs.changes: latest entry in the changelog.txt (if exists), or addon.xml.in news element
# - steps.required-variables.outputs.version: version element from addon.xml.in # - steps.required-variables.outputs.version: version element from addon.xml.in
# - steps.required-variables.outputs.branch: branch of the triggering ref # - steps.required-variables.outputs.branch: branch of the triggering ref
# Note: we use a random EOF for 'changes' as is best practice for for multiline variables
- name: Get required variables - name: Get required variables
id: required-variables id: required-variables
run: | run: |
@@ -37,20 +39,18 @@ jobs:
then then
changes=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/extension/news)' | awk -v RS= 'NR==1') changes=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/extension/news)' | awk -v RS= 'NR==1')
fi fi
changes="${changes//'%'/'%25'}" EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
changes="${changes//$'\n'/'%0A'}" echo "changes<<$EOF" >> $GITHUB_OUTPUT
changes="${changes//$'\r'/'%0D'}" echo "$changes" >> $GITHUB_OUTPUT
changes="${changes//$'\\n'/'%0A'}" echo "$EOF" >> $GITHUB_OUTPUT
changes="${changes//$'\\r'/'%0D'}"
echo ::set-output name=changes::$changes
version=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/@version)') version=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/@version)')
echo ::set-output name=version::$version echo "version=$version" >> $GITHUB_OUTPUT
branch=$(echo ${GITHUB_REF#refs/heads/}) branch=$(echo ${GITHUB_REF#refs/heads/})
echo ::set-output name=branch::$branch echo "branch=$branch" >> $GITHUB_OUTPUT
working-directory: ${{ github.event.repository.name }} working-directory: ${{ github.event.repository.name }}
# Create a release at {steps.required-variables.outputs.branch} # 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. 1.0.0-Matrix # - tag and release name format: {steps.required-variables.outputs.version}-{steps.required-variables.outputs.branch} ie. 20.0.0-Nexus
# - release body: {steps.required-variables.outputs.changes} # - release body: {steps.required-variables.outputs.changes}
- name: Create Release - name: Create Release
id: create-release id: create-release

View File

@@ -9,7 +9,7 @@ on:
jobs: jobs:
default: default:
if: github.repository == 'DigitalDevices/pvr.octonet' if: github.repository == 'kodi-pvr/pvr.octonet'
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@@ -21,18 +21,18 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
path: project path: project
- name: Checkout sync_addon_metadata_translations repository - name: Checkout sync_addon_metadata_translations repository
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
repository: xbmc/sync_addon_metadata_translations repository: xbmc/sync_addon_metadata_translations
path: sync_addon_metadata_translations path: sync_addon_metadata_translations
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2 uses: actions/setup-python@v5
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
@@ -55,3 +55,4 @@ jobs:
branch: amt-sync branch: amt-sync
delete-branch: true delete-branch: true
path: ./project path: ./project
reviewers: gade01

View File

@@ -1,54 +0,0 @@
language: cpp
#
# Define the builds to get up to date versions of cmake and gcc
#
env:
global:
- app_id=pvr.octonet
matrix:
include:
- os: linux
dist: bionic
sudo: required
compiler: gcc
- os: linux
dist: bionic
sudo: required
compiler: clang
- os: linux
dist: bionic
sudo: required
compiler: gcc
env: DEBIAN_BUILD=true
- os: linux
dist: focal
sudo: required
compiler: gcc
env: DEBIAN_BUILD=true
- os: osx
osx_image: xcode10.2
before_install:
- 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
#
# The addon source is automatically checked out in $TRAVIS_BUILD_DIR,
# we'll put the Kodi source on the same level
#
before_script:
- if [[ $DEBIAN_BUILD != true ]]; then cd $TRAVIS_BUILD_DIR/..; 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/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:
- if [[ $DEBIAN_BUILD != true ]]; then make; fi
- if [[ $DEBIAN_BUILD == true ]]; then ./debian-addon-package-test.sh $TRAVIS_BUILD_DIR; fi

2
Jenkinsfile vendored
View File

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

View File

@@ -1,10 +1,9 @@
# Octonet PVR # Octonet PVR
Digital Devices [Octonet](http://www.digital-devices.eu/shop/de/netzwerk-tv/) PVR client addon for [Kodi](http://kodi.tv) Digital Devices [Octonet](http://www.digital-devices.eu/shop/de/netzwerk-tv/) PVR client addon for [Kodi](http://kodi.tv)
| Platform | Status | [![License: GPL-2.0-or-later](https://img.shields.io/badge/License-GPL%20v2+-blue.svg)](LICENSE.md)
|----------|--------| [![Build and run tests](https://github.com/DigitalDevices/pvr.octonet/actions/workflows/build.yml/badge.svg?branch=Nexus)](https://github.com/DigitalDevices/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) | [![Build Status](https://jenkins.kodi.tv/view/Addons/job/DigitalDevices/job/pvr.octonet/job/Nexus/badge/icon)](https://jenkins.kodi.tv/blue/organizations/jenkins/DigitalDevices%2Fpvr.octonet/branches/)
| Windows (AppVeyor) | [![Build status](https://ci.appveyor.com/api/projects/status/m7dhmpmuf5coir5h?svg=true)](https://ci.appveyor.com/project/julianscheel/pvr-octonet) |
# Building # Building
@@ -14,13 +13,13 @@ adjusted according to your OS (`/` vs `\`). We use Linux paths here as an exampl
Clone the `pvr.octonet` repository: Clone the `pvr.octonet` repository:
``` ```
$ git clone --branch Matrix https://github.com/DigitalDevices/pvr.octonet.git $ git clone https://github.com/DigitalDevices/pvr.octonet.git
``` ```
Clone the Kodi repository: Clone the Kodi repository:
``` ```
$ git clone --branch Matrix https://github.com/xbmc/xbmc.git $ git clone --branch master https://github.com/xbmc/xbmc.git
``` ```
``` ```

View File

@@ -1,33 +0,0 @@
version: BuildNr.{build}
image: Visual Studio 2017
shallow_clone: true
clone_folder: c:\projects\pvr.octonet
environment:
app_id: pvr.octonet
matrix:
- GENERATOR: "Visual Studio 15"
CONFIG: Release
- GENERATOR: "Visual Studio 15 Win64"
CONFIG: Release
- GENERATOR: "Visual Studio 15 Win64"
CONFIG: Release
WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0"
- GENERATOR: "Visual Studio 15 ARM"
CONFIG: Release
WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0"
build_script:
- cd ..
- git clone --branch Matrix --depth=1 https://github.com/xbmc/xbmc.git
- cd %app_id%
- mkdir build
- cd build
- mkdir -p definition\%app_id%
- echo %app_id% %APPVEYOR_BUILD_FOLDER% %APPVEYOR_REPO_COMMIT% > definition\%app_id%\%app_id%.txt
- cmake -T host=x64 -G "%GENERATOR%" %WINSTORE% -DADDONS_TO_BUILD=%app_id% -DCMAKE_BUILD_TYPE=%CONFIG% -DADDONS_DEFINITION_DIR=%APPVEYOR_BUILD_FOLDER%/build/definition -DADDON_SRC_PREFIX=../.. -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons
- cmake --build . --config %CONFIG% --target %app_id%

View File

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

View File

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

View File

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

View File

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

View File

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