diff --git a/channels/raiplay.py b/channels/raiplay.py index 54f4f59e..9850096d 100644 --- a/channels/raiplay.py +++ b/channels/raiplay.py @@ -219,7 +219,10 @@ def episodios(item): for res in futures.as_completed(itlist): if res.result(): itemlist += res.result() - itemlist.reverse() + if itemlist[0].VL: + itemlist.reverse() + else: + itemlist = sorted(itemlist, key=lambda it: it.title) if itemlist[0].VL: support.videolibrary(itemlist, item) return itemlist diff --git a/core/videolibrarytools.py b/core/videolibrarytools.py index da695886..5357bd28 100644 --- a/core/videolibrarytools.py +++ b/core/videolibrarytools.py @@ -225,6 +225,8 @@ def save_movie(item): def filter_list(episodelist, action=None, path=None): if path: path = path.decode('utf8') + # import xbmc + # if xbmc.getCondVisibility('system.platform.windows') > 0: path = path.replace('smb:','').replace('/','\\') channel_prefs = {} lang_sel = quality_sel = show_title = channel ='' if action: @@ -234,10 +236,10 @@ def filter_list(episodelist, action=None, path=None): show_title = tvshow_item.infoLabels['tvshowtitle'] if not tvshow_item.channel_prefs: tvshow_item.channel_prefs={channel:{}} - list_item = os.listdir(path) + list_item = filetools.listdir(path) for File in list_item: if (File.endswith('.strm') or File.endswith('.json') or File.endswith('.nfo')): - os.remove(os.path.join(path, File)) + filetools.remove(filetools.join(path, File)) if channel not in tvshow_item.channel_prefs: tvshow_item.channel_prefs[channel] = {} channel_prefs = tvshow_item.channel_prefs[channel] diff --git a/resources/settings.xml b/resources/settings.xml index a683d76d..13fd0157 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -50,7 +50,7 @@ - + @@ -67,8 +67,8 @@ - - + + diff --git a/servers/mixdrop.json b/servers/mixdrop.json index 6977131e..7ddb6d83 100644 --- a/servers/mixdrop.json +++ b/servers/mixdrop.json @@ -38,5 +38,5 @@ "visible": false } ], - "thumbnail": "https://mixdrop.co/imgs/mixdrop-logo2.png" + "thumbnail": "mixdrop.png" } diff --git a/servers/upstream.json b/servers/upstream.json new file mode 100644 index 00000000..d77be9eb --- /dev/null +++ b/servers/upstream.json @@ -0,0 +1,42 @@ +{ + "active": true, + "find_videos": { + "ignore_urls": [], + "patterns": [ + { + "pattern": "upstream.to/([a-z0-9]+)", + "url": "https://upstream.to/\\1" + } + ] + }, + "free": true, + "id": "upstream", + "name": "UP Stream", + "settings": [ + { + "default": false, + "enabled": true, + "id": "black_list", + "label": "@60654", + "type": "bool", + "visible": true + }, + { + "default": 0, + "enabled": true, + "id": "favorites_servers_list", + "label": "@60655", + "lvalues": [ + "No", + "1", + "2", + "3", + "4", + "5" + ], + "type": "list", + "visible": false + } + ], + "thumbnail": "upstream.png" +} diff --git a/servers/upstream.py b/servers/upstream.py new file mode 100644 index 00000000..fb6a63a6 --- /dev/null +++ b/servers/upstream.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# -------------------------------------------------------- +# Conector UP Stream By Alfa development Group +# -------------------------------------------------------- + +from core import httptools +from core import scrapertools +from lib import jsunpack +from platformcode import logger, config + + +def test_video_exists(page_url): + logger.info("(page_url='%s')" % page_url) + global data + data = httptools.downloadpage(page_url).data + if "

WE ARE SORRY

" in data or '404 Not Found' in data: + return False, config.get_localized_string(70449) % "UP Stream" + return True, "" + + +def get_video_url(page_url, premium=False, user="", password="", video_password=""): + video_urls = [] + media_url = scrapertools.find_single_match(data, r'file:"([^"]+)"') + video_urls.append(["%s [UP Stream]" % media_url.split('.'[-1]), media_url]) + + return video_urls diff --git a/specials/downloads.py b/specials/downloads.py index 4f65e889..2f42dcf9 100644 --- a/specials/downloads.py +++ b/specials/downloads.py @@ -302,7 +302,7 @@ def move_to_libray(item): logger.info('ITEM = ' + str(item)) name = item.contentTitle if item.contentType == 'movie' else str(item.infoLabels['season']) + 'x' + str(item.infoLabels['episode']).zfill(2) - list_item = os.listdir(filetools.join(config.get_videolibrary_path(), FOLDER, path_title)) + list_item = filetools.listdir(filetools.join(config.get_videolibrary_path(), FOLDER, path_title)) clean = False for File in list_item: @@ -310,8 +310,8 @@ def move_to_libray(item): name = name.lower() if filename.startswith(name) and (filename.endswith('.strm') or filename.endswith('.json') or filename.endswith('.nfo')): clean = True - logger.info('Delete File: ' + str(os.path.join(config.get_videolibrary_path(), FOLDER, path_title, File))) - os.remove(os.path.join(config.get_videolibrary_path(), FOLDER, path_title, File)) + logger.info('Delete File: ' + str(filetools.join(config.get_videolibrary_path(), FOLDER, path_title, File))) + filetools.remove(filetools.join(config.get_videolibrary_path(), FOLDER, path_title, File)) from platformcode import xbmc_videolibrary