mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
Merge pull request #7 from cvium/update_from_upstream_again
Update from upstream again
This commit is contained in:
commit
d195c4e6d2
4 changed files with 18 additions and 39 deletions
|
@ -437,6 +437,8 @@ class Service(xbmc.Monitor):
|
||||||
reload(library)
|
reload(library)
|
||||||
reload(monitor)
|
reload(monitor)
|
||||||
|
|
||||||
|
objects.obj.Objects().mapping()
|
||||||
|
|
||||||
LOG.warn("---[ objects reloaded ]")
|
LOG.warn("---[ objects reloaded ]")
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
|
|
|
@ -10,6 +10,7 @@ import re
|
||||||
import unicodedata
|
import unicodedata
|
||||||
import urllib
|
import urllib
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
import xbmc
|
import xbmc
|
||||||
import xbmcaddon
|
import xbmcaddon
|
||||||
|
@ -95,25 +96,14 @@ def compare_version(a, b):
|
||||||
1 a is larger
|
1 a is larger
|
||||||
0 equal
|
0 equal
|
||||||
'''
|
'''
|
||||||
a = a.split('.')
|
a = LooseVersion(a)
|
||||||
b = b.split('.')
|
b = LooseVersion(b)
|
||||||
|
|
||||||
for i in range(0, max(len(a), len(b)), 1):
|
if a < b:
|
||||||
try:
|
return -1
|
||||||
aVal = a[i]
|
|
||||||
except IndexError:
|
|
||||||
aVal = 0
|
|
||||||
|
|
||||||
try:
|
if a > b:
|
||||||
bVal = b[i]
|
return 1
|
||||||
except IndexError:
|
|
||||||
bVal = 0
|
|
||||||
|
|
||||||
if aVal < bVal:
|
|
||||||
return -1
|
|
||||||
|
|
||||||
if aVal > bVal:
|
|
||||||
return 1
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import hashlib
|
||||||
import socket
|
import socket
|
||||||
import time
|
import time
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
from credentials import Credentials
|
from credentials import Credentials
|
||||||
from http import HTTP
|
from http import HTTP
|
||||||
|
@ -394,25 +395,14 @@ class ConnectionManager(object):
|
||||||
1 a is larger
|
1 a is larger
|
||||||
0 equal
|
0 equal
|
||||||
'''
|
'''
|
||||||
a = a.split('.')
|
a = LooseVersion(a)
|
||||||
b = b.split('.')
|
b = LooseVersion(b)
|
||||||
|
|
||||||
for i in range(0, max(len(a), len(b)), 1):
|
if a < b:
|
||||||
try:
|
return -1
|
||||||
aVal = a[i]
|
|
||||||
except IndexError:
|
|
||||||
aVal = 0
|
|
||||||
|
|
||||||
try:
|
if a > b:
|
||||||
bVal = b[i]
|
return 1
|
||||||
except IndexError:
|
|
||||||
bVal = 0
|
|
||||||
|
|
||||||
if aVal < bVal:
|
|
||||||
return -1
|
|
||||||
|
|
||||||
if aVal > bVal:
|
|
||||||
return 1
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
|
@ -118,12 +118,9 @@ class requestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||||
try:
|
try:
|
||||||
params = self.get_params()
|
params = self.get_params()
|
||||||
|
|
||||||
if not params:
|
if not params or params.get('Id') is None:
|
||||||
raise IndexError("Incomplete URL format")
|
raise IndexError("Incomplete URL format")
|
||||||
|
|
||||||
if not params.get('Id').isdigit():
|
|
||||||
raise IndexError("Incorrect Id format %s" % params.get('Id'))
|
|
||||||
|
|
||||||
xbmc.log("[ webservice ] path: %s params: %s" % (str(self.path), str(params)), xbmc.LOGWARNING)
|
xbmc.log("[ webservice ] path: %s params: %s" % (str(self.path), str(params)), xbmc.LOGWARNING)
|
||||||
|
|
||||||
path = ("plugin://plugin.video.jellyfin?mode=play&id=%s&dbid=%s&filename=%s&transcode=%s"
|
path = ("plugin://plugin.video.jellyfin?mode=play&id=%s&dbid=%s&filename=%s&transcode=%s"
|
||||||
|
|
Loading…
Reference in a new issue