Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9199eb4290 | ||
|
|
8831af3fb4 | ||
|
|
20b1686b04 | ||
|
|
ae028f485a | ||
|
|
d5af0c8d7e | ||
|
|
e596998a72 | ||
|
|
f224c0b94a | ||
|
|
bc06467784 | ||
|
|
b2f369de10 | ||
|
|
0e070308db | ||
|
|
1b7c3ffae0 | ||
|
|
1069bf73e7 | ||
|
|
483b708def | ||
|
|
be12c0d21f | ||
|
|
bc57964aed |
@@ -1,10 +1,7 @@
|
||||
version: '0.4.0'
|
||||
version: '0.4.3'
|
||||
changelog: |
|
||||
- #44 - Stop doing string manipulations on translations
|
||||
- #50 - Add support for Kodi Matrix
|
||||
- #52 - Use future imports for all library files
|
||||
- #53 - Add build script and set up pipeline
|
||||
- #54 - Fix yesno dialogs in Kodi 19
|
||||
- #62 - Change unicode to str
|
||||
- #63 - Fix displaying public user list
|
||||
dependencies:
|
||||
py2:
|
||||
- addon: 'xbmc.python'
|
||||
|
||||
@@ -14,6 +14,7 @@ from base64 import b64encode
|
||||
from collections import defaultdict
|
||||
from traceback import format_exc
|
||||
from kodi_six.utils import py2_decode
|
||||
from six import ensure_text
|
||||
|
||||
from .kodi_utils import HomeWindow
|
||||
from .clientinfo import ClientInformation
|
||||
@@ -493,7 +494,7 @@ class DownloadUtils:
|
||||
|
||||
secure = False
|
||||
for user in result:
|
||||
if user.get("Name") == unicode(user_name, "utf-8"):
|
||||
if user.get("Name") == ensure_text(user_name, "utf-8"):
|
||||
userid = user.get("Id")
|
||||
user_image = self.get_user_artwork(user, 'Primary')
|
||||
log.debug("Username Found: {0}".format(user.get("Name")))
|
||||
|
||||
@@ -7,6 +7,7 @@ import re
|
||||
from random import shuffle
|
||||
from six.moves.BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
|
||||
from six.moves.urllib.parse import urlparse
|
||||
from six import ensure_text
|
||||
|
||||
import threading
|
||||
import requests
|
||||
@@ -76,7 +77,7 @@ def build_image(path):
|
||||
if request_path == "favicon.ico":
|
||||
return []
|
||||
|
||||
decoded_url = base64.b64decode(request_path)
|
||||
decoded_url = ensure_text(base64.b64decode(request_path))
|
||||
log.debug("decoded_url : {0}".format(decoded_url))
|
||||
|
||||
image_urls = get_image_links(decoded_url)
|
||||
|
||||
@@ -16,6 +16,7 @@ from .utils import get_art, datetime_from_string
|
||||
from .loghandler import LazyLogger
|
||||
from .downloadutils import DownloadUtils
|
||||
from .kodi_utils import HomeWindow
|
||||
from six import ensure_text
|
||||
|
||||
log = LazyLogger(__name__)
|
||||
kodi_version = int(xbmc.getInfoLabel('System.BuildVersion')[:2])
|
||||
@@ -178,7 +179,7 @@ def extract_item_info(item, gui_options):
|
||||
name_info["SeasonIndex"] = u"%02d" % item_details.season_number
|
||||
name_info["EpisodeIndex"] = u"%02d" % item_details.episode_number
|
||||
log.debug("FormatName: {0} | {1}".format(name_format, name_info))
|
||||
item_details.name = unicode(name_format).format(**name_info).strip()
|
||||
item_details.name = ensure_text(name_format).format(**name_info).strip()
|
||||
|
||||
year = item.get("ProductionYear")
|
||||
prem_date = item.get("PremiereDate")
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
from __future__ import division, absolute_import, print_function, unicode_literals
|
||||
|
||||
import sys
|
||||
from six import ensure_binary, ensure_text
|
||||
from six.moves.urllib.parse import quote
|
||||
import base64
|
||||
import string
|
||||
@@ -74,7 +75,7 @@ def show_movie_tags(menu_params):
|
||||
|
||||
item_url = get_jellyfin_url("{server}/Users/{userid}/Items", url_params)
|
||||
|
||||
art = {"thumb": "http://localhost:24276/" + base64.b64encode(item_url)}
|
||||
art = {"thumb": "http://localhost:24276/{}".format(ensure_text(base64.b64encode(ensure_binary(item_url))))}
|
||||
|
||||
content_url = quote(item_url)
|
||||
url = sys.argv[0] + ("?url=" +
|
||||
@@ -160,7 +161,7 @@ def show_movie_years(menu_params):
|
||||
|
||||
item_url = get_jellyfin_url("{server}/Users/{userid}/Items", params)
|
||||
|
||||
art = {"thumb": "http://localhost:24276/" + base64.b64encode(item_url)}
|
||||
art = {"thumb": "http://localhost:24276/{}".format(ensure_text(base64.b64encode(ensure_binary(item_url))))}
|
||||
|
||||
content_url = quote(item_url)
|
||||
url = sys.argv[0] + ("?url=" +
|
||||
@@ -241,7 +242,7 @@ def show_movie_pages(menu_params):
|
||||
item_data['path'] = item_url
|
||||
item_data['media_type'] = 'movies'
|
||||
|
||||
item_data["art"] = {"thumb": "http://localhost:24276/" + base64.b64encode(item_url)}
|
||||
item_data['art'] = {"thumb": "http://localhost:24276/{}".format(ensure_text(base64.b64encode(ensure_binary(item_url))))}
|
||||
|
||||
collections.append(item_data)
|
||||
start_index = start_index + page_limit
|
||||
@@ -322,7 +323,7 @@ def show_genre_list(menu_params):
|
||||
|
||||
url = get_jellyfin_url("{server}/Users/{userid}/Items", params)
|
||||
|
||||
art = {"thumb": "http://localhost:24276/" + base64.b64encode(url)}
|
||||
art = {"thumb": "http://localhost:24276/{}".format(ensure_text(base64.b64encode(ensure_binary(url))))}
|
||||
item_data['art'] = art
|
||||
|
||||
item_data['path'] = url
|
||||
@@ -390,7 +391,7 @@ def show_movie_alpha_list(menu_params):
|
||||
url = get_jellyfin_url("{server}/Users/{userid}/Items", params)
|
||||
item_data['path'] = url
|
||||
|
||||
art = {"thumb": "http://localhost:24276/" + base64.b64encode(url)}
|
||||
art = {"thumb": "http://localhost:24276/{}".format(ensure_text(base64.b64encode(ensure_binary(url))))}
|
||||
item_data['art'] = art
|
||||
|
||||
collections.append(item_data)
|
||||
@@ -451,7 +452,7 @@ def show_tvshow_alpha_list(menu_params):
|
||||
|
||||
item_data['path'] = path
|
||||
|
||||
art = {"thumb": "http://localhost:24276/" + base64.b64encode(path)}
|
||||
art = {"thumb": "http://localhost:24276/{}".format(ensure_text(base64.b64encode(ensure_binary(path))))}
|
||||
item_data['art'] = art
|
||||
|
||||
collections.append(item_data)
|
||||
|
||||
@@ -13,6 +13,7 @@ from datetime import datetime
|
||||
import xbmcaddon
|
||||
import xbmcgui
|
||||
import xbmc
|
||||
from six import ensure_binary
|
||||
from kodi_six.utils import py2_decode
|
||||
|
||||
from .kodi_utils import HomeWindow
|
||||
@@ -132,10 +133,7 @@ def get_server_details():
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
sock.settimeout(4.0)
|
||||
|
||||
sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 3) # timeout
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
|
||||
sock.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_LOOP, 1)
|
||||
sock.setsockopt(socket.IPPROTO_IP, socket.SO_REUSEADDR, 1)
|
||||
|
||||
log.debug("MutliGroup: {0}".format(multi_group))
|
||||
log.debug("Sending UDP Data: {0}".format(message))
|
||||
@@ -318,7 +316,7 @@ def check_server(force=False, change_user=False, notify=False):
|
||||
user_item.setProperty("secure", "true")
|
||||
|
||||
m = hashlib.md5()
|
||||
m.update(name)
|
||||
m.update(ensure_binary(name))
|
||||
hashed_username = m.hexdigest()
|
||||
saved_password = settings.getSetting("saved_user_password_" + hashed_username)
|
||||
if saved_password:
|
||||
|
||||
Reference in New Issue
Block a user