Skip to content

Commit

Permalink
knewc 2.9.0 a 2
Browse files Browse the repository at this point in the history
Trap user errors in ExtraDirectories, trap secondary timeout,
  • Loading branch information
emveepee committed Sep 30, 2020
1 parent 2d176b5 commit 6975a4f
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.kodi.knewc" name="NextPVR New Client" version="2.9.0~a1" provider-name="emveepee">
<addon id="script.kodi.knewc" name="NextPVR New Client" version="2.9.0~a2" provider-name="emveepee">
<requires>
<!--import addon="xbmc.python" version="2.1.0"/-->
<import addon="script.module.future" version="0.16.0.4"/>
Expand Down
8 changes: 8 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
[B]2.9.0~a2[/B]
- Fix error handling of ExtraDirectory call
- Extra logging for debugging PVR mode
- Don't open window when loading channel icons in PVR mode
UI Client
- Handle unhandled timeout exception
- Fix regression in ~a1 on context menu popup

[B]2.9.0~a1[/B]
- Matrix and Leia comnpatibility for repo
- PVR mode for in progress recordings using JSON RPC
Expand Down
7 changes: 4 additions & 3 deletions resources/src/KNEW_Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def getRecDirList_v5(self):
try:
dirs[extras[i]] = extras[i+1]
except:
xbmc.log('Duplicate of ' + dirs[extras[i]])
xbmc.log('Setting error ' + setting['value'])

xbmc.log("getRecDirList v5 end")
return dirs
Expand All @@ -172,7 +172,7 @@ def getChannelList_v5(self):
for channel in channels['channels']:
if (channel['channelIcon']):
cnt= cnt+1
if cnt > 0:
if cnt > 0 and my_settings.XNEWA_WEBCLIENT == False:
icons = glob.glob(os.path.join(self.cached_channelPath,'*.*'))
if cnt > len(icons) + 20:
myDlg = xbmcgui.DialogProgress()
Expand Down Expand Up @@ -219,7 +219,8 @@ def getChannelList_v5(self):
pass
except Exception as err:
xbmc.log(str(err))

if myDlg != None:
myDlg.close()
xbmc.log("getChannelList v5 end")
return dic

Expand Down
4 changes: 2 additions & 2 deletions resources/src/XNEWAGlobals.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@

# Script doc constants
__scriptname__ = "knewc"
__version__ = '2.9.0~a1'
__version__ = '2.9.0~a2'
__author__ = 'emveepee'
__original_author__ = 'Ton van der Poel'
__date__ = '2020-09-19'
__date__ = '2020-09-28'

XBMC_DIALOG_BUSY_OPEN = "ActivateWindow(busydialognocancel)"
XBMC_DIALOG_BUSY_CLOSE = "Dialog.Close(busydialognocancel)"
Expand Down
1 change: 1 addition & 0 deletions resources/src/XNEWA_Connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ def GetPVRRecordings(self):
m = re.search('.+ (.+?).pvr', recording['file'])
if m != None:
self.PVRRecordings[m.group(1)] = recording['file']
xbmc.log('Number of recordings: {}'.format(len(self.PVRRecordings)))

#################################################################################################################
def GetPVRRecording(self, recid):
Expand Down
1 change: 1 addition & 0 deletions resources/src/XNEWA_Settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def loadFromSettingsXML(self):
self.XNEWA_SORT_RECORDING = int(addon.getSetting("recordingSort"))
self.XNEWA_SORT_EPISODE = int(addon.getSetting("episodeSort"))
self.NextPVR_STREAM = addon.getSetting("stream")
xbmc.log('Streaming mode: ' + self.NextPVR_STREAM)

self.XNEWA_PREBUFFER = int(addon.getSetting("prebuffer")) // 4
self.XNEWA_POSTBUFFER = int(addon.getSetting("postbuffer")) // 4
Expand Down
13 changes: 9 additions & 4 deletions resources/src/nextpvr/emulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ def getContext(self):
return
url = None
keyBase = ''
dialog = xbmcgui.Dialog
dialog = xbmcgui.Dialog()
value = dialog.select( 'Enter selection', [ 'Remote Keys', 'Recordings', 'TV Guide', 'Main Menu', 'Exit UI Client', '0', '1', '2', '3', '4', '5','6', '7', '8', '9'])
xbmc.log(str(value))

Expand Down Expand Up @@ -730,9 +730,14 @@ def getControlEx(self, url=None, showImage=True):
except Exception as err:
print (err)
code = -1
self.exit = True
self.close()

leave = True
if str(err) == 'timeout':
self.timeout += 1
leave = xbmcgui.Dialog().yesno('NextPVR timeout', 'Do you want to exit UI client?', autoclose=10000)
xbmc.sleep(250)
if leave == True:
self.exit = True
self.close()
return code


Expand Down

0 comments on commit 6975a4f

Please sign in to comment.