mirror of
https://github.com/DigitalDevices/pvr.octonet.git
synced 2025-03-01 10:53:09 +00:00
Compare commits
8 Commits
Matrix
...
20.2.0-Nex
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23b4f3eecf | ||
|
|
2a4230567c | ||
|
|
567232b5fb | ||
|
|
fb17e25ef6 | ||
|
|
41a9829054 | ||
|
|
046acf1636 | ||
|
|
df13aef650 | ||
|
|
bacefe5194 |
2
.github/workflows/changelog-and-release.yml
vendored
2
.github/workflows/changelog-and-release.yml
vendored
@@ -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
|
||||||
|
|||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -50,7 +50,7 @@ jobs:
|
|||||||
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
|
||||||
|
|||||||
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@@ -1 +1 @@
|
|||||||
buildPlugin(version: "Matrix")
|
buildPlugin(version: "Nexus")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Digital Devices [Octonet](http://www.digital-devices.eu/shop/de/netzwerk-tv/) PV
|
|||||||
|
|
||||||
| Platform | Status |
|
| Platform | Status |
|
||||||
|----------|--------|
|
|----------|--------|
|
||||||
| Linux + OS X (github) | [](https://github.com/kodi-pvr/pvr.octonet/actions/workflows/build.yml) |
|
| Linux + OS X (github) | [](https://github.com/kodi-pvr/pvr.octonet/actions/workflows/build.yml) |
|
||||||
| Windows (AppVeyor) | [](https://ci.appveyor.com/project/julianscheel/pvr-octonet) |
|
| Windows (AppVeyor) | [](https://ci.appveyor.com/project/julianscheel/pvr-octonet) |
|
||||||
|
|
||||||
# Building
|
# Building
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ environment:
|
|||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cd ..
|
- cd ..
|
||||||
- git clone --branch Matrix --depth=1 https://github.com/xbmc/xbmc.git
|
- git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git
|
||||||
- cd %app_id%
|
- cd %app_id%
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
|
|||||||
@@ -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="4.1.0"
|
version="20.2.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>
|
||||||
|
|||||||
@@ -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());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
16
src/addon.h
16
src/addon.h
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user