mirror of
				https://github.com/DigitalDevices/pvr.octonet.git
				synced 2025-03-01 10:53:09 +00:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
			20.3.0-Nex
			...
			19.0.0-Mat
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 80ea2539ec | ||
|  | fcb500b4df | ||
|  | 43b1881487 | 
							
								
								
									
										6
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							| @@ -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: | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/workflows/changelog-and-release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/changelog-and-release.yml
									
									
									
									
										vendored
									
									
								
							| @@ -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 | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							| @@ -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 | ||||
|   | ||||
| @@ -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
									
									
								
							
							
						
						
									
										2
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							| @@ -1 +1 @@ | ||||
| buildPlugin(version: "Nexus") | ||||
| buildPlugin(version: "Matrix") | ||||
|   | ||||
| @@ -3,7 +3,7 @@ Digital Devices [Octonet](http://www.digital-devices.eu/shop/de/netzwerk-tv/) PV | ||||
|  | ||||
| | 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) | | ||||
|  | ||||
| # 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 | ||||
| ``` | ||||
|  | ||||
| ``` | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <addon | ||||
|   id="pvr.octonet" | ||||
|   version="20.3.0" | ||||
|   version="19.0.0" | ||||
|   name="Digital Devices Octopus NET Client" | ||||
|   provider-name="digitaldevices"> | ||||
|   <requires>@ADDON_DEPENDS@</requires> | ||||
|   | ||||
| @@ -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()); | ||||
|  | ||||
|   /* | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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); | ||||
|   | ||||
							
								
								
									
										16
									
								
								src/addon.h
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								src/addon.h
									
									
									
									
									
								
							| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user