mirror of
https://github.com/DigitalDevices/pvr.octonet.git
synced 2025-03-01 10:53:09 +00:00
Compare commits
33 Commits
4.0.0-1-Ma
...
Nexus
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
419998ff98 | ||
|
|
2ff3523183 | ||
|
|
bf39731a50 | ||
|
|
f62c9b9cd5 | ||
|
|
656912b9f1 | ||
|
|
39dc489001 | ||
|
|
c2a3daa691 | ||
|
|
51cd4c4c90 | ||
|
|
23b4f3eecf | ||
|
|
2a4230567c | ||
|
|
567232b5fb | ||
|
|
fb17e25ef6 | ||
|
|
41a9829054 | ||
|
|
046acf1636 | ||
|
|
df13aef650 | ||
|
|
bacefe5194 | ||
|
|
94d6b5fce7 | ||
|
|
07ef28ed18 | ||
|
|
2d5e55b05d | ||
|
|
7fea489b8a | ||
|
|
ae2525dc2b | ||
|
|
52f9a04da6 | ||
|
|
e00fc3b4ea | ||
|
|
012ff40c25 | ||
|
|
7ec048377c | ||
|
|
2325d7ff2d | ||
|
|
0e5c8d37f0 | ||
|
|
ee2648a2c2 | ||
|
|
524eb385b5 | ||
|
|
3b3e8e4a1a | ||
|
|
e76a37eb1d | ||
|
|
43b2467d35 | ||
|
|
18fc3a3339 |
54
.github/workflows/build.yml
vendored
Normal file
54
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
name: Build and run tests
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
app_id: pvr.octonet
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: "Debian package test"
|
||||
os: ubuntu-latest
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
DEBIAN_BUILD: true
|
||||
steps:
|
||||
- name: Install needed ubuntu depends
|
||||
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 apt-get update; fi
|
||||
if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get install fakeroot; fi
|
||||
- name: Checkout Kodi repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: xbmc/xbmc
|
||||
ref: Nexus
|
||||
path: xbmc
|
||||
- name: Checkout add-on repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: ${{ env.app_id }}
|
||||
- name: Configure
|
||||
env:
|
||||
CC: ${{ matrix.CC }}
|
||||
CXX: ${{ matrix.CXX }}
|
||||
DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }}
|
||||
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/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
|
||||
- name: Build
|
||||
env:
|
||||
CC: ${{ matrix.CC }}
|
||||
CXX: ${{ matrix.CXX }}
|
||||
DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }}
|
||||
run: |
|
||||
if [[ $DEBIAN_BUILD != true ]]; then cd ${app_id}/build; fi
|
||||
if [[ $DEBIAN_BUILD != true ]]; then make; fi
|
||||
if [[ $DEBIAN_BUILD == true ]]; then ./debian-addon-package-test.sh ${{ github.workspace }}/${app_id}; fi
|
||||
149
.github/workflows/changelog-and-release.yml
vendored
Normal file
149
.github/workflows/changelog-and-release.yml
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
name: Changelog and Release
|
||||
# Update the changelog and news(optionally), bump the version, and create a release
|
||||
#
|
||||
# The release is created on the given branch, release and tag name format will be <version>-<branch> and
|
||||
# the body of the release will be created from the changelog.txt or news element in the addon.xml.in
|
||||
#
|
||||
# options:
|
||||
# - version_type: 'minor' / 'micro' # whether to do a minor or micro version bump
|
||||
# - changelog_text: string to add to the changelog and news
|
||||
# - update_news: 'true' / 'false' # whether to update the news in the addon.xml.in
|
||||
# - add_date: 'true' / 'false' # Add date to version number in changelog and news. ie. v1.0.1 (2021-7-17)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version_type:
|
||||
description: 'Create a ''minor'' or ''micro'' release?'
|
||||
required: true
|
||||
default: 'minor'
|
||||
changelog_text:
|
||||
description: 'Input the changes you''d like to add to the changelogs. Your text should be encapsulated in "''s with line feeds represented by literal \n''s. ie. "This is the first change\nThis is the second change"'
|
||||
required: true
|
||||
default: ''
|
||||
update_news:
|
||||
description: 'Update news in addon.xml.in? [true|false]'
|
||||
required: true
|
||||
default: 'true'
|
||||
add_date:
|
||||
description: 'Add date to version number in changelog and news. ie. "v1.0.1 (2021-7-17)" [true|false]'
|
||||
required: true
|
||||
default: 'false'
|
||||
|
||||
jobs:
|
||||
default:
|
||||
runs-on: ubuntu-latest
|
||||
name: Changelog and Release
|
||||
|
||||
steps:
|
||||
|
||||
# Checkout the current repository into a directory (repositories name)
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
path: ${{ github.event.repository.name }}
|
||||
|
||||
# Checkout the required scripts from xbmc/binary-addon-scripts into the 'scripts' directory
|
||||
- name: Checkout Scripts
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
repository: xbmc/binary-addon-scripts
|
||||
path: scripts
|
||||
|
||||
# Install all dependencies required by the following steps
|
||||
# - libxml2-utils, xmlstarlet: reading news and version from addon.xml.in
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install libxml2-utils xmlstarlet
|
||||
|
||||
# Setup python version 3.9
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.9'
|
||||
|
||||
# Run the python script to increment the version, changelog and news
|
||||
- name: Increment version and update changelogs
|
||||
run: |
|
||||
arguments=
|
||||
if [[ ${{ github.event.inputs.update_news }} == true ]] ;
|
||||
then
|
||||
arguments=$(echo $arguments && echo --update-news)
|
||||
fi
|
||||
if [[ ${{ github.event.inputs.add_date }} == true ]] ;
|
||||
then
|
||||
arguments=$(echo $arguments && echo --add-date)
|
||||
fi
|
||||
python3 ../scripts/changelog_and_release.py ${{ github.event.inputs.version_type }} ${{ github.event.inputs.changelog_text }} $arguments
|
||||
working-directory: ${{ github.event.repository.name }}
|
||||
|
||||
# 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.version: version element from addon.xml.in
|
||||
# - steps.required-variables.outputs.branch: branch of the triggering ref
|
||||
# - 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
|
||||
id: required-variables
|
||||
run: |
|
||||
changes=$(cat "$(find . -name changelog.txt)" | awk -v RS= 'NR==1')
|
||||
if [ -z "$changes" ] ;
|
||||
then
|
||||
changes=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/extension/news)' | awk -v RS= 'NR==1')
|
||||
fi
|
||||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
|
||||
echo "changes<<$EOF" >> $GITHUB_OUTPUT
|
||||
echo "$changes" >> $GITHUB_OUTPUT
|
||||
echo "$EOF" >> $GITHUB_OUTPUT
|
||||
version=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/@version)')
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
branch=$(echo ${GITHUB_REF#refs/heads/})
|
||||
echo "branch=$branch" >> $GITHUB_OUTPUT
|
||||
echo "today=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
working-directory: ${{ github.event.repository.name }}
|
||||
|
||||
# Create a commit of the incremented version and changelog, news changes
|
||||
# Commit message (add_date=false): changelog and version v{steps.required-variables.outputs.version}
|
||||
# Commit message (add_date=true): changelog and version v{steps.required-variables.outputs.version} ({steps.required-variables.outputs.today})
|
||||
- name: Commit changes
|
||||
run: |
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
commit_message="changelog and version v${{ steps.required-variables.outputs.version }}"
|
||||
if [[ ${{ github.event.inputs.add_date }} == true ]] ;
|
||||
then
|
||||
commit_message="$commit_message (${{ steps.required-variables.outputs.today }})"
|
||||
fi
|
||||
git commit -m "$commit_message" -a
|
||||
working-directory: ${{ github.event.repository.name }}
|
||||
|
||||
# Push the commit(s) created above to the triggering branch
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
branch: ${{ github.ref }}
|
||||
directory: ${{ github.event.repository.name }}
|
||||
|
||||
# Sleep for 60 seconds to allow for any delays in the push
|
||||
- name: Sleep for 60 seconds
|
||||
run: sleep 60s
|
||||
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
|
||||
# - release body: {steps.required-variables.outputs.changes}
|
||||
- name: Create Release
|
||||
id: create-release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.required-variables.outputs.version }}-${{ steps.required-variables.outputs.branch }}
|
||||
release_name: ${{ steps.required-variables.outputs.version }}-${{ steps.required-variables.outputs.branch }}
|
||||
body: ${{ steps.required-variables.outputs.changes }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
commitish: ${{ steps.required-variables.outputs.branch }}
|
||||
63
.github/workflows/increment-version.yml
vendored
Normal file
63
.github/workflows/increment-version.yml
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
name: Increment version when languages are updated
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ Matrix, Nexus ]
|
||||
paths:
|
||||
- '**resource.language.**strings.po'
|
||||
|
||||
jobs:
|
||||
default:
|
||||
if: github.repository == 'DigitalDevices/pvr.octonet'
|
||||
runs-on: ubuntu-latest
|
||||
name: Increment add-on version when languages are updated
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
path: ${{ github.event.repository.name }}
|
||||
|
||||
- name: Checkout Scripts
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
repository: xbmc/weblate-supplementary-scripts
|
||||
path: scripts
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.9'
|
||||
|
||||
- name: Get changed files
|
||||
uses: trilom/file-changes-action@v1.2.4
|
||||
|
||||
- name: Increment add-on version
|
||||
run: |
|
||||
python3 ../scripts/binary/increment_version.py $HOME/files.json -c -n
|
||||
working-directory: ${{ github.event.repository.name }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install libxml2-utils xmlstarlet
|
||||
|
||||
- name: Get required variables
|
||||
id: required-variables
|
||||
run: |
|
||||
version=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/@version)')
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
working-directory: ${{ github.event.repository.name }}
|
||||
|
||||
- name: Create PR for incrementing add-on versions
|
||||
uses: peter-evans/create-pull-request@v3.10.0
|
||||
with:
|
||||
commit-message: Add-on version incremented to ${{ steps.required-variables.outputs.version }} from Weblate
|
||||
title: Add-on version incremented to ${{ steps.required-variables.outputs.version }} from Weblate
|
||||
body: Add-on version incremented triggered by ${{ github.sha }}
|
||||
branch: inc-ver
|
||||
delete-branch: true
|
||||
path: ./${{ github.event.repository.name }}
|
||||
66
.github/workflows/release.yml
vendored
Normal file
66
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
name: Make Release
|
||||
# Create a release on the given branch
|
||||
# Release and tag name format will be <version>-<branch>
|
||||
# The body of the release will be created from the changelog.txt or news element in the addon.xml.in
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
default:
|
||||
runs-on: ubuntu-latest
|
||||
name: Make Release
|
||||
|
||||
steps:
|
||||
|
||||
# Checkout the current repository into a directory (repositories name)
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
path: ${{ github.event.repository.name }}
|
||||
|
||||
# Install all dependencies required by the following steps
|
||||
# - libxml2-utils, xmlstarlet: reading news and version from addon.xml.in
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install libxml2-utils xmlstarlet
|
||||
|
||||
# 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.version: version element from addon.xml.in
|
||||
# - 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
|
||||
id: required-variables
|
||||
run: |
|
||||
changes=$(cat "$(find . -name changelog.txt)" | awk -v RS= 'NR==1')
|
||||
if [ -z "$changes" ] ;
|
||||
then
|
||||
changes=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/extension/news)' | awk -v RS= 'NR==1')
|
||||
fi
|
||||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
|
||||
echo "changes<<$EOF" >> $GITHUB_OUTPUT
|
||||
echo "$changes" >> $GITHUB_OUTPUT
|
||||
echo "$EOF" >> $GITHUB_OUTPUT
|
||||
version=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/@version)')
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
branch=$(echo ${GITHUB_REF#refs/heads/})
|
||||
echo "branch=$branch" >> $GITHUB_OUTPUT
|
||||
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
|
||||
# - release body: {steps.required-variables.outputs.changes}
|
||||
- name: Create Release
|
||||
id: create-release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.required-variables.outputs.version }}-${{ steps.required-variables.outputs.branch }}
|
||||
release_name: ${{ steps.required-variables.outputs.version }}-${{ steps.required-variables.outputs.branch }}
|
||||
body: ${{ steps.required-variables.outputs.changes }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
commitish: ${{ steps.required-variables.outputs.branch }}
|
||||
58
.github/workflows/sync-addon-metadata-translations.yml
vendored
Normal file
58
.github/workflows/sync-addon-metadata-translations.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: Sync addon metadata translations
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ Matrix, Nexus ]
|
||||
paths:
|
||||
- '**addon.xml.in'
|
||||
- '**resource.language.**strings.po'
|
||||
|
||||
jobs:
|
||||
default:
|
||||
if: github.repository == 'kodi-pvr/pvr.octonet'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: [ 3.9 ]
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: project
|
||||
|
||||
- name: Checkout sync_addon_metadata_translations repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: xbmc/sync_addon_metadata_translations
|
||||
path: sync_addon_metadata_translations
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install sync_addon_metadata_translations/
|
||||
|
||||
- name: Run sync-addon-metadata-translations
|
||||
run: |
|
||||
sync-addon-metadata-translations
|
||||
working-directory: ./project
|
||||
|
||||
- name: Create PR for sync-addon-metadata-translations changes
|
||||
uses: peter-evans/create-pull-request@v3.10.0
|
||||
with:
|
||||
commit-message: Sync of addon metadata translations
|
||||
title: Sync of addon metadata translations
|
||||
body: Sync of addon metadata translations triggered by ${{ github.sha }}
|
||||
branch: amt-sync
|
||||
delete-branch: true
|
||||
path: ./project
|
||||
reviewers: gade01
|
||||
54
.travis.yml
54
.travis.yml
@@ -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/xbmc-nightly; 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 master --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 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
2
Jenkinsfile
vendored
@@ -1 +1 @@
|
||||
buildPlugin(version: "Matrix")
|
||||
buildPlugin(version: "Nexus")
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
# Octonet PVR
|
||||
Digital Devices [Octonet](http://www.digital-devices.eu/shop/de/netzwerk-tv/) PVR client addon for [Kodi](http://kodi.tv)
|
||||
|
||||
| Platform | Status |
|
||||
|----------|--------|
|
||||
| Linux + OS X (Travis) | [](https://travis-ci.org/julianscheel/pvr.octonet) |
|
||||
| Windows (AppVeyor) | [](https://ci.appveyor.com/project/julianscheel/pvr-octonet) |
|
||||
[](LICENSE.md)
|
||||
[](https://github.com/DigitalDevices/pvr.octonet/actions/workflows/build.yml)
|
||||
[](https://jenkins.kodi.tv/blue/organizations/jenkins/DigitalDevices%2Fpvr.octonet/branches/)
|
||||
|
||||
# Building
|
||||
|
||||
|
||||
40
appveyor.yml
40
appveyor.yml
@@ -1,40 +0,0 @@
|
||||
version: BuildNr.{build}
|
||||
|
||||
init:
|
||||
- ps: $commit = $env:appveyor_repo_commit.SubString(0,7)
|
||||
- ps: $timestamp = $env:appveyor_repo_commit_timestamp.SubString(0,10)
|
||||
- ps: Update-AppveyorBuild -Version ("{0}-{1}-{2}" -f $env:appveyor_repo_branch, $commit, $timestamp)
|
||||
|
||||
# clone directory
|
||||
clone_folder: c:\projects\pvr.octonet
|
||||
|
||||
# fetch repository as zip archive
|
||||
shallow_clone: true # default is "false"
|
||||
|
||||
environment:
|
||||
ADDON: pvr.octonet
|
||||
|
||||
matrix:
|
||||
#- GENERATOR: "Visual Studio 14"
|
||||
# CONFIG: Debug
|
||||
|
||||
- GENERATOR: "Visual Studio 14"
|
||||
CONFIG: Release
|
||||
|
||||
artifacts:
|
||||
- path: build/install/
|
||||
name: pvr.octonet
|
||||
type: zip
|
||||
|
||||
build_script:
|
||||
- cd ..
|
||||
- set ROOT=%cd%
|
||||
- git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git
|
||||
- mkdir xbmc\cmake\addons\addons\pvr.octonet
|
||||
- echo pvr.octonet https://github.com/DigitalDevices/pvr.octonet master > xbmc\cmake\addons\addons\pvr.octonet\pvr.octonet.txt
|
||||
- cd %ADDON%
|
||||
- mkdir build
|
||||
- cd build
|
||||
# Must use absolute path for cmake to build depends correctly
|
||||
- cmake -G "%GENERATOR%" -DADDONS_TO_BUILD=%ADDON% -DCMAKE_BUILD_TYPE=%CONFIG% -DADDON_SRC_PREFIX=%ROOT% -DCMAKE_INSTALL_PREFIX=install -DPACKAGE_ZIP=1 %ROOT%\xbmc\cmake\addons
|
||||
- cmake --build . --config %CONFIG%
|
||||
4
debian/copyright
vendored
4
debian/copyright
vendored
@@ -5,7 +5,7 @@ Source: https://github.com/DigitalDevices/pvr.octonet
|
||||
Files: *
|
||||
Copyright: 2015-2016 Julian Scheel
|
||||
2015-2016 jusst technologies GmbH
|
||||
2005-2020 Team Kodi
|
||||
2005-2021 Team Kodi
|
||||
License: GPL-2+
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -24,7 +24,7 @@ License: GPL-2+
|
||||
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2020 Team Kodi
|
||||
Copyright: 2020-2021 Team Kodi
|
||||
2016 Julian Scheel <julian@jusst.de>
|
||||
2015 Jean-Luc Barriere
|
||||
2015 wsnipex <wsnipex@a1.net>
|
||||
|
||||
7
debian/rules
vendored
7
debian/rules
vendored
@@ -10,14 +10,11 @@
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
%:
|
||||
dh $@
|
||||
dh $@
|
||||
|
||||
override_dh_auto_configure:
|
||||
# USE_LTO breaks build
|
||||
dh_auto_configure -- -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1
|
||||
|
||||
override_dh_strip:
|
||||
dh_strip -pkodi-pvr-octonet --dbg-package=kodi-pvr-octonet-dbg
|
||||
dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=1
|
||||
|
||||
override_dh_installdocs:
|
||||
dh_installdocs --link-doc=kodi-pvr-octonet
|
||||
|
||||
2
debian/source/format
vendored
2
debian/source/format
vendored
@@ -1 +1 @@
|
||||
3.0 (quilt)
|
||||
3.0 (native)
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<addon
|
||||
id="pvr.octonet"
|
||||
version="4.0.0"
|
||||
name="Digital Devices Octopus NET Client"
|
||||
provider-name="digitaldevices">
|
||||
<requires>@ADDON_DEPENDS@</requires>
|
||||
<extension
|
||||
point="kodi.pvrclient"
|
||||
library_@PLATFORM@="@LIBRARY_FILENAME@"/>
|
||||
<extension point="xbmc.addon.metadata">
|
||||
<summary lang="de_DE">Kodi PVR Addon für Digital Devices Octopus NET Streams</summary>
|
||||
<summary lang="en_US">Kodi PVR Addon for Digital Devices Octopus NET Streams</summary>
|
||||
<platform>@PLATFORM@</platform>
|
||||
<license>GPL-2.0-or-later</license>
|
||||
<source>https://github.com/DigitalDevices/pvr.octonet</source>
|
||||
</extension>
|
||||
id="pvr.octonet"
|
||||
version="20.3.0"
|
||||
name="Digital Devices Octopus NET Client"
|
||||
provider-name="digitaldevices">
|
||||
<requires>@ADDON_DEPENDS@</requires>
|
||||
<extension
|
||||
point="kodi.pvrclient"
|
||||
library_@PLATFORM@="@LIBRARY_FILENAME@"/>
|
||||
<extension point="xbmc.addon.metadata">
|
||||
<platform>@PLATFORM@</platform>
|
||||
<license>GPL-2.0-or-later</license>
|
||||
<source>https://github.com/DigitalDevices/pvr.octonet</source>
|
||||
<news>
|
||||
</news>
|
||||
<summary lang="de_DE">Kodi PVR Addon für Digital Devices Octopus NET Streams</summary>
|
||||
<summary lang="en_GB">Kodi PVR Addon for Digital Devices Octopus NET Streams</summary>
|
||||
</extension>
|
||||
</addon>
|
||||
|
||||
@@ -5,17 +5,21 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: KODI Main\n"
|
||||
"Report-Msgid-Bugs-To: http://trac.kodi.tv/\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/DigitalDevices/pvr.octonet/issues\n"
|
||||
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: Kodi Translation Team\n"
|
||||
"Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/kodi-main/language/en_GB/)\n"
|
||||
"Language-Team: German (Germany) (https://kodi.weblate.cloud/projects/kodi-add-ons-pvr-clients/pvr-octonet/de_de/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: en_GB\n"
|
||||
"Language: de_DE\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
msgctxt "Addon Summary"
|
||||
msgid "Kodi PVR Addon for Digital Devices Octopus NET Streams"
|
||||
msgstr "Kodi PVR Addon für Digital Devices Octopus NET Streams"
|
||||
|
||||
msgctxt "#30000"
|
||||
msgid "Octonet Server Address"
|
||||
msgstr ""
|
||||
@@ -5,17 +5,21 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: KODI Main\n"
|
||||
"Report-Msgid-Bugs-To: http://trac.kodi.tv/\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/DigitalDevices/pvr.octonet/issues\n"
|
||||
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: Kodi Translation Team\n"
|
||||
"Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/kodi-main/language/en_GB/)\n"
|
||||
"Language-Team: English (United Kingdom) (https://kodi.weblate.cloud/projects/kodi-add-ons-pvr-clients/pvr-octonet/en_gb/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: en_GB\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
msgctxt "Addon Summary"
|
||||
msgid "Kodi PVR Addon for Digital Devices Octopus NET Streams"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30000"
|
||||
msgid "Octonet Server Address"
|
||||
msgstr ""
|
||||
|
||||
@@ -18,14 +18,13 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
|
||||
#define timegm _mkgmtime
|
||||
#endif
|
||||
|
||||
OctonetData::OctonetData(const std::string& octonetAddress,
|
||||
KODI_HANDLE instance,
|
||||
const std::string& kodiVersion)
|
||||
: kodi::addon::CInstancePVRClient(instance, kodiVersion)
|
||||
const kodi::addon::IInstanceInfo& instance)
|
||||
: kodi::addon::CInstancePVRClient(instance)
|
||||
{
|
||||
m_serverAddress = octonetAddress;
|
||||
m_channels.clear();
|
||||
@@ -33,7 +32,7 @@ OctonetData::OctonetData(const std::string& octonetAddress,
|
||||
m_lastEpgLoad = 0;
|
||||
|
||||
if (!LoadChannelList())
|
||||
kodi::QueueFormattedNotification(QUEUE_ERROR, kodi::GetLocalizedString(30001).c_str(),
|
||||
kodi::QueueFormattedNotification(QUEUE_ERROR, kodi::addon::GetLocalizedString(30001).c_str(),
|
||||
m_channels.size());
|
||||
|
||||
/*
|
||||
|
||||
@@ -43,12 +43,11 @@ struct OctonetGroup
|
||||
std::vector<int> members;
|
||||
};
|
||||
|
||||
class ATTRIBUTE_HIDDEN OctonetData : public kodi::addon::CInstancePVRClient
|
||||
class ATTR_DLL_LOCAL OctonetData : public kodi::addon::CInstancePVRClient
|
||||
{
|
||||
public:
|
||||
OctonetData(const std::string& octonetAddress,
|
||||
KODI_HANDLE instance,
|
||||
const std::string& kodiVersion);
|
||||
const kodi::addon::IInstanceInfo& instance);
|
||||
~OctonetData() override;
|
||||
|
||||
PVR_ERROR GetCapabilities(kodi::addon::PVRCapabilities& capabilities) override;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2020 Team Kodi
|
||||
* https://kodi.tv
|
||||
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
* See LICENSE.md for more information.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2020 Team Kodi
|
||||
* https://kodi.tv
|
||||
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
* See LICENSE.md for more information.
|
||||
|
||||
@@ -13,45 +13,41 @@
|
||||
#include "OctonetData.h"
|
||||
|
||||
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
|
||||
* changed */
|
||||
return ADDON_STATUS_NEED_RESTART;
|
||||
}
|
||||
|
||||
ADDON_STATUS COctonetAddon::CreateInstance(int instanceType,
|
||||
const std::string& instanceID,
|
||||
KODI_HANDLE instance,
|
||||
const std::string& version,
|
||||
KODI_HANDLE& addonInstance)
|
||||
ADDON_STATUS COctonetAddon::CreateInstance(const kodi::addon::IInstanceInfo& instance,
|
||||
KODI_ADDON_INSTANCE_HDL& hdl)
|
||||
{
|
||||
if (instanceType == ADDON_INSTANCE_PVR)
|
||||
if (instance.IsType(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::GetSettingString("octonetAddress");
|
||||
std::string octonetAddress = kodi::addon::GetSettingString("octonetAddress");
|
||||
|
||||
OctonetData* usedInstance = new OctonetData(octonetAddress, instance, version);
|
||||
addonInstance = usedInstance;
|
||||
OctonetData* usedInstance = new OctonetData(octonetAddress, instance);
|
||||
hdl = usedInstance;
|
||||
|
||||
m_usedInstances.emplace(instanceID, usedInstance);
|
||||
m_usedInstances.emplace(instance.GetID(), usedInstance);
|
||||
return ADDON_STATUS_OK;
|
||||
}
|
||||
|
||||
return ADDON_STATUS_UNKNOWN;
|
||||
}
|
||||
|
||||
void COctonetAddon::DestroyInstance(int instanceType,
|
||||
const std::string& instanceID,
|
||||
KODI_HANDLE addonInstance)
|
||||
void COctonetAddon::DestroyInstance(const kodi::addon::IInstanceInfo& instance,
|
||||
const KODI_ADDON_INSTANCE_HDL hdl)
|
||||
{
|
||||
if (instanceType == ADDON_INSTANCE_PVR)
|
||||
if (instance.IsType(ADDON_INSTANCE_PVR))
|
||||
{
|
||||
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())
|
||||
{
|
||||
m_usedInstances.erase(it);
|
||||
|
||||
16
src/addon.h
16
src/addon.h
@@ -15,21 +15,17 @@
|
||||
|
||||
class OctonetData;
|
||||
|
||||
class ATTRIBUTE_HIDDEN COctonetAddon : public kodi::addon::CAddonBase
|
||||
class ATTR_DLL_LOCAL COctonetAddon : public kodi::addon::CAddonBase
|
||||
{
|
||||
public:
|
||||
COctonetAddon() = default;
|
||||
|
||||
ADDON_STATUS SetSetting(const std::string& settingName,
|
||||
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;
|
||||
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;
|
||||
|
||||
private:
|
||||
std::unordered_map<std::string, OctonetData*> m_usedInstances;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2020 Team Kodi
|
||||
* https://kodi.tv
|
||||
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
* See LICENSE.md for more information.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2020 Team Kodi
|
||||
* https://kodi.tv
|
||||
* Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
* See LICENSE.md for more information.
|
||||
|
||||
Reference in New Issue
Block a user