Skip to content

Commit

Permalink
Merge pull request #401 from anxdpanic/pr-1
Browse files Browse the repository at this point in the history
2.3.2
  • Loading branch information
anxdpanic authored Sep 12, 2018
2 parents b7c29b9 + 56d586e commit 0169c1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 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='plugin.video.twitch' version='2.3.1' name='Twitch' provider-name='A Talented Community'>
<addon id='plugin.video.twitch' version='2.3.2' name='Twitch' provider-name='A Talented Community'>
<requires>
<import addon='xbmc.python' version='2.20.0'/>
<import addon='script.module.six' version='1.11.0'/>
Expand All @@ -13,6 +13,9 @@
<extension point='xbmc.addon.metadata'>
<platform>all</platform>
<news>
2.3.2
[fix] py3 encoding issues

2.3.1
[fix] i18n UnicodeEncodeError

Expand Down
8 changes: 4 additions & 4 deletions resources/lib/twitch_addon/addon/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def game_to_listitem(self, game):
viewer_count = str(game[Keys.VIEWERS])
if Keys.GAME in game:
game = game[Keys.GAME]
name = game[Keys.NAME].encode('utf-8')
name = game[Keys.NAME]
if not name:
name = i18n('unknown_game')
image = self.get_thumbnail(game.get(Keys.BOX, game.get(Keys.LOGO)), Images.BOXART)
Expand All @@ -81,9 +81,9 @@ def game_to_listitem(self, game):
'info': {u'plot': plot, u'plotoutline': plot, u'tagline': plot}}

def community_to_listitem(self, community):
name = community[Keys.NAME].encode('utf-8')
name = community[Keys.NAME]
display_name = community.get(Keys.DISPLAY_NAME)
display_name = display_name.encode('utf-8') if display_name else name
display_name = display_name if display_name else name
_id = community[Keys._ID]
image = community.get(Keys.AVATAR_IMAGE, Images.THUMB)
context_menu = list()
Expand All @@ -97,7 +97,7 @@ def community_to_listitem(self, community):
'info': self.get_plot_for_community(community)}

def collection_to_listitem(self, collection):
title = collection[Keys.TITLE].encode('utf-8')
title = collection[Keys.TITLE]
_id = collection[Keys._ID]
image = self.get_thumbnail(collection[Keys.THUMBNAILS])
owner = collection[Keys.OWNER]
Expand Down

0 comments on commit 0169c1e

Please sign in to comment.