diff -pruN 19.0.1+ds1-1/azure-pipelines.yml 20.3.0+ds1-1/azure-pipelines.yml
--- 19.0.1+ds1-1/azure-pipelines.yml	2022-01-02 11:32:50.000000000 +0000
+++ 20.3.0+ds1-1/azure-pipelines.yml	2022-03-26 09:30:19.000000000 +0000
@@ -4,7 +4,7 @@ variables:
 trigger:
   branches:
     include:
-    - Matrix
+    - Nexus
     - releases/*
   paths:
     include:
@@ -46,7 +46,7 @@ jobs:
 
     - script: |
         cd ..
-        git clone --branch Matrix --depth=1 https://github.com/xbmc/xbmc.git kodi
+        git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git kodi
         cd $(Build.SourcesDirectory)
         mkdir build
         cd build
diff -pruN 19.0.1+ds1-1/build-install-mac.sh 20.3.0+ds1-1/build-install-mac.sh
--- 19.0.1+ds1-1/build-install-mac.sh	1970-01-01 00:00:00.000000000 +0000
+++ 20.3.0+ds1-1/build-install-mac.sh	2022-03-26 09:30:19.000000000 +0000
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+set -e
+
+if [ "$#" -ne 1 ] || ! [ -d "$1" ]; then
+  echo "Usage: $0 <XBMC-SRC-DIR>" >&2
+  exit 1
+fi
+
+if [[ "$OSTYPE" != "darwin"* ]]; then
+  echo "Error: Script only for use on MacOSX" >&2
+  exit 1
+fi
+
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+if [[ "$1" = /* ]]
+then
+  #absolute path
+  SCRIPT_DIR=""  
+else
+  #relative
+  SCRIPT_DIR="$SCRIPT_DIR/"
+fi
+
+BINARY_ADDONS_TARGET_DIR="$1/tools/depends/target/binary-addons"
+MACOSX_BINARY_ADDONS_TARGET_DIR=""
+KODI_ADDONS_DIR="$HOME/Library/Application Support/Kodi/addons"
+ADDON_NAME=`basename -s .git \`git config --get remote.origin.url\``
+
+if [ ! -d "$BINARY_ADDONS_TARGET_DIR" ]; then
+  echo "Error: Could not find binary addons directory at: $BINARY_ADDONS_TARGET_DIR" >&2
+  exit 1
+fi
+
+for DIR in "$BINARY_ADDONS_TARGET_DIR/"macosx*; do
+    if [ -d "${DIR}" ]; then
+	    MACOSX_BINARY_ADDONS_TARGET_DIR="${DIR}"
+      break
+    fi
+done
+
+if [ -z "$MACOSX_BINARY_ADDONS_TARGET_DIR" ]; then
+  echo "Error: Could not find binary addons build directory at: $BINARY_ADDONS_TARGET_DIR/macosx*" >&2
+  exit 1
+fi
+
+if [ ! -d "$KODI_ADDONS_DIR" ]; then
+  echo "Error: Kodi addons dir does not exist at: $KODI_ADDONS_DIR" >&2
+  exit 1
+fi
+
+cd "$MACOSX_BINARY_ADDONS_TARGET_DIR"
+make
+
+XBMC_BUILD_ADDON_INSTALL_DIR=$(cd "$SCRIPT_DIR$1/addons/$ADDON_NAME" 2> /dev/null && pwd -P)
+rm -rf "$KODI_ADDONS_DIR/$ADDON_NAME"
+echo "Removed previous addon build from: $KODI_ADDONS_DIR"
+cp -rf "$XBMC_BUILD_ADDON_INSTALL_DIR" "$KODI_ADDONS_DIR"
+echo "Copied new addon build to: $KODI_ADDONS_DIR"
diff -pruN 19.0.1+ds1-1/debian/changelog 20.3.0+ds1-1/debian/changelog
--- 19.0.1+ds1-1/debian/changelog	2022-03-21 17:48:47.000000000 +0000
+++ 20.3.0+ds1-1/debian/changelog	2022-08-04 09:54:37.000000000 +0000
@@ -1,3 +1,10 @@
+kodi-pvr-pctv (20.3.0+ds1-1) unstable; urgency=medium
+
+  * New upstream version 20.3.0+ds1
+  * Prepare for v20 in unstable
+
+ -- Vasyl Gello <vasek.gello@gmail.com>  Thu, 04 Aug 2022 09:54:37 +0000
+
 kodi-pvr-pctv (19.0.1+ds1-1) unstable; urgency=medium
 
   * New upstream version 19.0.1+ds1
diff -pruN 19.0.1+ds1-1/debian/control 20.3.0+ds1-1/debian/control
--- 19.0.1+ds1-1/debian/control	2022-03-21 17:48:47.000000000 +0000
+++ 20.3.0+ds1-1/debian/control	2022-08-04 09:54:37.000000000 +0000
@@ -4,10 +4,10 @@ Section: libs
 Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
 Uploaders: Vasyl Gello <vasek.gello@gmail.com>
 Build-Depends: debhelper-compat (= 13)
-Build-Depends-Arch: dh-sequence-kodiaddon (>= 2:19~),
+Build-Depends-Arch: dh-sequence-kodiaddon (>= 2:20~),
                cmake,
                libjsoncpp-dev
-Standards-Version: 4.6.0
+Standards-Version: 4.6.1
 Rules-Requires-Root: no
 Vcs-Browser: https://salsa.debian.org/multimedia-team/kodi-media-center/kodi-pvr-pctv
 Vcs-Git: https://salsa.debian.org/multimedia-team/kodi-media-center/kodi-pvr-pctv.git
diff -pruN 19.0.1+ds1-1/debian/copyright 20.3.0+ds1-1/debian/copyright
--- 19.0.1+ds1-1/debian/copyright	2021-01-20 07:39:43.000000000 +0000
+++ 20.3.0+ds1-1/debian/copyright	2022-08-04 09:54:37.000000000 +0000
@@ -4,14 +4,14 @@ Source: https://github.com/kodi-pvr/pvr.
 Files-Excluded: depends
 
 Files: *
-Copyright: 2005-2021 Team Kodi
+Copyright: 2005-2022 Team Kodi
  2010 Marcel Groothuis
  2011 Pulse-Eight
 License: GPL-2+
 
 Files: debian/*
 Copyright: 2016 Christian Marillat <marillat@deb-multimedia.org>
-           2020-2021 Vasyl Gello <vasek.gello@gmail.com>
+           2020-2022 Vasyl Gello <vasek.gello@gmail.com>
 License: GPL-2+
 
 License: GPL-2+
diff -pruN 19.0.1+ds1-1/debian/watch 20.3.0+ds1-1/debian/watch
--- 19.0.1+ds1-1/debian/watch	2021-08-26 10:34:10.000000000 +0000
+++ 20.3.0+ds1-1/debian/watch	2022-08-04 09:54:37.000000000 +0000
@@ -5,4 +5,4 @@ opts="repack, \
       repacksuffix=+ds1, \
       dversionmangle=auto" \
 https://github.com/kodi-pvr/pvr.pctv/releases \
-/kodi-pvr/pvr.pctv/archive/refs/tags/?(\d\S*)-Matrix\.tar\.gz
+/kodi-pvr/pvr.pctv/archive/refs/tags/?(\d\S*)-Nexus\.tar\.gz
diff -pruN 19.0.1+ds1-1/.github/workflows/build.yml 20.3.0+ds1-1/.github/workflows/build.yml
--- 19.0.1+ds1-1/.github/workflows/build.yml	2022-01-02 11:32:50.000000000 +0000
+++ 20.3.0+ds1-1/.github/workflows/build.yml	2022-03-26 09:30:19.000000000 +0000
@@ -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/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 install fakeroot; fi
     - name: Checkout Kodi repo
       uses: actions/checkout@v2
       with:
         repository: xbmc/xbmc
-        ref: Matrix
+        ref: master
         path: xbmc
     - name: Checkout pvr.pctv 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/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/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 ${{ github.workspace }}/${app_id}; fi
     - name: Build
       env:
diff -pruN 19.0.1+ds1-1/.github/workflows/changelog-and-release.yml 20.3.0+ds1-1/.github/workflows/changelog-and-release.yml
--- 19.0.1+ds1-1/.github/workflows/changelog-and-release.yml	2022-01-02 11:32:50.000000000 +0000
+++ 20.3.0+ds1-1/.github/workflows/changelog-and-release.yml	2022-03-26 09:30:19.000000000 +0000
@@ -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. 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}
       - name: Create Release
         id: create-release
diff -pruN 19.0.1+ds1-1/.github/workflows/release.yml 20.3.0+ds1-1/.github/workflows/release.yml
--- 19.0.1+ds1-1/.github/workflows/release.yml	2022-01-02 11:32:50.000000000 +0000
+++ 20.3.0+ds1-1/.github/workflows/release.yml	2022-03-26 09:30:19.000000000 +0000
@@ -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. 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}
       - name: Create Release
         id: create-release
diff -pruN 19.0.1+ds1-1/Jenkinsfile 20.3.0+ds1-1/Jenkinsfile
--- 19.0.1+ds1-1/Jenkinsfile	2022-01-02 11:32:50.000000000 +0000
+++ 20.3.0+ds1-1/Jenkinsfile	2022-03-26 09:30:19.000000000 +0000
@@ -1 +1 @@
-buildPlugin(version: "Matrix")
+buildPlugin(version: "Nexus")
diff -pruN 19.0.1+ds1-1/pvr.pctv/addon.xml.in 20.3.0+ds1-1/pvr.pctv/addon.xml.in
--- 19.0.1+ds1-1/pvr.pctv/addon.xml.in	2022-01-02 11:32:50.000000000 +0000
+++ 20.3.0+ds1-1/pvr.pctv/addon.xml.in	2022-03-26 09:30:19.000000000 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <addon
   id="pvr.pctv"
-  version="19.0.1"
+  version="20.3.0"
   name="PCTV Systems Client"
   provider-name="PCTV Systems">
   <requires>@ADDON_DEPENDS@</requires>
diff -pruN 19.0.1+ds1-1/pvr.pctv/changelog.txt 20.3.0+ds1-1/pvr.pctv/changelog.txt
--- 19.0.1+ds1-1/pvr.pctv/changelog.txt	2022-01-02 11:32:50.000000000 +0000
+++ 20.3.0+ds1-1/pvr.pctv/changelog.txt	2022-03-26 09:30:19.000000000 +0000
@@ -1,13 +1,21 @@
-v19.0.1
-- Translations updates from Weblate
-	- da_dk, es_mx, ko_kr, pl_pl, ru_ru
+v20.3.0
+- Add setting to force MIME Types to MpegTS or use another custom type
+- Update help strings used in settings
+- Add build helper script for mac
+
+v20.2.0
+- Translation updates by Weblate
+- Kodi main API update to version 2.0.0
+
+v20.1.0
+￼- Kodi PVR API to 8.0.0
 
-v19.0.0
+v20.0.0
 - Translations updates from Weblate
   - Korean (ko_kr), Russian (ru_ru), Polish (pl_pl) and Danish (da_dk)
   - To allow also addon.xml content update by Weblate
-- Changed test builds to 'Kodi 19 Matrix'
-- Increased version to 19.0.0
+- Changed test builds to 'Kodi 20 Nexus'
+- Increased version to 20.0.0
   - 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.
 
diff -pruN 19.0.1+ds1-1/pvr.pctv/resources/language/resource.language.en_gb/strings.po 20.3.0+ds1-1/pvr.pctv/resources/language/resource.language.en_gb/strings.po
--- 19.0.1+ds1-1/pvr.pctv/resources/language/resource.language.en_gb/strings.po	2022-01-02 11:32:50.000000000 +0000
+++ 20.3.0+ds1-1/pvr.pctv/resources/language/resource.language.en_gb/strings.po	2022-03-26 09:30:19.000000000 +0000
@@ -40,6 +40,14 @@ msgctxt "#30002"
 msgid "PIN"
 msgstr ""
 
+msgctxt "#30003"
+msgid "Use MpegTS MIME Type"
+msgstr ""
+
+msgctxt "#30004"
+msgid "Default MIME Type"
+msgstr ""
+
 #empty strings from id 30003 to 30009
 
 msgctxt "#30010"
@@ -99,3 +107,37 @@ msgstr ""
 msgctxt "#30107"
 msgid "8500 Kbps"
 msgstr ""
+
+#empty strings from id 30108 to 30600
+
+msgctxt "#30601"
+msgid "The host name or IP address used to connect to the device."
+msgstr ""
+
+msgctxt "#30602"
+msgid "The port used to connect to the device."
+msgstr ""
+
+msgctxt "#30603"
+msgid "If enabled a PIN will be used when connecting to the device."
+msgstr ""
+
+msgctxt "#30604"
+msgid "The PIN used when connecting to the device."
+msgstr ""
+
+msgctxt "#30605"
+msgid "Always use MPEG TS as the default MIME Type. Useful for some tuners when the type of stream can't easily be determined."
+msgstr ""
+
+msgctxt "#30606"
+msgid "Use this MIME Type as the default for all streams. Leave blank if Kodi should determine the stream type itself."
+msgstr ""
+
+msgctxt "#30607"
+msgid "If enabled the stream will be transcoded."
+msgstr ""
+
+msgctxt "#30608"
+msgid "The bitrate to use for transcoding."
+msgstr ""
diff -pruN 19.0.1+ds1-1/pvr.pctv/resources/settings.xml 20.3.0+ds1-1/pvr.pctv/resources/settings.xml
--- 19.0.1+ds1-1/pvr.pctv/resources/settings.xml	2022-01-02 11:32:50.000000000 +0000
+++ 20.3.0+ds1-1/pvr.pctv/resources/settings.xml	2022-03-26 09:30:19.000000000 +0000
@@ -3,12 +3,12 @@
   <section id="pvr.pctv">
     <category id="general" label="30100" help="-1">
       <group id="1" label="-1">
-        <setting id="host" type="string" label="30000">
+        <setting id="host" type="string" label="30000" help="30601">
           <level>0</level>
           <default>192.168.1.20</default>
           <control type="edit" format="string" />
         </setting>
-        <setting id="webport" type="integer" label="30001">
+        <setting id="webport" type="integer" label="30001" help="30602">
           <level>0</level>
           <default>80</default>
           <constraints>
@@ -18,12 +18,12 @@
           </constraints>
           <control type="edit" format="integer" />
         </setting>
-        <setting id="usepin" type="boolean" label="30021">
+        <setting id="usepin" type="boolean" label="30021" help="30603">
           <level>0</level>
           <default>false</default>
           <control type="toggle" />
         </setting>
-        <setting id="pin" type="integer" label="30002">
+        <setting id="pin" type="integer" parent="usepin" label="30002" help="30604">
           <level>0</level>
           <default>0000</default>
           <constraints>
@@ -34,14 +34,30 @@
           </dependencies>
           <control type="edit" format="integer" />
         </setting>
+        <setting id="usempegts" type="boolean" label="30003" help="30605">
+          <level>0</level>
+          <default>false</default>
+          <control type="toggle" />
+        </setting>
+        <setting id="mimetype" type="string" parent="usempegts" label="30004" help="30606">
+          <level>0</level>
+          <default></default>
+          <constraints>
+            <allowempty>true</allowempty>
+          </constraints>
+          <dependencies>
+            <dependency type="enable" setting="usempegts">false</dependency>
+          </dependencies>
+          <control type="edit" format="string" />
+        </setting>
       </group>
       <group id="1" label="-1">
-        <setting id="transcode" type="boolean" label="30020">
+        <setting id="transcode" type="boolean" label="30020" help="30607">
           <level>0</level>
           <default>false</default>
           <control type="toggle" />
         </setting>
-        <setting id="bitrate" type="integer" label="30030">
+        <setting id="bitrate" type="integer" parent="transcode" label="30030" help="30608">
           <level>0</level>
           <default>1200</default>
           <constraints>
diff -pruN 19.0.1+ds1-1/README.md 20.3.0+ds1-1/README.md
--- 19.0.1+ds1-1/README.md	2022-01-02 11:32:50.000000000 +0000
+++ 20.3.0+ds1-1/README.md	2022-03-26 09:30:19.000000000 +0000
@@ -1,7 +1,7 @@
 [![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/kodi-pvr/pvr.pctv/actions/workflows/build.yml/badge.svg?branch=Matrix)](https://github.com/kodi-pvr/pvr.pctv/actions/workflows/build.yml)
-[![Build Status](https://dev.azure.com/teamkodi/kodi-pvr/_apis/build/status/kodi-pvr.pvr.pctv?branchName=Matrix)](https://dev.azure.com/teamkodi/kodi-pvr/_build/latest?definitionId=66&branchName=Matrix)
-[![Build Status](https://jenkins.kodi.tv/view/Addons/job/kodi-pvr/job/pvr.pctv/job/Matrix/badge/icon)](https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.pctv/branches/)
+[![Build and run tests](https://github.com/kodi-pvr/pvr.pctv/actions/workflows/build.yml/badge.svg?branch=Nexus)](https://github.com/kodi-pvr/pvr.pctv/actions/workflows/build.yml)
+[![Build Status](https://dev.azure.com/teamkodi/kodi-pvr/_apis/build/status/kodi-pvr.pvr.pctv?branchName=Nexus)](https://dev.azure.com/teamkodi/kodi-pvr/_build/latest?definitionId=66&branchName=Nexus)
+[![Build Status](https://jenkins.kodi.tv/view/Addons/job/kodi-pvr/job/pvr.pctv/job/Nexus/badge/icon)](https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.pctv/branches/)
 [![Coverity Scan Build Status](https://scan.coverity.com/projects/5120/badge.svg)](https://scan.coverity.com/projects/5120)
 
 # PCTV PVR
@@ -11,8 +11,8 @@ PCTV PVR client addon for [Kodi](https:/
 
 ### Linux
 
-1. `git clone --branch Matrix https://github.com/xbmc/xbmc.git`
-2. `git clone --branch Matrix https://github.com/kodi-pvr/pvr.pctv.git`
+1. `git clone --branch master https://github.com/xbmc/xbmc.git`
+2. `git clone https://github.com/kodi-pvr/pvr.pctv.git`
 3. `cd pvr.pctv && mkdir build && cd build`
 4. `cmake -DADDONS_TO_BUILD=pvr.pctv -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons`
 5. `make`
diff -pruN 19.0.1+ds1-1/src/addon.cpp 20.3.0+ds1-1/src/addon.cpp
--- 19.0.1+ds1-1/src/addon.cpp	2022-01-02 11:32:50.000000000 +0000
+++ 20.3.0+ds1-1/src/addon.cpp	2022-03-26 09:30:19.000000000 +0000
@@ -15,32 +15,35 @@
 
 using kodi::tools::StringUtils;
 
-ADDON_STATUS CPCTVAddon::CreateInstance(int instanceType,
-                                        const std::string& instanceID,
-                                        KODI_HANDLE instance,
-                                        const std::string& version,
-                                        KODI_HANDLE& addonInstance)
+ADDON_STATUS CPCTVAddon::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 PCTV Systems PVR-Client", __func__);
 
-    if (!kodi::vfs::DirectoryExists(kodi::GetBaseUserPath()))
+    if (!kodi::vfs::DirectoryExists(kodi::addon::GetUserPath()))
     {
-      kodi::vfs::CreateDirectory(kodi::GetBaseUserPath());
+      kodi::vfs::CreateDirectory(kodi::addon::GetUserPath());
     }
 
-    m_strHostname = kodi::GetSettingString("host", DEFAULT_HOST);
-    m_iPortWeb = kodi::GetSettingInt("webport", DEFAULT_WEB_PORT);
-    m_bUsePIN = kodi::GetSettingBoolean("usepin", DEFAULT_USEPIN);
-    m_strPin = StringUtils::Format("%04i", kodi::GetSettingInt("pin", 0));
-    m_bTranscode = kodi::GetSettingBoolean("transcode", DEFAULT_TRANSCODE);
-    m_iBitrate = kodi::GetSettingInt("bitrate", DEFAULT_BITRATE);
-
-    Pctv* usedInstance = new Pctv(m_strHostname, m_iPortWeb, m_strPin, m_iBitrate, m_bTranscode,
-                                  m_bUsePIN, instance, version);
-    addonInstance = usedInstance;
-    m_usedInstances.emplace(instanceID, usedInstance);
+    m_strHostname = kodi::addon::GetSettingString("host", DEFAULT_HOST);
+    m_iPortWeb = kodi::addon::GetSettingInt("webport", DEFAULT_WEB_PORT);
+    m_bUsePIN = kodi::addon::GetSettingBoolean("usepin", DEFAULT_USEPIN);
+    m_strPin = StringUtils::Format("%04i", kodi::addon::GetSettingInt("pin", 0));
+    m_strMimeType.clear();
+    m_bUseMpegTSMimeType = kodi::addon::GetSettingBoolean("usempegts", DEFAULT_USE_MPEGTS);
+    if (m_bUseMpegTSMimeType)
+      m_strMimeType = MPEGTS_MIMETYPE;
+    else
+      m_strMimeType = kodi::addon::GetSettingString("mimetype", "");
+    m_bTranscode = kodi::addon::GetSettingBoolean("transcode", DEFAULT_TRANSCODE);
+    m_iBitrate = kodi::addon::GetSettingInt("bitrate", DEFAULT_BITRATE);
+
+    Pctv* usedInstance = new Pctv(m_strHostname, m_iPortWeb, m_strPin, m_strMimeType,
+                                  m_iBitrate, m_bTranscode, m_bUsePIN, instance);
+    hdl = usedInstance;
+    m_usedInstances.emplace(instance.GetID(), usedInstance);
 
     if (!usedInstance->Open())
       return ADDON_STATUS_LOST_CONNECTION;
@@ -51,15 +54,14 @@ ADDON_STATUS CPCTVAddon::CreateInstance(
   return ADDON_STATUS_UNKNOWN;
 }
 
-void CPCTVAddon::DestroyInstance(int instanceType,
-                                 const std::string& instanceID,
-                                 KODI_HANDLE addonInstance)
+void CPCTVAddon::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);
@@ -68,7 +70,7 @@ void CPCTVAddon::DestroyInstance(int ins
 }
 
 ADDON_STATUS CPCTVAddon::SetSetting(const std::string& settingName,
-                                    const kodi::CSettingValue& settingValue)
+                                    const kodi::addon::CSettingValue& settingValue)
 {
   if (settingName == "host")
   {
diff -pruN 19.0.1+ds1-1/src/addon.h 20.3.0+ds1-1/src/addon.h
--- 19.0.1+ds1-1/src/addon.h	2022-01-02 11:32:50.000000000 +0000
+++ 20.3.0+ds1-1/src/addon.h	2022-03-26 09:30:19.000000000 +0000
@@ -16,28 +16,26 @@
 #define DEFAULT_HOST "192.168.1.20"
 #define DEFAULT_WEB_PORT 80
 #define DEFAULT_PIN "0000"
+#define DEFAULT_USE_MPEGTS false
 #define DEFAULT_TRANSCODE false
 #define DEFAULT_USEPIN false
 #define DEFAULT_BITRATE 1200
+#define MPEGTS_MIMETYPE "video/mp2t"
 
 class Pctv;
 
-class ATTRIBUTE_HIDDEN CPCTVAddon : public kodi::addon::CAddonBase
+class ATTR_DLL_LOCAL CPCTVAddon : public kodi::addon::CAddonBase
 {
 public:
   CPCTVAddon() = default;
 
-  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;
+  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;
 
   ADDON_STATUS SetSetting(const std::string& settingName,
-                          const kodi::CSettingValue& settingValue) override;
+                          const kodi::addon::CSettingValue& settingValue) override;
 
 private:
   std::unordered_map<std::string, Pctv*> m_usedInstances;
@@ -45,6 +43,8 @@ private:
   std::string m_strHostname = DEFAULT_HOST;
   int m_iPortWeb = DEFAULT_WEB_PORT;
   std::string m_strPin = DEFAULT_PIN;
+  bool m_bUseMpegTSMimeType;
+  std::string m_strMimeType;
   bool m_bTranscode = DEFAULT_TRANSCODE;
   bool m_bUsePIN = DEFAULT_USEPIN;
   int m_iBitrate = DEFAULT_BITRATE;
diff -pruN 19.0.1+ds1-1/src/PctvData.cpp 20.3.0+ds1-1/src/PctvData.cpp
--- 19.0.1+ds1-1/src/PctvData.cpp	2022-01-02 11:32:50.000000000 +0000
+++ 20.3.0+ds1-1/src/PctvData.cpp	2022-03-26 09:30:19.000000000 +0000
@@ -21,15 +21,16 @@ using kodi::tools::StringUtils;
 Pctv::Pctv(const std::string strHostname,
            int iPortWeb,
            const std::string& strPin,
+           const std::string& strMimeType,
            int iBitrate,
            bool bTranscode,
            bool bUsePIN,
-           KODI_HANDLE instance,
-           const std::string& kodiVersion)
-  : kodi::addon::CInstancePVRClient(instance, kodiVersion),
+           const kodi::addon::IInstanceInfo& instance)
+  : kodi::addon::CInstancePVRClient(instance),
     m_strHostname(strHostname),
     m_iPortWeb(iPortWeb),
     m_strPin(strPin),
+    m_strMimeType(strMimeType),
     m_iBitrate(iBitrate),
     m_bTranscode(bTranscode),
     m_bUsePIN(bUsePIN)
@@ -247,6 +248,8 @@ PVR_ERROR Pctv::GetChannelStreamProperti
 
   properties.emplace_back(PVR_STREAM_PROPERTY_STREAMURL, strUrl);
   properties.emplace_back(PVR_STREAM_PROPERTY_ISREALTIMESTREAM, "true");
+  if (!m_strMimeType.empty())
+    properties.emplace_back(PVR_STREAM_PROPERTY_MIMETYPE, m_strMimeType);
 
   return PVR_ERROR_NO_ERROR;
 }
@@ -935,6 +938,7 @@ PVR_ERROR Pctv::GetCapabilities(kodi::ad
   capabilities.SetSupportsRadio(false);
   capabilities.SetSupportsChannelGroups(true);
   capabilities.SetSupportsRecordings(true);
+  capabilities.SetSupportsRecordingsDelete(false);
   capabilities.SetSupportsRecordingsUndelete(false);
   capabilities.SetSupportsTimers(true);
   capabilities.SetSupportsChannelScan(false);
diff -pruN 19.0.1+ds1-1/src/PctvData.h 20.3.0+ds1-1/src/PctvData.h
--- 19.0.1+ds1-1/src/PctvData.h	2022-01-02 11:32:50.000000000 +0000
+++ 20.3.0+ds1-1/src/PctvData.h	2022-03-26 09:30:19.000000000 +0000
@@ -151,18 +151,18 @@ struct PctvConfig
   }
 };
 
-class ATTRIBUTE_HIDDEN Pctv : public kodi::addon::CInstancePVRClient
+class ATTR_DLL_LOCAL Pctv : public kodi::addon::CInstancePVRClient
 {
 public:
   /* Class interface */
   Pctv(const std::string strHostname,
        int iPortWeb,
        const std::string& strPin,
+       const std::string& strMimeType,
        int iBitrate,
        bool bTranscode,
        bool bUsePIN,
-       KODI_HANDLE instance,
-       const std::string& kodiVersion);
+       const kodi::addon::IInstanceInfo& instance);
   ~Pctv();
 
   /* Server */
@@ -260,6 +260,7 @@ private:
   std::string m_strHostname;
   int m_iPortWeb;
   std::string m_strPin;
+  std::string m_strMimeType;
   int m_iBitrate;
   bool m_bTranscode;
   bool m_bUsePIN;
diff -pruN 19.0.1+ds1-1/.travis.yml 20.3.0+ds1-1/.travis.yml
--- 19.0.1+ds1-1/.travis.yml	2022-01-02 11:32:50.000000000 +0000
+++ 20.3.0+ds1-1/.travis.yml	2022-03-26 09:30:19.000000000 +0000
@@ -31,7 +31,7 @@ matrix:
       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 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
 
@@ -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 Matrix --depth=1 https://github.com/xbmc/xbmc.git; 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/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/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: 
