mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-24 09:46:11 +00:00
Remove six: iteritems
This commit is contained in:
parent
0e80c7cbcc
commit
a00a1951cb
7 changed files with 11 additions and 15 deletions
|
@ -3,7 +3,6 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
||||||
|
|
||||||
##################################################################################################
|
##################################################################################################
|
||||||
|
|
||||||
from six import iteritems
|
|
||||||
from kodi_six import xbmcgui
|
from kodi_six import xbmcgui
|
||||||
|
|
||||||
from ..helper import translate, LazyLogger, kodi_version
|
from ..helper import translate, LazyLogger, kodi_version
|
||||||
|
@ -34,7 +33,7 @@ class LoginManual(xbmcgui.WindowXMLDialog):
|
||||||
|
|
||||||
def set_args(self, **kwargs):
|
def set_args(self, **kwargs):
|
||||||
# connect_manager, user_image, servers
|
# connect_manager, user_image, servers
|
||||||
for key, value in iteritems(kwargs):
|
for key, value in kwargs.items():
|
||||||
setattr(self, key, value)
|
setattr(self, key, value)
|
||||||
|
|
||||||
def is_logged_in(self):
|
def is_logged_in(self):
|
||||||
|
|
|
@ -3,7 +3,6 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
||||||
|
|
||||||
##################################################################################################
|
##################################################################################################
|
||||||
|
|
||||||
from six import iteritems
|
|
||||||
from kodi_six import xbmc, xbmcgui
|
from kodi_six import xbmc, xbmcgui
|
||||||
|
|
||||||
from ..helper import translate
|
from ..helper import translate
|
||||||
|
@ -44,7 +43,7 @@ class ServerConnect(xbmcgui.WindowXMLDialog):
|
||||||
|
|
||||||
def set_args(self, **kwargs):
|
def set_args(self, **kwargs):
|
||||||
# connect_manager, user_image, servers
|
# connect_manager, user_image, servers
|
||||||
for key, value in iteritems(kwargs):
|
for key, value in kwargs.items():
|
||||||
setattr(self, key, value)
|
setattr(self, key, value)
|
||||||
|
|
||||||
def is_server_selected(self):
|
def is_server_selected(self):
|
||||||
|
|
|
@ -5,7 +5,6 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from six import iteritems
|
|
||||||
from kodi_six import xbmcgui
|
from kodi_six import xbmcgui
|
||||||
|
|
||||||
from ..helper import translate
|
from ..helper import translate
|
||||||
|
@ -41,7 +40,7 @@ class ServerManual(xbmcgui.WindowXMLDialog):
|
||||||
|
|
||||||
def set_args(self, **kwargs):
|
def set_args(self, **kwargs):
|
||||||
# connect_manager, user_image, servers, jellyfin_connect
|
# connect_manager, user_image, servers, jellyfin_connect
|
||||||
for key, value in iteritems(kwargs):
|
for key, value in kwargs.items():
|
||||||
setattr(self, key, value)
|
setattr(self, key, value)
|
||||||
|
|
||||||
def is_connected(self):
|
def is_connected(self):
|
||||||
|
|
|
@ -3,7 +3,6 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
||||||
|
|
||||||
##################################################################################################
|
##################################################################################################
|
||||||
|
|
||||||
from six import iteritems
|
|
||||||
from kodi_six import xbmcgui
|
from kodi_six import xbmcgui
|
||||||
|
|
||||||
from ..helper import LazyLogger
|
from ..helper import LazyLogger
|
||||||
|
@ -36,7 +35,7 @@ class UsersConnect(xbmcgui.WindowXMLDialog):
|
||||||
|
|
||||||
def set_args(self, **kwargs):
|
def set_args(self, **kwargs):
|
||||||
# connect_manager, user_image, servers
|
# connect_manager, user_image, servers
|
||||||
for key, value in iteritems(kwargs):
|
for key, value in kwargs.items():
|
||||||
setattr(self, key, value)
|
setattr(self, key, value)
|
||||||
|
|
||||||
def is_user_selected(self):
|
def is_user_selected(self):
|
||||||
|
|
|
@ -7,7 +7,6 @@ import json
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from six import iteritems
|
|
||||||
from six.moves.urllib.parse import parse_qsl, urlencode
|
from six.moves.urllib.parse import parse_qsl, urlencode
|
||||||
from kodi_six import xbmc, xbmcvfs, xbmcgui, xbmcplugin, xbmcaddon
|
from kodi_six import xbmc, xbmcvfs, xbmcgui, xbmcplugin, xbmcaddon
|
||||||
|
|
||||||
|
@ -1073,7 +1072,7 @@ def create_listitem(item):
|
||||||
li.setProperty("dbid", str(item["episodeid"]))
|
li.setProperty("dbid", str(item["episodeid"]))
|
||||||
li.setProperty("fanart_image", item["art"].get("tvshow.fanart", ""))
|
li.setProperty("fanart_image", item["art"].get("tvshow.fanart", ""))
|
||||||
|
|
||||||
for key, value in iteritems(item["streamdetails"]):
|
for key, value in item["streamdetails"].items():
|
||||||
for stream in value:
|
for stream in value:
|
||||||
li.addStreamInfo(key, stream)
|
li.addStreamInfo(key, stream)
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import unicodedata
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
from dateutil import tz, parser
|
from dateutil import tz, parser
|
||||||
from six import text_type, string_types, iteritems, ensure_text, ensure_binary
|
from six import text_type, string_types, ensure_text, ensure_binary
|
||||||
from six.moves.urllib.parse import quote_plus
|
from six.moves.urllib.parse import quote_plus
|
||||||
|
|
||||||
from kodi_six import xbmc, xbmcaddon, xbmcgui, xbmcvfs
|
from kodi_six import xbmc, xbmcaddon, xbmcgui, xbmcvfs
|
||||||
|
@ -103,11 +103,12 @@ def create_id():
|
||||||
|
|
||||||
|
|
||||||
def find(dict, item):
|
def find(dict, item):
|
||||||
|
# FIXME: dead code
|
||||||
"""Find value in dictionary."""
|
"""Find value in dictionary."""
|
||||||
if item in dict:
|
if item in dict:
|
||||||
return dict[item]
|
return dict[item]
|
||||||
|
|
||||||
for key, value in sorted(iteritems(dict), key=lambda kv: (kv[1], kv[0])):
|
for key, value in sorted(dict.items(), key=lambda kv: (kv[1], kv[0])):
|
||||||
|
|
||||||
if re.match(key, item, re.I):
|
if re.match(key, item, re.I):
|
||||||
return dict[key]
|
return dict[key]
|
||||||
|
|
|
@ -6,7 +6,7 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from six import iteritems, ensure_text
|
from six import ensure_text
|
||||||
|
|
||||||
from ..helper import LazyLogger, get_filesystem_encoding
|
from ..helper import LazyLogger, get_filesystem_encoding
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class Objects(object):
|
||||||
|
|
||||||
mapping = self.objects[mapping_name]
|
mapping = self.objects[mapping_name]
|
||||||
|
|
||||||
for key, value in iteritems(mapping):
|
for key, value in mapping.items():
|
||||||
|
|
||||||
self.mapped_item[key] = None
|
self.mapped_item[key] = None
|
||||||
params = value.split(",")
|
params = value.split(",")
|
||||||
|
@ -151,7 +151,7 @@ class Objects(object):
|
||||||
|
|
||||||
result = False
|
result = False
|
||||||
|
|
||||||
for key, value in iteritems(filters):
|
for key, value in filters.items():
|
||||||
|
|
||||||
inverse = False
|
inverse = False
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue