|
@@ -1,11 +1,15 @@
|
|
# -*- coding: utf-8 -*-
|
|
# -*- coding: utf-8 -*-
|
|
|
|
+import base64
|
|
|
|
+import copy
|
|
|
|
|
|
-from api import *
|
|
|
|
from consts import *
|
|
from consts import *
|
|
|
|
+from utils import *
|
|
|
|
+from api import *
|
|
|
|
+
|
|
import datetime
|
|
import datetime
|
|
-import pprint
|
|
|
|
-import copy
|
|
|
|
-import urllib
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+# xbmc.log(str(xbmc.getCondVisibility("System.GetBool(debug.showloginfo)")))
|
|
|
|
|
|
|
|
|
|
@PLUGIN.route("/empty/", name="empty", update=False, cache=True)
|
|
@PLUGIN.route("/empty/", name="empty", update=False, cache=True)
|
|
@@ -38,12 +42,12 @@ def play_trailer(trailer_id="", age=""):
|
|
xbmc.log("[YOUTUBE] Error: %s" % traceback.format_exc())
|
|
xbmc.log("[YOUTUBE] Error: %s" % traceback.format_exc())
|
|
|
|
|
|
hide_busy_dialog()
|
|
hide_busy_dialog()
|
|
- PLUGIN.dialog("Es ist ein Fehler passiert bei YT:\n%s" % repr(e))
|
|
|
|
|
|
+ PLUGIN.dialog("Es ist ein Fehler passiert bei YT:\n%s" % str(e))
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
if streams is False:
|
|
if streams is False:
|
|
hide_busy_dialog()
|
|
hide_busy_dialog()
|
|
- PLUGIN.dialog("Das Addon [B]plugin.video.youtube[/B] muss installiert sein")
|
|
|
|
|
|
+ PLUGIN.dialog("Das Addon [B]plugin.video.youtube[/B] muss installiert sein.")
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
if not streams or len(streams) <= 0:
|
|
if not streams or len(streams) <= 0:
|
|
@@ -59,17 +63,31 @@ def play_trailer(trailer_id="", age=""):
|
|
"is_playable": True
|
|
"is_playable": True
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ li = PLUGIN._listitemify(item).as_xbmc_listitem()
|
|
|
|
+ if stream["container"] == "mpd":
|
|
|
|
+ if not HAS_DRM_LIB:
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+ PLUGIN.dialog("Das Addon [B]inputstream.adaptive[/B] muss für diesen Trailer installiert sein.")
|
|
|
|
+ return empty()
|
|
|
|
+
|
|
|
|
+ if KODI_VERSION >= 19:
|
|
|
|
+ li.setProperty("inputstream", "inputstream.adaptive")
|
|
|
|
+ else:
|
|
|
|
+ li.setProperty("inputstreamaddon", "inputstream.adaptive")
|
|
|
|
+ li.setProperty("inputstream.adaptive.manifest_type", "mpd")
|
|
|
|
+ li.setMimeType("application/dash+xml")
|
|
|
|
+ li.setContentLookup(False)
|
|
|
|
+
|
|
|
|
+ elif stream["container"] in ["ism", "hls", "rtmp"]:
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+ PLUGIN.dialog("Container [B]%s[/B] wird nicht abspielbar!" % stream["container"])
|
|
|
|
+ return empty()
|
|
|
|
+
|
|
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
|
|
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
|
|
playlist.clear()
|
|
playlist.clear()
|
|
-
|
|
|
|
- li = PLUGIN._listitemify(item).as_xbmc_listitem()
|
|
|
|
playlist.add(item["path"], li)
|
|
playlist.add(item["path"], li)
|
|
|
|
|
|
player = xbmc.Player()
|
|
player = xbmc.Player()
|
|
-
|
|
|
|
- if False:
|
|
|
|
- PLUGIN.notify("Trailer wird versucht abzuspielen!")
|
|
|
|
-
|
|
|
|
player.play(playlist)
|
|
player.play(playlist)
|
|
del player
|
|
del player
|
|
player = None
|
|
player = None
|
|
@@ -84,6 +102,8 @@ def view_actors(movie_id=0):
|
|
|
|
|
|
items = []
|
|
items = []
|
|
|
|
|
|
|
|
+ show_busy_dialog()
|
|
|
|
+
|
|
movie_result = __api__.__get__("get/movie", __data__={
|
|
movie_result = __api__.__get__("get/movie", __data__={
|
|
"id": movie_id,
|
|
"id": movie_id,
|
|
"withActors": 1
|
|
"withActors": 1
|
|
@@ -101,11 +121,11 @@ def view_actors(movie_id=0):
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
items = [
|
|
items = [
|
|
- {
|
|
|
|
|
|
+ set_thumbnail({
|
|
"label": unicode(entry["name"]),
|
|
"label": unicode(entry["name"]),
|
|
"path": PLUGIN.url_for(endpoint="view_actor",
|
|
"path": PLUGIN.url_for(endpoint="view_actor",
|
|
actor_id=entry['id'],
|
|
actor_id=entry['id'],
|
|
- page=0),
|
|
|
|
|
|
+ page=1),
|
|
"thumbnail": get_poster_url(entry["profile"]),
|
|
"thumbnail": get_poster_url(entry["profile"]),
|
|
"info": {
|
|
"info": {
|
|
"count": entry["id"],
|
|
"count": entry["id"],
|
|
@@ -114,17 +134,21 @@ def view_actors(movie_id=0):
|
|
"is_playable": False,
|
|
"is_playable": False,
|
|
"context_menu": misc_menu(),
|
|
"context_menu": misc_menu(),
|
|
"replace_context_menu": True
|
|
"replace_context_menu": True
|
|
- } for idx, entry in enumerate(entries)
|
|
|
|
|
|
+ }) for idx, entry in enumerate(entries)
|
|
]
|
|
]
|
|
|
|
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+
|
|
return items
|
|
return items
|
|
|
|
|
|
|
|
|
|
@PLUGIN.route("/view_actor/<actor_id>/<page>/", name="view_actor", cache=True, content_type="movies", view_mode=get_view("thumbnail"))
|
|
@PLUGIN.route("/view_actor/<actor_id>/<page>/", name="view_actor", cache=True, content_type="movies", view_mode=get_view("thumbnail"))
|
|
-def view_actor(actor_id=0, page=0):
|
|
|
|
|
|
+def view_actor(actor_id=0, page=1):
|
|
if not actor_id or actor_id == 0:
|
|
if not actor_id or actor_id == 0:
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
|
|
+ show_busy_dialog()
|
|
|
|
+
|
|
items = []
|
|
items = []
|
|
|
|
|
|
actor_result = __api__.__get__("get/actor", __data__={
|
|
actor_result = __api__.__get__("get/actor", __data__={
|
|
@@ -133,17 +157,26 @@ def view_actor(actor_id=0, page=0):
|
|
})
|
|
})
|
|
|
|
|
|
if not actor_result:
|
|
if not actor_result:
|
|
|
|
+ hide_busy_dialog()
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
items.extend(prepare_movies_to_list(actor_result["data"]["movies"]))
|
|
items.extend(prepare_movies_to_list(actor_result["data"]["movies"]))
|
|
|
|
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+
|
|
return items
|
|
return items
|
|
|
|
|
|
|
|
|
|
@PLUGIN.route("/search_trailer/<title>/<date>/<fanart>/<age>/", name="search_trailer", cache=False, content_type="episodes", view_mode=get_view("episode"))
|
|
@PLUGIN.route("/search_trailer/<title>/<date>/<fanart>/<age>/", name="search_trailer", cache=False, content_type="episodes", view_mode=get_view("episode"))
|
|
def search_trailer(title="", date="", fanart="", age=""):
|
|
def search_trailer(title="", date="", fanart="", age=""):
|
|
|
|
+ if not HAS_YOUTUBE_LIB:
|
|
|
|
+ PLUGIN.dialog("Das Addon [B]plugin.video.youtube[/B] muss installiert sein.")
|
|
|
|
+ return empty()
|
|
|
|
+
|
|
show_busy_dialog()
|
|
show_busy_dialog()
|
|
|
|
+
|
|
if not title or not master_lock_access(age):
|
|
if not title or not master_lock_access(age):
|
|
|
|
+ hide_busy_dialog()
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
year = re.search("([0-9]{4})-.*", date)
|
|
year = re.search("([0-9]{4})-.*", date)
|
|
@@ -152,26 +185,40 @@ def search_trailer(title="", date="", fanart="", age=""):
|
|
else:
|
|
else:
|
|
year = ""
|
|
year = ""
|
|
|
|
|
|
- title = urllib.pathname2url("%s trailer german deutsch" % (title.replace(":", "")))
|
|
|
|
|
|
+ title = pathname2url("%s trailer german deutsch" % (title.replace(":", "")))
|
|
|
|
|
|
- if DEBUG:
|
|
|
|
- output("[YOUTUBE]: %s" % (YOUTUBE_SEARCH_URL % title))
|
|
|
|
|
|
+ search_url = YOUTUBE_SEARCH_URL % (random.choice(YOUTUBE_KEYS), title)
|
|
|
|
|
|
|
|
+ #ifdef DEBUG
|
|
|
|
+ if DEBUG:
|
|
|
|
+ output("[YOUTUBE]: %s" % search_url)
|
|
|
|
+ #endif
|
|
data = None
|
|
data = None
|
|
try:
|
|
try:
|
|
- data = urllib2.urlopen(YOUTUBE_SEARCH_URL % title).read()
|
|
|
|
- except Exception as e:
|
|
|
|
- output(repr(e))
|
|
|
|
|
|
+ data = urllib_request.urlopen(search_url).read()
|
|
|
|
+ except urllib_request.HTTPError as e:
|
|
|
|
+ data = e.read()
|
|
|
|
+ except:
|
|
|
|
+ output("[YOUTUBE] Exception: %s" % traceback.format_exc())
|
|
|
|
|
|
if not data:
|
|
if not data:
|
|
hide_busy_dialog()
|
|
hide_busy_dialog()
|
|
PLUGIN.dialog("Fehler beim verarbeiten der Antwort.")
|
|
PLUGIN.dialog("Fehler beim verarbeiten der Antwort.")
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
- obj = string_to_json(data)
|
|
|
|
- if not obj or not ('items' in obj):
|
|
|
|
|
|
+ try:
|
|
|
|
+ obj = string_to_json(data)
|
|
|
|
+ except:
|
|
|
|
+ obj = None
|
|
|
|
+
|
|
|
|
+ if not obj or 'items' not in obj:
|
|
hide_busy_dialog()
|
|
hide_busy_dialog()
|
|
- PLUGIN.dialog("Es wurden keine Trailer gefunden")
|
|
|
|
|
|
+ if "error" in obj and len(obj["error"]["errors"]):
|
|
|
|
+ error = obj["error"]["errors"][0]
|
|
|
|
+ PLUGIN.dialog("Es ist ein Fehler passiert bei YT:\n%s" % error["reason"])
|
|
|
|
+ else:
|
|
|
|
+ PLUGIN.dialog("Es wurden keine Trailer gefunden")
|
|
|
|
+
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
entries = obj['items']
|
|
entries = obj['items']
|
|
@@ -181,14 +228,14 @@ def search_trailer(title="", date="", fanart="", age=""):
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
items = [
|
|
items = [
|
|
- {
|
|
|
|
|
|
+ set_thumbnail({
|
|
"label": unicode(entry['snippet']["title"]),
|
|
"label": unicode(entry['snippet']["title"]),
|
|
"path": PLUGIN.url_for(endpoint="play_trailer",
|
|
"path": PLUGIN.url_for(endpoint="play_trailer",
|
|
trailer_id=str(entry['id']['videoId']),
|
|
trailer_id=str(entry['id']['videoId']),
|
|
age="0"),
|
|
age="0"),
|
|
"thumbnail": entry['snippet']['thumbnails']['high']['url'].replace("https://", "http://"),
|
|
"thumbnail": entry['snippet']['thumbnails']['high']['url'].replace("https://", "http://"),
|
|
"properties": {
|
|
"properties": {
|
|
- "fanart_image": urllib.unquote(fanart) if fanart and fanart != "None" else "",
|
|
|
|
|
|
+ "fanart_image": urllib_parse.unquote(fanart) if fanart and fanart != "None" else "",
|
|
},
|
|
},
|
|
"info": {
|
|
"info": {
|
|
"count": entry["id"]["videoId"],
|
|
"count": entry["id"]["videoId"],
|
|
@@ -197,7 +244,7 @@ def search_trailer(title="", date="", fanart="", age=""):
|
|
"premiered": entry['snippet']["publishedAt"][:10] if entry['snippet']["publishedAt"] else ""
|
|
"premiered": entry['snippet']["publishedAt"][:10] if entry['snippet']["publishedAt"] else ""
|
|
},
|
|
},
|
|
"is_playable": False,
|
|
"is_playable": False,
|
|
- } for idx, entry in enumerate(entries)
|
|
|
|
|
|
+ }) for idx, entry in enumerate(entries)
|
|
]
|
|
]
|
|
|
|
|
|
hide_busy_dialog()
|
|
hide_busy_dialog()
|
|
@@ -221,7 +268,7 @@ def watchlist_action(movie_id="0", action="add", refresh=0):
|
|
|
|
|
|
message = None
|
|
message = None
|
|
if action == "add":
|
|
if action == "add":
|
|
- message = u"Eintrag wurde der Liste hinzugefügt"
|
|
|
|
|
|
+ message = "Eintrag wurde der Liste hinzugefuegt"
|
|
|
|
|
|
elif action == "remove":
|
|
elif action == "remove":
|
|
message = "Eintrag wurde aus der Liste entfernt"
|
|
message = "Eintrag wurde aus der Liste entfernt"
|
|
@@ -235,11 +282,26 @@ def watchlist_action(movie_id="0", action="add", refresh=0):
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
|
|
|
|
-@PLUGIN.route("/view_list/<list_type>/<page>/<view_types>/<genre>/<min_year>/<max_year>/<query>/", name="view_list", update=False, cache=True, content_type="movies", view_mode=get_view("thumbnail"))
|
|
|
|
|
|
+class UrlBasedCache():
|
|
|
|
+ def __trunc__(self):
|
|
|
|
+ try:
|
|
|
|
+ request = PLUGIN.request
|
|
|
|
+ except:
|
|
|
|
+ return True
|
|
|
|
+
|
|
|
|
+ do_cache = not ("/view_list/watched/" in request.url)
|
|
|
|
+ if not do_cache:
|
|
|
|
+ output("[PLUGIN] Cache will be ignored for %s" % request.url)
|
|
|
|
+ return do_cache
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+@PLUGIN.route("/view_list/<list_type>/<page>/<view_types>/<genre>/<min_year>/<max_year>/<query>/", name="view_list", update=False, cache=UrlBasedCache(), content_type="movies", view_mode=get_view("thumbnail"))
|
|
def view_list(list_type="new", view_types="0", page=1, genre="all", min_year=0, max_year=0, query=0):
|
|
def view_list(list_type="new", view_types="0", page=1, genre="all", min_year=0, max_year=0, query=0):
|
|
if str(view_types) == "2":
|
|
if str(view_types) == "2":
|
|
PLUGIN.set_goto_top(False)
|
|
PLUGIN.set_goto_top(False)
|
|
|
|
|
|
|
|
+ show_busy_dialog()
|
|
|
|
+
|
|
items = []
|
|
items = []
|
|
|
|
|
|
params = {
|
|
params = {
|
|
@@ -251,18 +313,23 @@ def view_list(list_type="new", view_types="0", page=1, genre="all", min_year=0,
|
|
}
|
|
}
|
|
|
|
|
|
if query != "0":
|
|
if query != "0":
|
|
- output("Search: %s" % query)
|
|
|
|
- params["title"] = query
|
|
|
|
|
|
+ if sys.version_info.major < 3:
|
|
|
|
+ params["title"] = unicode(base64.b64decode(query), "utf-8").encode("utf-8")
|
|
|
|
+ else:
|
|
|
|
+ params["title"] = base64.b64decode(query)
|
|
|
|
|
|
params["orderby"] = "updated_at|DESC"
|
|
params["orderby"] = "updated_at|DESC"
|
|
# params["orderby"] = "popularity|DESC"
|
|
# params["orderby"] = "popularity|DESC"
|
|
|
|
|
|
if view_types != "0":
|
|
if view_types != "0":
|
|
- params["types"] = view_types
|
|
|
|
|
|
+ params["types"] = view_types.replace("%2C", ",")
|
|
|
|
|
|
if int(min_year) > 0 or int(max_year) > 0:
|
|
if int(min_year) > 0 or int(max_year) > 0:
|
|
params["year"] = "%s-%s" % (min_year, max_year)
|
|
params["year"] = "%s-%s" % (min_year, max_year)
|
|
|
|
|
|
|
|
+ if genre != "all":
|
|
|
|
+ params["genres"] = genre
|
|
|
|
+
|
|
result = __api__.__get__("get/list", __data__=params)
|
|
result = __api__.__get__("get/list", __data__=params)
|
|
if not result:
|
|
if not result:
|
|
hide_busy_dialog()
|
|
hide_busy_dialog()
|
|
@@ -303,6 +370,8 @@ def view_list(list_type="new", view_types="0", page=1, genre="all", min_year=0,
|
|
|
|
|
|
items.extend(pages)
|
|
items.extend(pages)
|
|
|
|
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+
|
|
return items
|
|
return items
|
|
|
|
|
|
|
|
|
|
@@ -311,6 +380,8 @@ def search_similars(movie_id=0, page=1, type=0):
|
|
if not movie_id:
|
|
if not movie_id:
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
|
|
+ show_busy_dialog()
|
|
|
|
+
|
|
result = __api__.__get__("get/similars", __data__={
|
|
result = __api__.__get__("get/similars", __data__={
|
|
"id": movie_id
|
|
"id": movie_id
|
|
})
|
|
})
|
|
@@ -328,6 +399,8 @@ def search_similars(movie_id=0, page=1, type=0):
|
|
|
|
|
|
items.extend(prepare_movies_to_list(result["data"]["results"]))
|
|
items.extend(prepare_movies_to_list(result["data"]["results"]))
|
|
|
|
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+
|
|
return items
|
|
return items
|
|
|
|
|
|
|
|
|
|
@@ -440,8 +513,8 @@ def play_episode(episode_id=0, ask_playlist=0):
|
|
else:
|
|
else:
|
|
li["info"]["tagline"] = tagline
|
|
li["info"]["tagline"] = tagline
|
|
|
|
|
|
- tit = unicode("%s" % (episode_result["data"]["season"]["title"] if episode_result["data"]["season"]["title"] == "Default" else ("%s. %s" % (episode["number"], episode["title"]))))
|
|
|
|
- li["path"] = path = "http://127.0.0.1:%s/play/%s/%s.mkv" % (play_port, episode["id"], urllib.quote(tit))
|
|
|
|
|
|
+ tit = "File" #unicode("%s" % (episode_result["data"]["season"]["title"] if episode_result["data"]["season"]["title"] == "Default" else ("%s. %s" % (episode["number"], episode["title"]))))
|
|
|
|
+ li["path"] = path = "http://127.0.0.1:%s/play/%s/%s.mkv" % (play_port, episode["id"], urllib_parse.quote(tit))
|
|
li = PLUGIN._listitemify(li).as_xbmc_listitem()
|
|
li = PLUGIN._listitemify(li).as_xbmc_listitem()
|
|
playlist.add(path, li)
|
|
playlist.add(path, li)
|
|
|
|
|
|
@@ -466,14 +539,15 @@ def play_episode(episode_id=0, ask_playlist=0):
|
|
else:
|
|
else:
|
|
li["info"]["tagline"] = tagline
|
|
li["info"]["tagline"] = tagline
|
|
|
|
|
|
- tit = unicode("%s" % (episode_result["data"]["season"]["title"] if episode_result["data"]["season"]["title"] == "Default" else ("%s. %s" % (episode["number"], episode["title"]))))
|
|
|
|
- li["path"] = path = "http://127.0.0.1:%s/play/%s/%s.mkv" % (play_port, episode["id"], urllib.quote(tit))
|
|
|
|
|
|
+ tit = "File" #unicode("%s" % (episode_result["data"]["season"]["title"] if episode_result["data"]["season"]["title"] == "Default" else ("%s. %s" % (episode["number"], episode["title"]))))
|
|
|
|
+ li["path"] = path = "http://127.0.0.1:%s/play/%s/%s.mkv" % (play_port, episode["id"], urllib_parse.quote(tit))
|
|
li = PLUGIN._listitemify(li).as_xbmc_listitem()
|
|
li = PLUGIN._listitemify(li).as_xbmc_listitem()
|
|
playlist.add(path, li)
|
|
playlist.add(path, li)
|
|
|
|
|
|
#ifdef DEBUG
|
|
#ifdef DEBUG
|
|
for idx in range(playlist.size()):
|
|
for idx in range(playlist.size()):
|
|
- output("[PLAY] %s - Item %s" % (idx, playlist[idx].getPath()))
|
|
|
|
|
|
+ path = playlist[idx].getPath() if hasattr(playlist[idx], "getPath") else playlist[idx].getfilename()
|
|
|
|
+ output("[PLAY] %s - Item %s" % (idx + 1, path))
|
|
#endif
|
|
#endif
|
|
|
|
|
|
first = playlist[0]
|
|
first = playlist[0]
|
|
@@ -493,9 +567,10 @@ def play_episode(episode_id=0, ask_playlist=0):
|
|
player.play(playlist)
|
|
player.play(playlist)
|
|
del player
|
|
del player
|
|
player = None
|
|
player = None
|
|
-
|
|
|
|
|
|
+ show_busy_dialog()
|
|
xbmc.sleep(250)
|
|
xbmc.sleep(250)
|
|
- xbmc.executebuiltin("XBMC.Action(FullScreen)")
|
|
|
|
|
|
+ xbmc.executebuiltin("Action(FullScreen)")
|
|
|
|
+ show_busy_dialog()
|
|
|
|
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
@@ -504,6 +579,7 @@ def play_episode(episode_id=0, ask_playlist=0):
|
|
def seasons(movie_id=0):
|
|
def seasons(movie_id=0):
|
|
show_busy_dialog()
|
|
show_busy_dialog()
|
|
if movie_id == 0:
|
|
if movie_id == 0:
|
|
|
|
+ hide_busy_dialog()
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
movie_result = __api__.__get__("get/movie", __data__={
|
|
movie_result = __api__.__get__("get/movie", __data__={
|
|
@@ -528,7 +604,7 @@ def seasons(movie_id=0):
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
items = [
|
|
items = [
|
|
- {
|
|
|
|
|
|
+ set_thumbnail({
|
|
"label": unicode(season["title"]),
|
|
"label": unicode(season["title"]),
|
|
"path": PLUGIN.url_for(endpoint="episodes", season_id=season['id']),
|
|
"path": PLUGIN.url_for(endpoint="episodes", season_id=season['id']),
|
|
"thumbnail": get_poster_url(season["posterurl"] if season["posterurl"] else season_result["data"]["posterurl"]),
|
|
"thumbnail": get_poster_url(season["posterurl"] if season["posterurl"] else season_result["data"]["posterurl"]),
|
|
@@ -546,7 +622,7 @@ def seasons(movie_id=0):
|
|
},
|
|
},
|
|
"context_menu": misc_menu(),
|
|
"context_menu": misc_menu(),
|
|
"replace_context_menu": False
|
|
"replace_context_menu": False
|
|
- } for season in season_result["data"]["seasons"]
|
|
|
|
|
|
+ }) for season in season_result["data"]["seasons"]
|
|
]
|
|
]
|
|
|
|
|
|
hide_busy_dialog()
|
|
hide_busy_dialog()
|
|
@@ -558,6 +634,7 @@ def seasons(movie_id=0):
|
|
def episodes(season_id=0, dialog=True):
|
|
def episodes(season_id=0, dialog=True):
|
|
show_busy_dialog()
|
|
show_busy_dialog()
|
|
if season_id == 0:
|
|
if season_id == 0:
|
|
|
|
+ hide_busy_dialog()
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
episode_results = __api__.__get__("get/season", __data__={
|
|
episode_results = __api__.__get__("get/season", __data__={
|
|
@@ -572,7 +649,7 @@ def episodes(season_id=0, dialog=True):
|
|
if not episode["id"]:
|
|
if not episode["id"]:
|
|
continue
|
|
continue
|
|
|
|
|
|
- items.append({
|
|
|
|
|
|
+ items.append(set_thumbnail({
|
|
"label": "%s. %s" % (episode["number"], unicode(episode["title"])),
|
|
"label": "%s. %s" % (episode["number"], unicode(episode["title"])),
|
|
"path": PLUGIN.url_for(endpoint="play_episode",
|
|
"path": PLUGIN.url_for(endpoint="play_episode",
|
|
episode_id=episode['id'],
|
|
episode_id=episode['id'],
|
|
@@ -580,7 +657,7 @@ def episodes(season_id=0, dialog=True):
|
|
"is_playable": False,
|
|
"is_playable": False,
|
|
"thumbnail": get_scene_url(episode["posterurl"] if episode["posterurl"] else None),
|
|
"thumbnail": get_scene_url(episode["posterurl"] if episode["posterurl"] else None),
|
|
"properties": {
|
|
"properties": {
|
|
- # "fanart_image": get_backdrop_url(obj["data"]["movie"]['backdropurl']),
|
|
|
|
|
|
+ #"fanart_image": get_backdrop_url(episode_results["data"]['backdropurl']),
|
|
},
|
|
},
|
|
"info": {
|
|
"info": {
|
|
"plot": unicode(episode["description"]) if episode["description"] else (unicode(episode_results["data"]["description"]) if episode_results["data"]["description"] else None),
|
|
"plot": unicode(episode["description"]) if episode["description"] else (unicode(episode_results["data"]["description"]) if episode_results["data"]["description"] else None),
|
|
@@ -593,31 +670,57 @@ def episodes(season_id=0, dialog=True):
|
|
},
|
|
},
|
|
"context_menu": misc_menu(episode_id=episode["id"]),
|
|
"context_menu": misc_menu(episode_id=episode["id"]),
|
|
"replace_context_menu": False
|
|
"replace_context_menu": False
|
|
- })
|
|
|
|
|
|
+ }))
|
|
|
|
|
|
hide_busy_dialog()
|
|
hide_busy_dialog()
|
|
|
|
|
|
return items
|
|
return items
|
|
|
|
|
|
|
|
|
|
-@PLUGIN.route("/mark_as_seen/<episodeid>/", name="mark_as_seen")
|
|
|
|
-def mark_as_seen(episodeid="0"):
|
|
|
|
|
|
+@PLUGIN.route("/mark_as_seen/<episodeid>/<seen>/", name="mark_as_seen")
|
|
|
|
+def mark_as_seen(episodeid="0", seen="0"):
|
|
if not episodeid or episodeid == "0":
|
|
if not episodeid or episodeid == "0":
|
|
- return None
|
|
|
|
|
|
+ return empty()
|
|
|
|
+
|
|
|
|
+ show_busy_dialog()
|
|
|
|
+
|
|
|
|
+ if not save_watchtime(episodeid, time=0, seen=int(seen)):
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+ PLUGIN.notify("Fehler beim ausfuehren der Aktion!")
|
|
|
|
+ else:
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+ PLUGIN.notify("Eintrag wurde als %sgesehen markiert." % ("un" if not int(seen) else ""))
|
|
|
|
|
|
return None
|
|
return None
|
|
|
|
|
|
|
|
|
|
@PLUGIN.route("/account_status/", name="account_status")
|
|
@PLUGIN.route("/account_status/", name="account_status")
|
|
def account_status():
|
|
def account_status():
|
|
- return empty()
|
|
|
|
|
|
+ userinfo_result = __api__.__get__("get/userinfo")
|
|
|
|
+
|
|
|
|
+ if not userinfo_result:
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+ PLUGIN.dialog("Fehler beim verarbeiten der Antwort.")
|
|
|
|
+ return empty()
|
|
|
|
+
|
|
|
|
+ data = userinfo_result["data"]
|
|
|
|
+ text = ""
|
|
|
|
+ if data and "abonnement" in data:
|
|
|
|
+ text += "[B]Laufzeit:[/B]\n\n"
|
|
|
|
+ text += "%s - %s" % (data["abonnement"]["start"]["date"], data["abonnement"]["end"]["date"])
|
|
|
|
+ else:
|
|
|
|
+ text = u"Keine Informationen bezüglich Laufzeit."
|
|
|
|
+
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+ PLUGIN.dialog(text)
|
|
|
|
+ return None
|
|
|
|
|
|
|
|
|
|
@PLUGIN.route("/clear_password/", name="clear_password")
|
|
@PLUGIN.route("/clear_password/", name="clear_password")
|
|
def clear_password():
|
|
def clear_password():
|
|
clear_session()
|
|
clear_session()
|
|
PLUGIN.set_setting("password", "")
|
|
PLUGIN.set_setting("password", "")
|
|
- return empty()
|
|
|
|
|
|
+ return None
|
|
|
|
|
|
|
|
|
|
@PLUGIN.route("/clear_storage/", name="clear_storage")
|
|
@PLUGIN.route("/clear_storage/", name="clear_storage")
|
|
@@ -627,29 +730,106 @@ def clear_storage():
|
|
clear_session()
|
|
clear_session()
|
|
|
|
|
|
PLUGIN.notify("Storage wurde geleert.")
|
|
PLUGIN.notify("Storage wurde geleert.")
|
|
- return empty()
|
|
|
|
|
|
+ return None
|
|
|
|
|
|
|
|
|
|
-@PLUGIN.route("/search/<is_actor>/", name="search", cache=False)
|
|
|
|
-def search(is_actor="0"):
|
|
|
|
- is_actor = 0
|
|
|
|
|
|
+@PLUGIN.route("/fuckinghell/<is_actor>/", name="fuckinghell", cache=False)
|
|
|
|
+def fuckinghell(is_actor="0"):
|
|
|
|
+ is_actor = str(is_actor)
|
|
|
|
|
|
title = "Schauspieler" if is_actor == "1" else "Film oder Serie"
|
|
title = "Schauspieler" if is_actor == "1" else "Film oder Serie"
|
|
query = PLUGIN.keyboard('', "Nach %s Suchen" % title)
|
|
query = PLUGIN.keyboard('', "Nach %s Suchen" % title)
|
|
|
|
|
|
if query:
|
|
if query:
|
|
- return PLUGIN.redirect(PLUGIN.url_for(endpoint="view_list",
|
|
|
|
- list_type="all",
|
|
|
|
- view_types=VIEW_TYPES,
|
|
|
|
- genre="all",
|
|
|
|
- min_year=0,
|
|
|
|
- max_year=0,
|
|
|
|
- query=query,
|
|
|
|
- page=1))
|
|
|
|
|
|
+ query = base64.b64encode(convert_to_bytes(query))
|
|
|
|
+ if is_actor == "1":
|
|
|
|
+ return PLUGIN.redirect(PLUGIN.url_for(endpoint="search_actors",
|
|
|
|
+ query=query,
|
|
|
|
+ page=1))
|
|
|
|
+
|
|
|
|
+ else:
|
|
|
|
+ return PLUGIN.redirect(PLUGIN.url_for(endpoint="view_list",
|
|
|
|
+ list_type="all",
|
|
|
|
+ view_types=VIEW_TYPES,
|
|
|
|
+ genre="all",
|
|
|
|
+ min_year=0,
|
|
|
|
+ max_year=0,
|
|
|
|
+ query=query,
|
|
|
|
+ page=1))
|
|
|
|
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
|
|
|
|
|
|
+@PLUGIN.route("/search_actors/<query>/<page>/", name="search_actors", cache=True, content_type="movies", view_mode=get_view("thumbnail"), goto_top=True)
|
|
|
|
+def search_actors(query="", page=1):
|
|
|
|
+ if not query:
|
|
|
|
+ return empty()
|
|
|
|
+
|
|
|
|
+ show_busy_dialog()
|
|
|
|
+
|
|
|
|
+ if sys.version_info.major < 3:
|
|
|
|
+ encoded_query = unicode(base64.b64decode(query), "utf-8").encode("utf-8")
|
|
|
|
+ else:
|
|
|
|
+ encoded_query = base64.b64decode(query)
|
|
|
|
+
|
|
|
|
+ result = __api__.__get__("get/actors", __data__={
|
|
|
|
+ "query": encoded_query,
|
|
|
|
+ "page": page,
|
|
|
|
+ "limit": MOVIES_PER_PAGE,
|
|
|
|
+ "extended": 0
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ if not result:
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+ PLUGIN.notify("Fehler beim verarbeiten der Anfrage.")
|
|
|
|
+ return empty()
|
|
|
|
+
|
|
|
|
+ if result["data"]["total_results"] <= 0:
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+ PLUGIN.dialog(u"Leider wurden keine Einträge gefunden!")
|
|
|
|
+ return empty()
|
|
|
|
+
|
|
|
|
+ items = []
|
|
|
|
+
|
|
|
|
+ actors = result["data"]["results"]
|
|
|
|
+
|
|
|
|
+ for actor in actors:
|
|
|
|
+ items.append(set_thumbnail({
|
|
|
|
+ "label": actor["name"].strip(),
|
|
|
|
+ "thumbnail": get_poster_url(actor["picture"]) if actor["picture"] else "",
|
|
|
|
+ "path": PLUGIN.url_for(endpoint="view_actor",
|
|
|
|
+ actor_id=actor["id"],
|
|
|
|
+ page=1),
|
|
|
|
+ "context_menu": misc_menu(),
|
|
|
|
+ "replace_context_menu": False
|
|
|
|
+ }))
|
|
|
|
+
|
|
|
|
+ total = result["data"]["total_pages"]
|
|
|
|
+ if total > 1:
|
|
|
|
+ pages = []
|
|
|
|
+ for pagenum in range(1, total + 1):
|
|
|
|
+ pages.append(
|
|
|
|
+ {
|
|
|
|
+ "label": ("[COLOR red][B][I]Seite %s von %s[/I][/B][/COLOR]" % (pagenum, total)) if int(pagenum) == int(page) else "Seite %s von %s" % (pagenum, total),
|
|
|
|
+ "is_playable": False,
|
|
|
|
+ "path": EMPTY_PATH if int(pagenum) == int(page) else PLUGIN.url_for(endpoint="search_actors",
|
|
|
|
+ page=pagenum,
|
|
|
|
+ query=query),
|
|
|
|
+ "info": {
|
|
|
|
+ "playcount": 1 if int(pagenum) == int(page) else 0,
|
|
|
|
+ "tagline": "[B]%s[/B] bis [B]%s[/B]" % (unicode(pagenum * int(result["data"]["limit"])), unicode(min(pagenum * int(result["data"]["limit"]), total)))
|
|
|
|
+ },
|
|
|
|
+ "context_menu": misc_menu(),
|
|
|
|
+ "replace_context_menu": False
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
+ items.extend(pages)
|
|
|
|
+
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+ return items
|
|
|
|
+
|
|
|
|
+
|
|
@PLUGIN.route("/open_settings/", name="open_settings", cache=True)
|
|
@PLUGIN.route("/open_settings/", name="open_settings", cache=True)
|
|
def open_settings():
|
|
def open_settings():
|
|
PLUGIN.open_settings()
|
|
PLUGIN.open_settings()
|
|
@@ -673,8 +853,8 @@ def account_logout():
|
|
@PLUGIN.route("/stop_playserver/", name="stop_playserver", cache=False)
|
|
@PLUGIN.route("/stop_playserver/", name="stop_playserver", cache=False)
|
|
def stop_playserver():
|
|
def stop_playserver():
|
|
server = get_storage("server")
|
|
server = get_storage("server")
|
|
- if server is None or not ("port" in server) or server["port"] == 0:
|
|
|
|
- PLUGIN.notify(u"Playserver läuft nicht!")
|
|
|
|
|
|
+ if server is None or "port" not in server or server["port"] == 0:
|
|
|
|
+ PLUGIN.notify("Playserver laeuft nicht!")
|
|
|
|
|
|
else:
|
|
else:
|
|
try:
|
|
try:
|
|
@@ -695,7 +875,141 @@ def stop_playserver():
|
|
return empty()
|
|
return empty()
|
|
|
|
|
|
|
|
|
|
-# Main
|
|
|
|
|
|
+@PLUGIN.route("/view_filters/", name="view_filters", cache=True, content_type="files", view_mode=get_view("list"))
|
|
|
|
+def view_filters():
|
|
|
|
+ items = []
|
|
|
|
+
|
|
|
|
+ items.append({
|
|
|
|
+ "label": "Nach Genre",
|
|
|
|
+ "path": PLUGIN.url_for(endpoint="filter_genre"),
|
|
|
|
+ })
|
|
|
|
+ items.append({
|
|
|
|
+ "label": "Nach Jahr",
|
|
|
|
+ "path": PLUGIN.url_for(endpoint="filter_years"),
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ return items
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+@PLUGIN.route("/filter_genre/", name="filter_genre", cache=True, content_type="files", view_mode=get_view("list"))
|
|
|
|
+def filter_genre():
|
|
|
|
+ show_busy_dialog()
|
|
|
|
+ items = []
|
|
|
|
+
|
|
|
|
+ result = __api__.__get__("get/genres", __data__={
|
|
|
|
+ "page": 1,
|
|
|
|
+ "limit": 9999999
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ if not result:
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+ PLUGIN.notify("Fehler beim verarbeiten der Anfrage.")
|
|
|
|
+ return empty()
|
|
|
|
+
|
|
|
|
+ if len(result["data"]) <= 0:
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+ PLUGIN.dialog(u"Leider wurden keine Genres gefunden!")
|
|
|
|
+ return empty()
|
|
|
|
+
|
|
|
|
+ for genre in result["data"]:
|
|
|
|
+ items.append({
|
|
|
|
+ "label": "%s (%s)" % (genre["name"], genre["movies"]),
|
|
|
|
+ "path": PLUGIN.url_for(endpoint="view_list",
|
|
|
|
+ genre=genre["name"],
|
|
|
|
+ list_type="all",
|
|
|
|
+ view_types=VIEW_TYPES,
|
|
|
|
+ page=1,
|
|
|
|
+ query=0,
|
|
|
|
+ min_year=0,
|
|
|
|
+ max_year=0),
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ hide_busy_dialog()
|
|
|
|
+ return items
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+@PLUGIN.route("/filter_years_manually/", name="filter_years_manually", cache=False)
|
|
|
|
+def search():
|
|
|
|
+ query = PLUGIN.keyboard('', "Jahr eingeben")
|
|
|
|
+
|
|
|
|
+ if query:
|
|
|
|
+ min_year = query
|
|
|
|
+ max_year = query
|
|
|
|
+ if "-" in query:
|
|
|
|
+ chunks = query.split("-")
|
|
|
|
+ min_year = chunks[0].strip()
|
|
|
|
+ max_year = chunks[1].strip()
|
|
|
|
+
|
|
|
|
+ if not min_year.isdigit() or not max_year.isdigit():
|
|
|
|
+ PLUGIN.dialog(u"Jahr nicht gültig!\nBeispiele:\n- 1950\n- 1900-1950")
|
|
|
|
+ return empty()
|
|
|
|
+
|
|
|
|
+ return PLUGIN.redirect(PLUGIN.url_for(endpoint="view_list",
|
|
|
|
+ genre="all",
|
|
|
|
+ list_type="all",
|
|
|
|
+ view_types=VIEW_TYPES,
|
|
|
|
+ page=1,
|
|
|
|
+ query=0,
|
|
|
|
+ min_year=min_year,
|
|
|
|
+ max_year=max_year))
|
|
|
|
+
|
|
|
|
+ return empty()
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+@PLUGIN.route("/filter_years/", name="filter_years", cache=True, content_type="files", view_mode=get_view("list"), goto_top=False)
|
|
|
|
+def filter_years():
|
|
|
|
+ year = datetime.datetime.now().year
|
|
|
|
+
|
|
|
|
+ current_year = year
|
|
|
|
+ year_range = 0
|
|
|
|
+
|
|
|
|
+ items = []
|
|
|
|
+ while year - year_range >= 1949:
|
|
|
|
+ diff = current_year - year
|
|
|
|
+ if diff < 5:
|
|
|
|
+ year_range = 1
|
|
|
|
+ elif diff <= 10:
|
|
|
|
+ year_range = 5
|
|
|
|
+ else:
|
|
|
|
+ year_range = 10
|
|
|
|
+
|
|
|
|
+ min_year = (year - year_range + 1) if year_range != 1 else year
|
|
|
|
+ max_year = year
|
|
|
|
+
|
|
|
|
+ items.append({
|
|
|
|
+ "label": ("%s - %s" % (year - year_range + 1, year)) if year_range != 1 else str(year),
|
|
|
|
+ "path": PLUGIN.url_for(endpoint="view_list",
|
|
|
|
+ genre="all",
|
|
|
|
+ list_type="all",
|
|
|
|
+ view_types=VIEW_TYPES,
|
|
|
|
+ page=1,
|
|
|
|
+ query=0,
|
|
|
|
+ min_year=min_year,
|
|
|
|
+ max_year=max_year)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ year -= year_range
|
|
|
|
+
|
|
|
|
+ if year >= 1950:
|
|
|
|
+ diff = year - 1950
|
|
|
|
+ items.append({
|
|
|
|
+ "label": ("1950 - %s" % year) if diff > 1 else "1950",
|
|
|
|
+ "path": PLUGIN.url_for(endpoint="view_list",
|
|
|
|
+ genre="all",
|
|
|
|
+ list_type="all",
|
|
|
|
+ view_types=VIEW_TYPES,
|
|
|
|
+ page=1,
|
|
|
|
+ query=0,
|
|
|
|
+ min_year=1950,
|
|
|
|
+ max_year=year if diff > 1 else 1950)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ items.append({
|
|
|
|
+ "label": "Jahr manuell eingeben",
|
|
|
|
+ "path": PLUGIN.url_for(endpoint="filter_years_manually"),
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ return items
|
|
|
|
|
|
|
|
|
|
@PLUGIN.route("/updated_needed/", name="updated_needed", cache=True)
|
|
@PLUGIN.route("/updated_needed/", name="updated_needed", cache=True)
|
|
@@ -704,6 +1018,7 @@ def updated_needed():
|
|
return items
|
|
return items
|
|
|
|
|
|
|
|
|
|
|
|
+# Main
|
|
@PLUGIN.route("/", name="main", update=True, cache=False, content_type="files", view_mode=get_view("list"), goto_top=False)
|
|
@PLUGIN.route("/", name="main", update=True, cache=False, content_type="files", view_mode=get_view("list"), goto_top=False)
|
|
def main():
|
|
def main():
|
|
items = []
|
|
items = []
|
|
@@ -738,19 +1053,18 @@ def main():
|
|
if True:
|
|
if True:
|
|
items.append({
|
|
items.append({
|
|
"label": "Suche Film oder Serie",
|
|
"label": "Suche Film oder Serie",
|
|
- "path": PLUGIN.url_for(endpoint="search",
|
|
|
|
- is_actor=0),
|
|
|
|
|
|
+ "path": PLUGIN.url_for(endpoint="fuckinghell",
|
|
|
|
+ is_actor="0"),
|
|
"context_menu": [
|
|
"context_menu": [
|
|
("", "")
|
|
("", "")
|
|
],
|
|
],
|
|
"replace_context_menu": True,
|
|
"replace_context_menu": True,
|
|
})
|
|
})
|
|
|
|
|
|
- if False:
|
|
|
|
items.append({
|
|
items.append({
|
|
"label": "Suche Schauspieler",
|
|
"label": "Suche Schauspieler",
|
|
- "path": PLUGIN.url_for(endpoint="search",
|
|
|
|
- is_actor=1),
|
|
|
|
|
|
+ "path": PLUGIN.url_for(endpoint="fuckinghell",
|
|
|
|
+ is_actor="1"),
|
|
"context_menu": [
|
|
"context_menu": [
|
|
("", "")
|
|
("", "")
|
|
],
|
|
],
|
|
@@ -761,8 +1075,6 @@ def main():
|
|
if WATCHLIST_TOGETHER:
|
|
if WATCHLIST_TOGETHER:
|
|
items.append({
|
|
items.append({
|
|
"label": "Meine Liste",
|
|
"label": "Meine Liste",
|
|
- # "path": PLUGIN.url_for(endpoint="watchlist", page=1, type="0")
|
|
|
|
-
|
|
|
|
"path": PLUGIN.url_for(endpoint="view_list",
|
|
"path": PLUGIN.url_for(endpoint="view_list",
|
|
list_type="watchlist",
|
|
list_type="watchlist",
|
|
view_types=VIEW_TYPES,
|
|
view_types=VIEW_TYPES,
|
|
@@ -776,7 +1088,6 @@ def main():
|
|
else:
|
|
else:
|
|
items.append({
|
|
items.append({
|
|
"label": "Meine Filme",
|
|
"label": "Meine Filme",
|
|
- # "path": PLUGIN.url_for(endpoint="watchlist", page=1, type="1|3|4")
|
|
|
|
"path": PLUGIN.url_for(endpoint="view_list",
|
|
"path": PLUGIN.url_for(endpoint="view_list",
|
|
list_type="watchlist-movies",
|
|
list_type="watchlist-movies",
|
|
view_types=VIEW_TYPES,
|
|
view_types=VIEW_TYPES,
|
|
@@ -788,7 +1099,6 @@ def main():
|
|
})
|
|
})
|
|
items.append({
|
|
items.append({
|
|
"label": "Meine Serien",
|
|
"label": "Meine Serien",
|
|
- # "path": PLUGIN.url_for(endpoint="watchlist", page=1, type="2|5")
|
|
|
|
"path": PLUGIN.url_for(endpoint="view_list",
|
|
"path": PLUGIN.url_for(endpoint="view_list",
|
|
list_type="watchlist-shows",
|
|
list_type="watchlist-shows",
|
|
view_types=VIEW_TYPES,
|
|
view_types=VIEW_TYPES,
|
|
@@ -850,7 +1160,7 @@ def main():
|
|
max_year=0)
|
|
max_year=0)
|
|
})
|
|
})
|
|
|
|
|
|
- if False:
|
|
|
|
|
|
+ if not HIDE_SERIES:
|
|
items.append({
|
|
items.append({
|
|
"label": "UHD Serien",
|
|
"label": "UHD Serien",
|
|
"path": PLUGIN.url_for(endpoint="view_list",
|
|
"path": PLUGIN.url_for(endpoint="view_list",
|
|
@@ -858,8 +1168,8 @@ def main():
|
|
list_type="uhd-shows",
|
|
list_type="uhd-shows",
|
|
view_types="5",
|
|
view_types="5",
|
|
page=1,
|
|
page=1,
|
|
- min_year=0,
|
|
|
|
query=0,
|
|
query=0,
|
|
|
|
+ min_year=0,
|
|
max_year=0)
|
|
max_year=0)
|
|
})
|
|
})
|
|
|
|
|
|
@@ -878,7 +1188,7 @@ def main():
|
|
|
|
|
|
if not HIDE_SERIES:
|
|
if not HIDE_SERIES:
|
|
items.append({
|
|
items.append({
|
|
- "label": "Serien",
|
|
|
|
|
|
+ "label": "HD Serien",
|
|
"path": PLUGIN.url_for(endpoint="view_list",
|
|
"path": PLUGIN.url_for(endpoint="view_list",
|
|
genre="all",
|
|
genre="all",
|
|
list_type="new-episodes",
|
|
list_type="new-episodes",
|
|
@@ -914,6 +1224,11 @@ def main():
|
|
max_year=0)
|
|
max_year=0)
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+ items.append({
|
|
|
|
+ "label": "Filter",
|
|
|
|
+ "path": PLUGIN.url_for(endpoint="view_filters"),
|
|
|
|
+ })
|
|
|
|
+
|
|
if not HIDE_SETTINGS:
|
|
if not HIDE_SETTINGS:
|
|
items.append({
|
|
items.append({
|
|
"label": "Einstellungen",
|
|
"label": "Einstellungen",
|
|
@@ -939,6 +1254,9 @@ def main():
|
|
|
|
|
|
# --------------------------------
|
|
# --------------------------------
|
|
|
|
|
|
|
|
+__version__ = PLUGIN_VERSION
|
|
|
|
+__all__ = ["__run", "__output", "__version__"]
|
|
|
|
+
|
|
|
|
|
|
def __run():
|
|
def __run():
|
|
output("==================================== START ====================================")
|
|
output("==================================== START ====================================")
|
|
@@ -954,7 +1272,7 @@ def __run():
|
|
|
|
|
|
try:
|
|
try:
|
|
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
|
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
|
- if str(__file__).endswith(".py"):
|
|
|
|
|
|
+ if str(__file__).endswith(".py") and os.path.exists("%s.pyo" % __file__):
|
|
xbmc.sleep(100)
|
|
xbmc.sleep(100)
|
|
import glob
|
|
import glob
|
|
for file in glob.glob("framework/*.py"):
|
|
for file in glob.glob("framework/*.py"):
|
|
@@ -962,5 +1280,8 @@ def __run():
|
|
os.remove(__file__)
|
|
os.remove(__file__)
|
|
|
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
|
|
+ #ifdef DEBUG
|
|
if DEBUG:
|
|
if DEBUG:
|
|
output("Exception: %s" % repr(e))
|
|
output("Exception: %s" % repr(e))
|
|
|
|
+ #endif
|
|
|
|
+ pass
|