Skip to content

Commit 148c11e

Browse files
Rework to use new authentication, remove broken features. (#311)
* Rework to use new authentication, remove broken features.
1 parent 7bd8c4d commit 148c11e

37 files changed

Lines changed: 397 additions & 1696 deletions

.env.example

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
ADDON_USERNAME=
2-
ADDON_PASSWORD=
3-
ADDON_PROFILE=
1+
ADDON_TOKEN=
42

53
KODI_HOME=tests/home
64
KODI_INTERACTIVE=0

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
.env.example export-ignore
22
.github/ export-ignore
3-
tests/ export-ignore
43
.gitattributes export-ignore
54
.gitignore export-ignore
65
.pylintrc export-ignore
76
codecov.yml export-ignore
87
Makefile export-ignore
98
requirements.txt export-ignore
9+
scripts/ export-ignore
10+
tests/ export-ignore

.github/workflows/ci.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: [ ubuntu-latest ]
18-
python-version: [ 2.7, 3.5, 3.6, 3.7, 3.8, 3.9 ]
19-
include:
20-
# Kodi Leia on Windows uses a bundled Python 2.7.
21-
- os: windows-latest
22-
python-version: 2.7
23-
24-
# Kodi Matrix on Windows uses a bundled Python 3.8, but we test 3.9 also to be sure.
25-
- os: windows-latest
26-
python-version: 3.8
27-
- os: windows-latest
28-
python-version: 3.9
18+
python-version: [ 3.9 ]
19+
# python-version: [ 2.7, 3.5, 3.6, 3.7, 3.8, 3.9 ]
20+
# include:
21+
# # Kodi Leia on Windows uses a bundled Python 2.7.
22+
# - os: windows-latest
23+
# python-version: 2.7
24+
#
25+
# # Kodi Matrix on Windows uses a bundled Python 3.8, but we test 3.9 also to be sure.
26+
# - os: windows-latest
27+
# python-version: 3.8
28+
# - os: windows-latest
29+
# python-version: 3.9
2930
steps:
3031
- name: Check out ${{ github.sha }} from repository ${{ github.repository }}
3132
uses: actions/checkout@v2

.pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ disable=
2222

2323
super-with-arguments, # Python 2.7 compatibility
2424
raise-missing-from, # Python 2.7 compatibility
25+
consider-using-f-string, # Python 2.7 compatibility

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ check-pylint:
3030
check-translations:
3131
@printf ">>> Running translation checks\n"
3232
@$(foreach lang,$(languages), \
33-
msgcmp resources/language/resource.language.$(lang)/strings.po resources/language/resource.language.en_gb/strings.po; \
33+
msgcmp --use-untranslated resources/language/resource.language.$(lang)/strings.po resources/language/resource.language.en_gb/strings.po; \
3434
)
35+
@scripts/check_for_unused_translations.py
3536

3637
check-addon: clean build
3738
@printf ">>> Running addon checks\n"

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ De volgende features worden ondersteund:
2121
* Bekijk en speel rechtstreeks vanaf de TV gids
2222
* Doorzoek de catalogus
2323
* Bekijk YouTube-filmpjes van enkele DPG Media kanalen
24-
* Gebruikersprofielen (VTM GO of VTM GO Kids)
2524
* Integratie met [IPTV Manager](https://github.com/add-ons/service.iptv.manager)
26-
* Integratie met Kodi bibliotheek
2725

2826
## Screenshots
2927

addon.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<addon id="plugin.video.vtm.go" name="VTM GO" version="1.2.12" provider-name="Michaël Arnauts">
2+
<addon id="plugin.video.vtm.go" name="VTM GO" version="1.3.0" provider-name="Michaël Arnauts">
33
<requires>
44
<import addon="xbmc.python" version="2.26.0"/>
55
<import addon="script.module.dateutil" version="2.6.0"/>
@@ -12,8 +12,6 @@
1212
</requires>
1313
<extension point="xbmc.python.pluginsource" library="addon_entry.py">
1414
<provides>video</provides>
15-
<medialibraryscanpath content="movies">library/movies/</medialibraryscanpath>
16-
<medialibraryscanpath content="tvshows">library/tvshows/</medialibraryscanpath>
1715
</extension>
1816
<extension point="xbmc.service" library="service_entry.py"/>
1917
<extension point="xbmc.addon.metadata">
@@ -25,8 +23,8 @@
2523
<disclaimer lang="nl_NL">Deze add-on wordt niet ondersteund door DPG Media en wordt aangeboden 'as is', zonder enige garantie. De VTM GO naam, VTM GO logo en de kanaallogo's zijn eigendom van DPG Media en worden gebruikt in overeenstemming met de fair use policy.</disclaimer>
2624
<platform>all</platform>
2725
<license>GPL-3.0-only</license>
28-
<news>v1.2.12 (2021-09-08)
29-
- Fix playback of VOD content.</news>
26+
<news>v1.3 (XXXX-XX-XX)
27+
- Rewrite authentication, update API and remove broken features.</news>
3028
<source>https://github.com/add-ons/plugin.video.vtm.go</source>
3129
<assets>
3230
<icon>resources/icon.png</icon>

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ python-dateutil
88
pysocks
99
requests
1010
git+git://github.com/dagwieers/kodi-plugin-routing.git@setup#egg=routing
11+
mock
1112
sakee
1213
win-inet-pton; platform_system=="Windows"

resources/language/resource.language.en_gb/strings.po

Lines changed: 10 additions & 179 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,7 @@ msgstr ""
55
"Language: en\n"
66
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
77

8-
### MENUS
9-
msgctxt "#30001"
10-
msgid "A-Z"
11-
msgstr ""
12-
13-
msgctxt "#30002"
14-
msgid "Alphabetically sorted list of programs"
15-
msgstr ""
16-
8+
# MENUS
179
msgctxt "#30003"
1810
msgid "Movies"
1911
msgstr ""
@@ -46,22 +38,10 @@ msgctxt "#30010"
4638
msgid "Search the VTM GO catalogue"
4739
msgstr ""
4840

49-
msgctxt "#30011"
50-
msgid "Switch Profile ([B]{profile}[/B])"
51-
msgstr ""
52-
53-
msgctxt "#30012"
54-
msgid "Select a different profile to use"
55-
msgstr ""
56-
5741
msgctxt "#30013"
5842
msgid "TV guide"
5943
msgstr ""
6044

61-
msgctxt "#30014"
62-
msgid "Browse the TV Guide"
63-
msgstr ""
64-
6545
msgctxt "#30015"
6646
msgid "Recommendations"
6747
msgstr ""
@@ -95,11 +75,7 @@ msgid "Show the VTM GO recommendations for Kids"
9575
msgstr ""
9676

9777

98-
### SUBMENUS
99-
msgctxt "#30051"
100-
msgid "Watch [B]{channel}[/B]"
101-
msgstr ""
102-
78+
# SUBMENUS
10379
msgctxt "#30052"
10480
msgid "Watch live [B]{channel}[/B]"
10581
msgstr ""
@@ -112,21 +88,8 @@ msgctxt "#30054"
11288
msgid "Browse the TV Guide for [B]{channel}[/B]"
11389
msgstr ""
11490

115-
msgctxt "#30055"
116-
msgid "Catalog for [B]{channel}[/B]"
117-
msgstr ""
118-
119-
msgctxt "#30056"
120-
msgid "Browse the Catalog for [B]{channel}[/B]"
121-
msgstr ""
122-
123-
msgctxt "#30057"
124-
msgid "Select Profile"
125-
msgstr ""
126-
127-
128-
### CONTEXT MENU
12991

92+
# CONTEXT MENU
13093
msgctxt "#30100"
13194
msgid "Add to My List"
13295
msgstr ""
@@ -143,32 +106,12 @@ msgctxt "#30103"
143106
msgid "Watch Live"
144107
msgstr ""
145108

146-
msgctxt "#30104"
147-
msgid "TV Guide"
148-
msgstr ""
149-
150109
msgctxt "#30105"
151110
msgid "Play from Catalog"
152111
msgstr ""
153112

154113

155-
### CODE
156-
msgctxt "#30200"
157-
msgid "Using a SOCKS proxy requires the PySocks library (script.module.pysocks) installed."
158-
msgstr ""
159-
160-
msgctxt "#30201"
161-
msgid "[B][COLOR lightblue]Kids zone[/COLOR][/B]"
162-
msgstr ""
163-
164-
msgctxt "#30202"
165-
msgid "Credentials are correct!"
166-
msgstr ""
167-
168-
msgctxt "#30203"
169-
msgid "Your credentials are not valid!"
170-
msgstr ""
171-
114+
# CODE
172115
msgctxt "#30204"
173116
msgid "All seasons"
174117
msgstr ""
@@ -213,20 +156,12 @@ msgctxt "#30214"
213156
msgid "[B]Next:[/B] {start} - {end}\n» {title}"
214157
msgstr ""
215158

216-
msgctxt "#30215"
217-
msgid "Browse the TV-Guide of [B]{channel}[/B]"
218-
msgstr ""
219-
220159
msgctxt "#30216"
221160
msgid "All ages"
222161
msgstr ""
223162

224163

225-
### Dates
226-
msgctxt "#30300"
227-
msgid "2 days ago"
228-
msgstr ""
229-
164+
# Dates
230165
msgctxt "#30301"
231166
msgid "Yesterday"
232167
msgstr ""
@@ -239,26 +174,18 @@ msgctxt "#30303"
239174
msgid "Tomorrow"
240175
msgstr ""
241176

242-
msgctxt "#30304"
243-
msgid "In 2 days"
244-
msgstr ""
245-
246177

247-
### MESSAGES
178+
# MESSAGES
248179
msgctxt "#30701"
249-
msgid "You need to configure your credentials before you can access the content of VTM GO. Do you want to enter them now?"
180+
msgid "Go to {url} on another device and enter use code [B]{code}[/B] when logging in."
250181
msgstr ""
251182

252183
msgctxt "#30702"
253-
msgid "Unknown error while logging in: {code}"
184+
msgid "This device is successfully logged in to the VTM Go Service."
254185
msgstr ""
255186

256187
msgctxt "#30703"
257-
msgid "Your account has no profiles defined. Please login on vtm.be/vtmgo and create a profile."
258-
msgstr ""
259-
260-
msgctxt "#30704"
261-
msgid "This video may be geo-blocked, or your account is already being used currently."
188+
msgid "The login code has expired. Please try again."
262189
msgstr ""
263190

264191
msgctxt "#30705"
@@ -293,18 +220,6 @@ msgctxt "#30713"
293220
msgid "The requested video was not found in the guide."
294221
msgstr ""
295222

296-
msgctxt "#30714"
297-
msgid "Local metadata is cleared."
298-
msgstr ""
299-
300-
msgctxt "#30715"
301-
msgid "Updating metadata..."
302-
msgstr ""
303-
304-
msgctxt "#30716"
305-
msgid "Updating metadata ({index}/{total})..."
306-
msgstr ""
307-
308223
msgctxt "#30717"
309224
msgid "This program is not available in the VTM GO catalogue."
310225
msgstr ""
@@ -314,35 +229,7 @@ msgid "The Manifest proxy is not running. Please restart Kodi."
314229
msgstr ""
315230

316231

317-
### SETTINGS
318-
msgctxt "#30800"
319-
msgid "Credentials"
320-
msgstr ""
321-
322-
msgctxt "#30801"
323-
msgid "Credentials"
324-
msgstr ""
325-
326-
msgctxt "#30803"
327-
msgid "Email address"
328-
msgstr ""
329-
330-
msgctxt "#30805"
331-
msgid "Password"
332-
msgstr ""
333-
334-
msgctxt "#30809"
335-
msgid "Profile"
336-
msgstr ""
337-
338-
msgctxt "#30810"
339-
msgid "Always use the current profile"
340-
msgstr ""
341-
342-
msgctxt "#30811"
343-
msgid "Current profile"
344-
msgstr ""
345-
232+
# SETTINGS
346233
msgctxt "#30820"
347234
msgid "Interface"
348235
msgstr ""
@@ -359,22 +246,6 @@ msgctxt "#30826"
359246
msgid "Show Continue watching"
360247
msgstr ""
361248

362-
msgctxt "#30827"
363-
msgid "Metadata"
364-
msgstr ""
365-
366-
msgctxt "#30829"
367-
msgid "Periodically refresh metadata in the background"
368-
msgstr ""
369-
370-
msgctxt "#30831"
371-
msgid "Update local metadata now…"
372-
msgstr ""
373-
374-
msgctxt "#30833"
375-
msgid "Clear local metadata…"
376-
msgstr ""
377-
378249
msgctxt "#30840"
379250
msgid "Playback"
380251
msgstr ""
@@ -431,46 +302,6 @@ msgctxt "#30869"
431302
msgid "IPTV Manager settings…"
432303
msgstr ""
433304

434-
msgctxt "#30870"
435-
msgid "Kodi Library"
436-
msgstr ""
437-
438-
msgctxt "#30871"
439-
msgid "Indexing"
440-
msgstr ""
441-
442-
msgctxt "#30872"
443-
msgid "Add video locations to the Kodi Library… [COLOR gray](See README.md)[/COLOR]"
444-
msgstr ""
445-
446-
msgctxt "#30873"
447-
msgid "Index the following movies"
448-
msgstr ""
449-
450-
msgctxt "#30874"
451-
msgid "Index the following series"
452-
msgstr ""
453-
454-
msgctxt "#30875"
455-
msgid "Full catalog"
456-
msgstr ""
457-
458-
msgctxt "#30876"
459-
msgid "Items on 'My List' only"
460-
msgstr ""
461-
462-
msgctxt "#30877"
463-
msgid "Maintenance"
464-
msgstr ""
465-
466-
msgctxt "#30878"
467-
msgid "Refresh Library…"
468-
msgstr ""
469-
470-
msgctxt "#30879"
471-
msgid "Clean Library…"
472-
msgstr ""
473-
474305
msgctxt "#30880"
475306
msgid "Expert"
476307
msgstr ""

0 commit comments

Comments
 (0)