Ver Fonte

Merge branch 'master' into new-playserver

A há 4 anos atrás
pai
commit
f6e0c714f3
5 ficheiros alterados com 15 adições e 9 exclusões
  1. 1 1
      addon.xml
  2. 1 1
      addon_template.xml
  3. 2 2
      settings_template.xml
  4. 1 1
      src/consts.py
  5. 10 4
      src/playserver.py

+ 1 - 1
addon.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.cryflix_beta" name="[COLOR red]Cry[/COLOR]flix_beta" version="2.2.3">
+<addon id="plugin.video.cryflix_beta" name="[COLOR red]Cry[/COLOR]flix_beta" version="2.2.4">
     <requires>
         <import addon="xbmc.python" version="2.1.0"/>
         <import addon="script.module.simplejson" version="2.0.10"/>

+ 1 - 1
addon_template.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.cryflix%RELEASE%" name="[COLOR red]Cry[/COLOR]flix%RELEASE%" version="2.2.3">
+<addon id="plugin.video.cryflix%RELEASE%" name="[COLOR red]Cry[/COLOR]flix%RELEASE%" version="2.2.4">
     <requires>
         <import addon="xbmc.python" version="2.1.0"/>
         <import addon="script.module.simplejson" version="2.0.10"/>

+ 2 - 2
settings_template.xml

@@ -36,7 +36,7 @@
         <setting id="watchedlistid" default="0" type="select" label="Watchedlist Nummer" lvalues="32018|32019|32020|32021" value="0|1|2|3" visible="false"/>
 
         <setting label=" " type="lsep"/>
-        <setting id="shownewcomer" type="bool" label="Menüpunkt '[B]Neueinsteiger[/B]' anzeigen" default="false"/>
+        <setting id="shownewcomer" type="bool" label="Menüpunkt '[B]Neueinsteiger[/B]' anzeigen" default="true"/>
         <setting id="moviesperpage" type="number" label="Filme pro Seite ([B]1-150[/B])" default="50"/>
         <setting id="usetagline" type="bool" label="Tagline für Informationen nutzen" default="true"/>
         <setting id="switchtagline" type="bool" label="Titel und Tagline vertauschen" default="false"/>
@@ -44,7 +44,7 @@
         <setting label=" " type="lsep"/>
         <setting id="colorline" type="text" label="Farbe für Cinelines" default="red"/>
         <setting id="coloruhd" type="text" label="Farbe für UHD" default="yellow"/>
-        <setting id="askbeforeplay" type="bool" label="Fragen ob der Film gestartet werden soll" default="true"/>
+        <setting id="askbeforeplay" type="bool" label="Fragen ob der Film gestartet werden soll" default="false"/>
         <setting id="askfornextepisode" type="bool" label="Fragen ob die nächste Episode gestartet werden soll" default="true"/>
         <setting id="viewtypes" default="0" type="select" label="Einträge Filtern nach" lvalues="32011|32012|32013|32014|32015|32016|32017" value="0|1|2|3|4|5|6"/>
     </category>

+ 1 - 1
src/consts.py

@@ -128,7 +128,7 @@ if win.getWidth() >= 1600:
 
 PLUGIN_NAME = "kodi"
 PLUGIN_VERSION = PLUGIN.info("version")
-PLUGIN_TOKEN = "74f0f17b644c5c1cb2ea4fbf18093131"
+PLUGIN_TOKEN = "19d718fa70115439b9a1d994e300c1f0"
 PLUGIN_HASH = md5_string("%s%s%s" % (PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_TOKEN))
 
 DEVICE_IDENTIFER = ""

+ 10 - 4
src/playserver.py

@@ -94,12 +94,14 @@ class __PlayServer__(object):
             if not request:
                 return False
 
-            matches = re.search(r"^([^\s]+) /([^/]+)(?:/([^/]+))?/[^\s]* HTTP", request, re.IGNORECASE | re.MULTILINE)
+            matches = re.search(r"^([^\s]+) /(.*(?=/))/[^\s]* HTTP", request, re.IGNORECASE | re.MULTILINE)
             if matches:
+                method = matches.group(1)
+                params = matches.group(2).split("/")
                 output("[SERVER-" + str(self._port) + "] Request: %s" % str([matches.group(i + 1) for i in xrange(len(matches.groups()))]))
 
                 method = matches.group(1)
-                command = matches.group(2)
+                command = params[0]
 
                 if method == "HEAD":
                     if command == "play":
@@ -117,7 +119,7 @@ class __PlayServer__(object):
                         read_settings()
                         check_settings()
 
-                        episode_id = matches.group(3)
+                        episode_id = params[1]
 
                         self.__play_end__(self._episode_id)
 
@@ -134,10 +136,11 @@ class __PlayServer__(object):
                         except Exception as e:
                             self._running = False
                             output("[SERVER-" + str(self._port) + "] Client Play Error: %s" % traceback.format_exc())
-                            __client_socket__.send("HTTP/1.1 400 Bad Request\r\nConnection: close\r\n\r\n")
 
                             PLUGIN.notify("Fehler beim Abspielen!")
 
+                            raise e
+
                         finally:
                             hide_busy_dialog()
 
@@ -152,8 +155,11 @@ class __PlayServer__(object):
             return True
 
         except:
+            __client_socket__.send("HTTP/1.1 400 Bad Request\r\nConnection: close\r\n\r\n")
+
             self._running = False
             output("[SERVER-" + str(self._port) + "] Client Error: %s" % traceback.format_exc())
+
             return False
 
         finally: