Skip to content

Commit 6e92d3d

Browse files
authored
Merge pull request #131 from anxdpanic/pr_isengard
initial step to nexus only version
2 parents c17c177 + 17015ae commit 6e92d3d

File tree

13 files changed

+38
-93
lines changed

13 files changed

+38
-93
lines changed

.github/workflows/addon-validations.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,18 @@ jobs:
1616

1717
steps:
1818
- name: Checkout Add-on
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v3
2020
with:
2121
path: ${{ github.event.repository.name }}
2222

2323
- name: Install dependencies
2424
run: |
2525
python -m pip install --upgrade pip
2626
python -m pip install git+https://github.com/xbmc/addon-check.git
27+
sudo apt-get update
2728
sudo apt-get install xmlstarlet
2829
29-
- name: Kodi Add-on Checker (Isengard)
30-
id: kodi-addon-checker-isengard
30+
- name: Kodi Add-on Checker (Nexus)
31+
id: kodi-addon-checker-nexus
3132
run: |
32-
kodi-addon-checker ${{ github.event.repository.name }} --branch=isengard
33-
34-
- name: Staging for Official Repository (Matrix)
35-
id: stage-matrix
36-
run: |
37-
xmlstarlet ed -L -u '//import[@addon="xbmc.python"]/@version' -v "3.0.0" addon.xml
38-
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
39-
xmlstarlet ed -L -u '/addon/@version' -v "${version}+matrix.1" addon.xml
40-
working-directory: ${{ github.event.repository.name }}
41-
42-
- name: Kodi Add-on Checker (Matrix)
43-
id: kodi-addon-checker-matrix
44-
run: |
45-
kodi-addon-checker ${{ github.event.repository.name }} --branch=matrix
33+
kodi-addon-checker ${{ github.event.repository.name }} --branch=nexus

.github/workflows/make-release.yml

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
fi
2727
2828
- name: Checkout Add-on
29-
uses: actions/checkout@v2
29+
uses: actions/checkout@v3
3030
with:
3131
path: ${{ github.event.repository.name }}
3232

@@ -51,8 +51,8 @@ jobs:
5151
rm *.md
5252
working-directory: ${{ github.event.repository.name }}
5353

54-
- name: Create Zip (Isengard)
55-
id: zip-isengard
54+
- name: Create Zip (Nexus)
55+
id: zip-nexus
5656
run: |
5757
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
5858
filename=${{ github.event.repository.name }}-${version}.zip
@@ -61,19 +61,6 @@ jobs:
6161
echo ::set-output name=filename::$filename
6262
working-directory: ${{ github.event.repository.name }}
6363

64-
- name: Create Zip (Matrix)
65-
id: zip-matrix
66-
run: |
67-
xmlstarlet ed -L -u '//import[@addon="xbmc.python"]/@version' -v "3.0.0" addon.xml
68-
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
69-
xmlstarlet ed -L -u '/addon/@version' -v "${version}+matrix.1" addon.xml
70-
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
71-
filename=${{ github.event.repository.name }}-${version}.zip
72-
cd ..
73-
zip -r $filename ${{ github.event.repository.name }}
74-
echo ::set-output name=filename::$filename
75-
working-directory: ${{ github.event.repository.name }}
76-
7764
- name: Create Release
7865
id: create-release
7966
uses: actions/create-release@v1
@@ -86,24 +73,13 @@ jobs:
8673
draft: false
8774
prerelease: ${{ steps.release.outputs.pre-release }}
8875

89-
- name: Upload Zip (Isengard)
90-
id: upload-isengard
91-
uses: actions/upload-release-asset@v1
92-
env:
93-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94-
with:
95-
upload_url: ${{ steps.create-release.outputs.upload_url }}
96-
asset_name: ${{ steps.zip-isengard.outputs.filename }}
97-
asset_path: ${{ steps.zip-isengard.outputs.filename }}
98-
asset_content_type: application/zip
99-
100-
- name: Upload Zip (Matrix)
101-
id: upload-matrix
76+
- name: Upload Zip (Nexus)
77+
id: upload-nexus
10278
uses: actions/upload-release-asset@v1
10379
env:
10480
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10581
with:
10682
upload_url: ${{ steps.create-release.outputs.upload_url }}
107-
asset_name: ${{ steps.zip-matrix.outputs.filename }}
108-
asset_path: ${{ steps.zip-matrix.outputs.filename }}
83+
asset_name: ${{ steps.zip-nexus.outputs.filename }}
84+
asset_path: ${{ steps.zip-nexus.outputs.filename }}
10985
asset_content_type: application/zip

.github/workflows/submit-release.yml

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
steps:
2121
- name: Checkout Add-on
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3
2323
with:
2424
path: ${{ github.event.repository.name }}
2525

@@ -49,31 +49,10 @@ jobs:
4949
git commit -m "Remove unwanted files"
5050
working-directory: ${{ github.event.repository.name }}
5151

52-
- name: Submit to Official Repository (Isengard)
53-
id: submit-isengard
52+
- name: Submit to Official Repository (Nexus)
53+
id: submit-nexus
5454
run: |
55-
submit-addon -r repo-scripts -b isengard --pull-request ${{ github.event.repository.name }}
56-
working-directory: ${{ github.event.repository.name }}
57-
env:
58-
GH_USERNAME: anxdpanic
59-
GH_TOKEN: ${{ secrets.ADDON_SUBMISSION_TOKEN }}
60-
61-
62-
- name: Staging for Official Repository (Matrix)
63-
id: stage-matrix
64-
run: |
65-
rm changelog.txt
66-
xmlstarlet ed -L -u '//import[@addon="xbmc.python"]/@version' -v "3.0.0" addon.xml
67-
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
68-
xmlstarlet ed -L -u '/addon/@version' -v "${version}+matrix.1" addon.xml
69-
git add .
70-
git commit -m "Kodi 19 Patch"
71-
working-directory: ${{ github.event.repository.name }}
72-
73-
- name: Submit to Official Repository (Matrix)
74-
id: submit-matrix
75-
run: |
76-
submit-addon -r repo-scripts -b matrix --pull-request ${{ github.event.repository.name }}
55+
submit-addon -r repo-scripts -b nexus --pull-request ${{ github.event.repository.name }}
7756
working-directory: ${{ github.event.repository.name }}
7857
env:
7958
GH_USERNAME: anxdpanic

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fanxdpanic%2Fscript.module.python.twitch%2Fbadge&logo=none)](https://actions-badge.atrox.dev/anxdpanic/script.module.python.twitch/goto)
44
![License](https://img.shields.io/badge/license-GPL--3.0--only-success.svg)
5-
![Kodi Version](https://img.shields.io/badge/kodi-isengard%2B-success.svg)
5+
![Kodi Version](https://img.shields.io/badge/kodi-nexus%2B-success.svg)
66
![Contributors](https://img.shields.io/github/contributors/anxdpanic/script.module.python.twitch.svg)
77

88
###### script.module.python.twitch

addon.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<addon id="script.module.python.twitch" name="python-twitch for Kodi" version="2.0.21" provider-name="anxdpanic, A Talented Community">
33
<requires>
4-
<import addon="xbmc.python" version="2.20.0"/>
4+
<import addon="xbmc.python" version="3.0.1"/>
55
<import addon="script.module.six" version="1.11.0"/>
66
<import addon="script.module.requests" version="2.12.4"/>
77
</requires>
88
<extension point="xbmc.python.module" library="resources/lib"/>
99
<extension point="xbmc.addon.metadata">
1010
<platform>all</platform>
1111
<news>
12-
[upd] fixups and additions to Helix API
13-
[rem] remove v5 API
12+
[rem] removed support for Kodi versions pre-Nexus v20
13+
[rem] removed python 2 support
14+
[rem] removed dependency on six
1415
[lang] updated translations from Weblate
1516
</news>
1617
<assets>
17-
<icon>icon.png</icon>
18+
<icon>resources/media/icon.png</icon>
1819
</assets>
1920
<platform>all</platform>
2021
<license>GPL-3.0-only</license>

changelog.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
3.0.0
2+
[rem] removed support for Kodi versions pre-Nexus v20
3+
[rem] removed python 2 support
4+
[rem] removed dependency on six
5+
[lang] updated translations from Weblate
6+
17
2.0.21
28
[upd] fixups and additions to Helix API
39
[rem] remove v5 API

resources/lib/twitch/api/parameters.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
See LICENSES/GPL-3.0-only for more information.
1111
"""
1212

13-
from six.moves import range
14-
1513
from base64 import b64decode
1614

1715

resources/lib/twitch/api/usher.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"""
1313

1414
import json
15+
from urllib.parse import urlencode
1516

1617
from .. import keys
1718
from ..api.parameters import Boolean
@@ -20,8 +21,6 @@
2021
from ..queries import query
2122
from ..log import log
2223

23-
from six.moves.urllib.parse import urlencode
24-
2524
ACCESS_TOKEN_EXCEPTION = {
2625
'error': 'Error',
2726
'message': 'Failed to retrieve access token',

resources/lib/twitch/oauth/clients.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
See LICENSES/GPL-3.0-only for more information.
1010
"""
1111

12+
from urllib.parse import urlsplit
13+
from urllib.parse import urlencode
14+
1215
from .. import CLIENT_ID, CLIENT_SECRET, methods
1316
from ..queries import OAuthQuery as Qry
1417
from ..queries import query
1518

16-
from six.moves.urllib_parse import urlsplit, urlencode
17-
18-
1919
class MobileClient:
2020
def __init__(self, client_id='', client_secret=''):
2121
self.client_id = client_id if client_id else CLIENT_ID

resources/lib/twitch/parser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"""
1212

1313
import re
14-
15-
from six.moves.urllib_parse import urlencode
14+
from urllib.parse import urlencode
1615

1716
from . import keys
1817
from .log import log

0 commit comments

Comments
 (0)