Skip to content

Commit 304f0d5

Browse files
committed
[plugin.video.dumpert] 1.1.13+matrix.1
1 parent 90837bf commit 304f0d5

File tree

4 files changed

+32
-30
lines changed

4 files changed

+32
-30
lines changed

plugin.video.dumpert/addon.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<addon
33
id="plugin.video.dumpert"
44
name="Dumpert"
5-
version="1.1.12+matrix.1"
5+
version="1.1.13+matrix.1"
66
provider-name="Skipmode A1">
77
<requires>
88
<import addon="xbmc.python" version="3.0.0"/>
@@ -28,9 +28,8 @@
2828
<forum>https://forum.kodi.tv/showthread.php?tid=162635</forum>
2929
<website>https://dumpert.nl</website>
3030
<source>https://github.com/skipmodea1/plugin.video.dumpert.python3</source>
31-
<news>v1.1.12 (2024-10-01)
32-
- Removed (!!) embedded Youtube videos as these seem to kill kodi for some reason
33-
- Cleaned up description
31+
<news>v1.1.13 (2024-10-20) (Kudo's to FaBjE for the fix)
32+
- fixed and added embedded Youtube videos
3433
</news>
3534
<assets>
3635
<icon>resources/icon.png</icon>

plugin.video.dumpert/changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v1.1.13 (2024-10-20) (Kudo's to FaBjE for the fix)
2+
- fixed and added embedded Youtube videos
3+
14
v1.1.12 (2024-10-01)
25
- Removed (!!) embedded Youtube videos as these seem to kill kodi for some reason
36
- Cleaned up description

plugin.video.dumpert/resources/lib/dumpert_const.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@
2929
VIDEO_QUALITY_MOBILE = "mobile"
3030
VIDEO_QUALITY_TABLET = "tablet"
3131
VIDEO_QUALITY_720P = "720p"
32-
DATE = "2024-10-01"
33-
VERSION = "1.1.12"
34-
32+
DATE = "2024-10-20"
33+
VERSION = "1.1.13"
3534

3635
if sys.version_info[0] > 2:
3736
unicode = str
@@ -67,6 +66,6 @@ def log(name_object, object):
6766
"Unable to log the object due to an error while converting it to an unicode string"), xbmc.LOGDEBUG)
6867

6968

70-
def getSoup(html,default_parser="html5lib"):
69+
def getSoup(html, default_parser="html5lib"):
7170
soup = BeautifulSoup(html, default_parser)
72-
return soup
71+
return soup

plugin.video.dumpert/resources/lib/dumpert_json.py

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
import json
2020

2121
from resources.lib.dumpert_const import LANGUAGE, IMAGES_PATH, SETTINGS, convertToUnicodeString, log, SFW_HEADERS, \
22-
NSFW_HEADERS, \
23-
DAY, WEEK, MONTH, DAY_TOPPERS_URL, WEEK_TOPPERS_URL, MONTH_TOPPERS_URL, LATEST_URL, VIDEO_QUALITY_MOBILE, \
24-
VIDEO_QUALITY_TABLET, VIDEO_QUALITY_720P
22+
NSFW_HEADERS, DAY, WEEK, MONTH, DAY_TOPPERS_URL, WEEK_TOPPERS_URL, MONTH_TOPPERS_URL, LATEST_URL, \
23+
VIDEO_QUALITY_MOBILE, VIDEO_QUALITY_TABLET, VIDEO_QUALITY_720P
2524

2625

2726
#
@@ -44,7 +43,7 @@ def __init__(self):
4443
try:
4544
self.plugin_category = urllib.parse.parse_qs(urllib.parse.urlparse(sys.argv[2]).query)['plugin_category'][0]
4645
self.next_page_possible = \
47-
urllib.parse.parse_qs(urllib.parse.urlparse(sys.argv[2]).query)['next_page_possible'][0]
46+
urllib.parse.parse_qs(urllib.parse.urlparse(sys.argv[2]).query)['next_page_possible'][0]
4847
except KeyError:
4948
self.plugin_category = LANGUAGE(30001)
5049
self.next_page_possible = "True"
@@ -54,7 +53,7 @@ def __init__(self):
5453
self.period = ""
5554
try:
5655
self.days_deducted_from_today = \
57-
urllib.parse.parse_qs(urllib.parse.urlparse(sys.argv[2]).query)['days_deducted_from_today'][0]
56+
urllib.parse.parse_qs(urllib.parse.urlparse(sys.argv[2]).query)['days_deducted_from_today'][0]
5857
except KeyError:
5958
self.days_deducted_from_today = "0"
6059
try:
@@ -159,7 +158,7 @@ def __init__(self):
159158
# https://api-live.dumpert.nl/mobile_api/json/video/top5/maand/201908/
160159
self.next_url = MONTH_TOPPERS_URL + next_url_datetime_object.strftime('%Y%m')
161160

162-
log("self.next_url", self.next_url)
161+
# log("self.next_url", self.next_url)
163162

164163
# "https://api-live.dumpert.nl/mobile_api/json/video/latest/0/"
165164
else:
@@ -222,8 +221,6 @@ def getVideos(self):
222221

223222
# {"gentime":1568796074,"items":[{"date":"2019-09-18T10:28:07+02:00","description":"FUCK DE EU!!!","id":"7757567_fac144f2","media":[{"description":"","duration":57,"mediatype":"VIDEO","variants":[{"uri":"https://media.dumpert.nl/tablet/fac144f2_Fuck_Europa.mp4.mp4.mp4","version":"tablet"},{"uri":"https://media.dumpert.nl/mobile/fac144f2_Fuck_Europa.mp4.mp4.mp4","version":"mobile"},{"uri":"https://media.dumpert.nl/720p/fac144f2_Fuck_Europa.mp4.mp4.mp4","version":"720p"}]}],"nopreroll":false,"nsfw":false,"stats":{"kudos_today":82,"kudos_total":82,"views_today":2202,"views_total":2202},"still":"https://media.dumpert.nl/stills/7757567_fac144f2.jpg","stills":{"still":"https://media.dumpert.nl/stills/7757567_fac144f2.jpg","still-large":"https://media.dumpert.nl/stills/large/7757567_fac144f2.jpg","still-medium":"https://media.dumpert.nl/stills/medium/7757567_fac144f2.jpg","thumb":"https://media.dumpert.nl/sq_thumbs/7757567_fac144f2.jpg","thumb-medium":"https://media.dumpert.nl/sq_thumbs/medium/7757567_fac144f2.jpg"},"tags":"videofuck fuck willem koning prinsjesdag troonrede willy alexander eu nexit","thumbnail":"https://media.dumpert.nl/sq_thumbs/7757567_fac144f2.jpg","title":"Willem heeft er genoeg van!","upload_id":""},{"date":"2019-
224223

225-
file = ""
226-
227224
# Only process video items
228225
try:
229226
video_type = item['media'][0]['mediatype']
@@ -235,18 +232,22 @@ def getVideos(self):
235232
process_item = False
236233

237234
if process_item:
235+
236+
file = ""
237+
url = ""
238+
238239
# is it an embedded youtube link?
239240
# {"version":"embed","uri":"youtube:wOeZB7bnoxw"}
240-
# Skipping embedded Youtube videos as these seem to kill kodi for some reason.
241241
if item['media'][0]['variants'][0]['version'] == 'embed':
242242
if str(item['media'][0]['variants'][0]['uri']).find("youtube:") >= 0:
243243
youtube_id = str(item['media'][0]['variants'][0]['uri']).replace("youtube:", "")
244-
log("skipping embedded youtube video", youtube_id)
244+
url = "plugin://plugin.video.youtube/play/?video_id=" + youtube_id
245245
else:
246+
246247
log("skipping mediatype", str(item['media'][0]['variants'][0]['uri']))
247248

248-
# go to the next item in the loop
249-
continue
249+
# go to the next item in the loop
250+
continue
250251
else:
251252
# max video quality 0: low, 1: medium, 2: high
252253
# Lets find a video with the desired quality or lower
@@ -260,9 +261,16 @@ def getVideos(self):
260261
file = self.find_tablet_video(file, item)
261262
file = self.find_mobile_video(file, item)
262263

263-
# log("title", title)
264+
# Build link to media
265+
# let's remove any non-ascii characters from the title, to prevent errors with urllib.parse.parse_qs of the parameters
266+
parameters = {"action": "play-file",
267+
"file": file,
268+
"title": title.encode('ascii', 'ignore')}
269+
url = self.plugin_url + '?' + urllib.parse.urlencode(parameters)
264270

265-
log("json file", file)
271+
# log("title", title)
272+
# log("url", url)
273+
# log("json file", file)
266274

267275
list_item = xbmcgui.ListItem(label=title)
268276
list_item.setInfo("video",
@@ -272,13 +280,6 @@ def getVideos(self):
272280
'fanart': os.path.join(IMAGES_PATH, 'fanart-blur.jpg')})
273281
list_item.setProperty('IsPlayable', 'true')
274282

275-
# let's remove any non-ascii characters from the title, to prevent errors with urllib.parse.parse_qs of the parameters
276-
title = title.encode('ascii', 'ignore')
277-
278-
parameters = {"action": "play-file",
279-
"file": file,
280-
"title": title}
281-
url = self.plugin_url + '?' + urllib.parse.urlencode(parameters)
282283
is_folder = False
283284
# Add refresh option to context menu
284285
list_item.addContextMenuItems([('Refresh', 'Container.Refresh')])

0 commit comments

Comments
 (0)