Skip to content

Commit

Permalink
fix(list): Issue with rendering lists that contain entries with uncom…
Browse files Browse the repository at this point in the history
…mon characters
  • Loading branch information
Sebastian Golasch committed Aug 15, 2017
1 parent ea94ea6 commit cf165e8
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 16 deletions.
8 changes: 5 additions & 3 deletions 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.netflix" name="Netflix" version="0.11.20" provider-name="libdev + jojo + asciidisco">
<addon id="plugin.video.netflix" name="Netflix" version="0.11.21" provider-name="libdev + jojo + asciidisco">
<requires>
<import addon="xbmc.python" version="2.24.0"/>
<import addon="script.module.beautifulsoup4" version="4.3.2"/>
Expand Down Expand Up @@ -28,8 +28,10 @@
<license>MIT</license>
<forum>http://www.kodinerds.net/index.php/Thread/55607-Inputstream-Agile-Betatest-Netflix/</forum>
<source>https://github.com/asciidisco/plugin.video.netflix</source>
<news>v0.11.20 (2017-08-07)
- Fixes issues with playback from within the Kodi library
<news>v0.11.21 (2017-08-15)
- Fixes issues with badly encoded TV-Show titles
- Adds Hebrew translations
- Slightly improves list rendering performance
</news>
</extension>
</addon>
2 changes: 1 addition & 1 deletion resources/language/Dutch/strings.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
# Addon version: 0.11.20
# Addon version: 0.11.21
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion resources/language/English/strings.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
# Addon version: 0.11.20
# Addon version: 0.11.21
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion resources/language/German/strings.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
# Addon version: 0.11.20
# Addon version: 0.11.21
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Hebrew/strings.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
# Addon version: 0.11.20
# Addon version: 0.11.21
# Addon Provider: libdev + jojo + asciidisco
# Translated by: Itayshechter
msgid ""
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Italian/strings.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
# Addon version: 0.11.20
# Addon version: 0.11.21
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Polish/strings.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
# Addon version: 0.11.20
# Addon version: 0.11.21
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Portugese/strings.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
# Addon version: 0.11.20
# Addon version: 0.11.21
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Slovak/strings.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
# Addon version: 0.11.20
# Addon version: 0.11.21
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Spanish/strings.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
# Addon version: 0.11.20
# Addon version: 0.11.21
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion resources/language/Swedish/strings.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
# Addon version: 0.11.20
# Addon version: 0.11.21
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
Expand Down
7 changes: 4 additions & 3 deletions resources/lib/KodiHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import xbmcgui
import xbmc
import json
import base64
from MSL import MSL
from os import remove
from os.path import join, isfile
Expand Down Expand Up @@ -464,7 +465,7 @@ def build_video_listing (self, video_list, actions, type, build_url):
isFolder = True
params = {'action': actions[video['type']], 'show_id': video_list_id}
if 'tvshowtitle' in infos:
params['tvshowtitle'] = infos.get('tvshowtitle', '').encode('utf-8')
params['tvshowtitle'] = base64.urlsafe_b64encode(infos.get('tvshowtitle', '').encode('utf-8'))
url = build_url(params)
xbmcplugin.addDirectoryItem(handle=self.plugin_handle, url=url, listitem=li, isFolder=isFolder)

Expand Down Expand Up @@ -585,7 +586,7 @@ def build_season_listing (self, seasons_sorted, build_url):
li = self._generate_context_menu_items(entry=season, li=li)
params = {'action': 'episode_list', 'season_id': season['id']}
if 'tvshowtitle' in infos:
params['tvshowtitle'] = infos.get('tvshowtitle', '').encode('utf-8')
params['tvshowtitle'] = base64.urlsafe_b64encode(infos.get('tvshowtitle', '').encode('utf-8'))
url = build_url(params)
xbmcplugin.addDirectoryItem(handle=self.plugin_handle, url=url, listitem=li, isFolder=True)

Expand Down Expand Up @@ -806,7 +807,7 @@ def _generate_entry_info (self, entry, li, base_info={}):
quality = {'width': '1920', 'height': '1080'}
li.addStreamInfo('video', quality)
if 'tvshowtitle' in entry_keys:
infos.update({'tvshowtitle': entry.get('tvshowtitle', '').encode('utf-8')})
infos.update({'tvshowtitle': base64.urlsafe_b64decode(entry.get('tvshowtitle', '')).decode('utf-8')})
li.setInfo('video', infos)
return li, infos

Expand Down

0 comments on commit cf165e8

Please sign in to comment.