Skip to content

Commit

Permalink
fixes for incorrect py2 module calls
Browse files Browse the repository at this point in the history
  • Loading branch information
pkscout committed Oct 2, 2020
1 parent aaa31e8 commit f8a9366
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libs/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import sys, urlparse
import xbmcgui, xbmcplugin
from urllib import urlencode, quote, unquote
from . import tmdb, data_utils
from .utils import logger, safe_get
try:
Expand Down Expand Up @@ -123,13 +124,13 @@ def get_episode_list(show_id): # pylint: disable=missing-docstring
for episode in show_info['episodes']:
list_item = xbmcgui.ListItem(episode['name'], offscreen=True)
list_item = data_utils.add_episode_info(list_item, episode, full_info=False)
encoded_ids = urlparse.urlencode(
encoded_ids = urlencode(
{'show_id': str(show_info['id']), 'episode_id': str(theindex)}
)
theindex = theindex + 1
# Below "url" is some unique ID string (may be an actual URL to an episode page)
# that allows to retrieve information about a specific episode.
url = urlparse.quote(encoded_ids)
url = quote(encoded_ids)
xbmcplugin.addDirectoryItem(
HANDLE,
url=url,
Expand All @@ -140,7 +141,7 @@ def get_episode_list(show_id): # pylint: disable=missing-docstring

def get_episode_details(encoded_ids): # pylint: disable=missing-docstring
# type: (Text) -> None
encoded_ids = urlparse.unquote(encoded_ids)
encoded_ids = unquote(encoded_ids)
decoded_ids = dict(urlparse.parse_qsl(encoded_ids))
logger.debug('Getting episode details for {}'.format(decoded_ids))
episode_info = tmdb.load_episode_info(
Expand Down

0 comments on commit f8a9366

Please sign in to comment.