mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
add come verification to values passed into functions and returned from download calls
dont log profile change exception bump ver
This commit is contained in:
parent
ec28018c61
commit
62c284fdd7
5 changed files with 14 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="plugin.video.emby"
|
<addon id="plugin.video.emby"
|
||||||
name="Emby"
|
name="Emby"
|
||||||
version="2.3.18"
|
version="2.3.19"
|
||||||
provider-name="Emby.media">
|
provider-name="Emby.media">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.19.0"/>
|
<import addon="xbmc.python" version="2.19.0"/>
|
||||||
|
|
|
@ -144,6 +144,9 @@ class ConnectionManager(object):
|
||||||
|
|
||||||
def _updateServerInfo(self, server, systemInfo):
|
def _updateServerInfo(self, server, systemInfo):
|
||||||
|
|
||||||
|
if server is None or systemInfo is None:
|
||||||
|
return
|
||||||
|
|
||||||
server['Name'] = systemInfo['ServerName']
|
server['Name'] = systemInfo['ServerName']
|
||||||
server['Id'] = systemInfo['Id']
|
server['Id'] = systemInfo['Id']
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,10 @@ class Embydb_Functions():
|
||||||
def getView_embyId(self, item_id):
|
def getView_embyId(self, item_id):
|
||||||
# Returns ancestors using embyId
|
# Returns ancestors using embyId
|
||||||
url = "{server}/emby/Items/%s/Ancestors?UserId={UserId}&format=json" % item_id
|
url = "{server}/emby/Items/%s/Ancestors?UserId={UserId}&format=json" % item_id
|
||||||
for view in self.download(url):
|
view_list = self.download(url)
|
||||||
|
if view_list is None:
|
||||||
|
view_list = []
|
||||||
|
for view in view_list:
|
||||||
|
|
||||||
if view['Type'] == "CollectionFolder":
|
if view['Type'] == "CollectionFolder":
|
||||||
# Found view
|
# Found view
|
||||||
|
|
|
@ -22,6 +22,7 @@ from views import VideoNodes
|
||||||
from utils import window, settings, dialog, language as lang
|
from utils import window, settings, dialog, language as lang
|
||||||
from ga_client import GoogleAnalytics
|
from ga_client import GoogleAnalytics
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import internal_exceptions
|
||||||
|
|
||||||
#################################################################################################
|
#################################################################################################
|
||||||
|
|
||||||
|
@ -106,7 +107,7 @@ class Service(object):
|
||||||
# Profile change happened, terminate this thread and others
|
# Profile change happened, terminate this thread and others
|
||||||
log.info("Kodi profile was: %s and changed to: %s. Terminating old Emby thread.",
|
log.info("Kodi profile was: %s and changed to: %s. Terminating old Emby thread.",
|
||||||
kodi_profile, window('emby_kodiProfile'))
|
kodi_profile, window('emby_kodiProfile'))
|
||||||
raise RuntimeError("Kodi profile changed detected")
|
raise internal_exceptions.ExceptionWrapper("Kodi profile changed detected")
|
||||||
|
|
||||||
# Before proceeding, need to make sure:
|
# Before proceeding, need to make sure:
|
||||||
# 1. Server is online
|
# 1. Server is online
|
||||||
|
|
|
@ -54,7 +54,10 @@ class Views(object):
|
||||||
def _populate_views(self):
|
def _populate_views(self):
|
||||||
# Will get emby views and views in Kodi
|
# Will get emby views and views in Kodi
|
||||||
grouped_views = self.emby.get_views()
|
grouped_views = self.emby.get_views()
|
||||||
self.grouped_views = grouped_views['Items'] if "Items" in grouped_views else []
|
if grouped_views is not None and "Items" in grouped_views:
|
||||||
|
self.grouped_views = grouped_views['Items']
|
||||||
|
else:
|
||||||
|
self.grouped_views = []
|
||||||
|
|
||||||
for view in self.emby.getViews(sortedlist=True):
|
for view in self.emby.getViews(sortedlist=True):
|
||||||
self.views.append(view['name'])
|
self.views.append(view['name'])
|
||||||
|
|
Loading…
Reference in a new issue