Use six to get correct string format

This commit is contained in:
Matt 2020-03-19 12:37:50 -04:00
parent 44808f5dd4
commit 6e786a1e6b
2 changed files with 3 additions and 2 deletions

View file

@ -7,7 +7,7 @@
<import addon="xbmc.python" version="2.25.0"/> <import addon="xbmc.python" version="2.25.0"/>
<import addon="script.module.requests" version="2.22.0"/> <import addon="script.module.requests" version="2.22.0"/>
<import addon="script.module.dateutil" version="2.7.3"/> <import addon="script.module.dateutil" version="2.7.3"/>
<import addon="script.module.six" /> <import addon="script.module.six" version="1.13"/>
<import addon="script.module.kodi-six" /> <import addon="script.module.kodi-six" />
<import addon="script.module.addon.signals" version="0.0.1"/> <import addon="script.module.addon.signals" version="0.0.1"/>
<import addon="script.module.futures" version="2.2.0"/> <import addon="script.module.futures" version="2.2.0"/>

View file

@ -7,6 +7,7 @@ import logging
import os import os
from kodi_six import xbmcgui, xbmcaddon from kodi_six import xbmcgui, xbmcaddon
from six import ensure_text
from helper import window, addon_id from helper import window, addon_id
@ -64,7 +65,7 @@ class ContextMenu(xbmcgui.WindowXMLDialog):
if self.getFocusId() == LIST: if self.getFocusId() == LIST:
option = self.list_.getSelectedItem() option = self.list_.getSelectedItem()
self.selected_option = option.getLabel().decode('utf-8') self.selected_option = ensure_text(option.getLabel())
LOG.info('option selected: %s', self.selected_option) LOG.info('option selected: %s', self.selected_option)
self.close() self.close()