Skip to content

Commit 8508d1a

Browse files
author
Mariusz89B
committed
v1.1.6
1 parent 572a209 commit 8508d1a

3 files changed

Lines changed: 37 additions & 19 deletions

File tree

addon.py

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -687,24 +687,32 @@ def get_items(data, mode=None, thumb=thumb, poster=poster, banner=banner, clearl
687687

688688
title = label
689689

690-
availability = media.get('availability')
691-
if availability:
692-
start = availability
693-
if start:
694-
fr = start.get('from')
695-
if fr:
696-
timestamp = fr.get('timestamp')
697-
if isinstance(timestamp, int):
698-
start_time = timestamp // 1000
690+
timestamp = None
699691

700-
dt_start = datetime.fromtimestamp(start_time)
701-
try:
702-
da_start = dt_start.strftime('%A %#d/%#m %H:%M')
703-
except:
704-
da_start = dt_start.strftime('%A %-d/%-m %H:%M')
692+
start = item.get('startTime')
693+
if start:
694+
timestamp = start.get('timestamp')
695+
696+
else:
697+
availability = media.get('availability')
698+
if availability:
699+
start = availability
700+
if start:
701+
fr = start.get('from')
702+
if fr:
703+
timestamp = fr.get('timestamp')
704+
705+
if isinstance(timestamp, int):
706+
start_time = timestamp // 1000
707+
708+
dt_start = datetime.fromtimestamp(start_time)
709+
try:
710+
da_start = dt_start.strftime('%A %#d/%#m %H:%M')
711+
except:
712+
da_start = dt_start.strftime('%A %-d/%-m %H:%M')
705713

706-
if da_start != '00:00':
707-
title = label + ' [COLOR grey]({0})[/COLOR]'.format(da_start)
714+
if da_start != '00:00':
715+
title = label + ' [COLOR grey]({0})[/COLOR]'.format(da_start)
708716

709717
outline = media.get('description')
710718
plot = media.get('descriptionLong')
@@ -2236,8 +2244,10 @@ def play(exlink, title, media_id, catchup_type, start, end):
22362244
play_item.setProperty('inputstream.adaptive.stream_headers', 'Referer: https://www.cmore.se/&User-Agent=' + quote(UA))
22372245
play_item.setProperty('inputstream.adaptive.manifest_type', 'mpd')
22382246
play_item.setProperty('IsPlayable', 'true')
2239-
if catchup_type != 'LIVE':
2247+
if (catchup_type != 'LIVE' or catchup_type != 'ONDEMAND'):
22402248
play_item.setProperty('inputstream.adaptive.play_timeshift_buffer', 'true')
2249+
if catchup_type == 'ONDEMAND':
2250+
play_item.setProperty('inputstream.adaptive.play_timeshift_buffer', 'false')
22412251

22422252
xbmcplugin.setResolvedUrl(addon_handle, True, listitem=play_item)
22432253

addon.xml

Lines changed: 6 additions & 2 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.cmore" name="C More" version="1.1.5" provider-name="mariusz89b">
2+
<addon id="plugin.video.cmore" name="C More" version="1.1.6-beta.1" provider-name="mariusz89b">
33
<requires>
44
<import addon="xbmc.python" version="3.0.0"/>
55
<import addon="script.module.inputstreamhelper" version="0.2.4"/>
@@ -24,7 +24,11 @@
2424
<platform>all</platform>
2525
<license>GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 and MIT LICENSE.</license>
2626
<source>https://github.com/Mariusz89B/plugin.video.cmore</source>
27-
<news>v1.1.5 (2022-09-10)
27+
<news>v1.1.6 (2022-09-11)
28+
- Revised starttime information for events.
29+
- Fixed start for live events.
30+
31+
v1.1.5 (2022-09-10)
2832
- Fixed timestamps.
2933
- Fixed kids section.
3034

changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
v1.1.6 (2022-09-11)
2+
- Revised starttime information for events.
3+
- Fixed start for live events.
4+
15
v1.1.5 (2022-09-10)
26
- Fixed timestamps.
37
- Fixed kids section.

0 commit comments

Comments
 (0)