mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-01 23:17:50 +00:00
snapclient: Incompatible types when listing cards
Co-authored-by: mglae <mglmail@arcor.de>
This commit is contained in:
parent
5a78883dcc
commit
a4c7d7666c
@ -9,9 +9,10 @@ import xbmcgui
|
||||
SNAPCLIENT = os.path.join(
|
||||
xbmcaddon.Addon().getAddonInfo('path'), 'bin', 'snapclient')
|
||||
|
||||
line = ''
|
||||
card = ''
|
||||
cards = []
|
||||
lines = subprocess.check_output([SNAPCLIENT, '--list']).splitlines()
|
||||
lines = subprocess.run([SNAPCLIENT, '--list'], capture_output=True, text=True).stdout.splitlines()
|
||||
|
||||
for line in lines:
|
||||
if line != '':
|
||||
@ -20,6 +21,10 @@ for line in lines:
|
||||
cards.append(card)
|
||||
card = ''
|
||||
|
||||
# If last line was not empty, make sure to add the last card
|
||||
if line != '' and card != '':
|
||||
cards.append(card)
|
||||
|
||||
dialog = xbmcgui.Dialog()
|
||||
dialog.select(xbmcaddon.Addon().getLocalizedString(30015), cards)
|
||||
del dialog
|
||||
|
Loading…
x
Reference in New Issue
Block a user