From ecd7d4aefb492ba2ff7e99418fe70cba3a96f60d Mon Sep 17 00:00:00 2001
From: thedoctor66 <37449358+thedoctor66@users.noreply.github.com>
Date: Fri, 25 May 2018 15:15:53 +0200
Subject: [PATCH 01/29] pattern fix flashx
By Angedam
---
plugin.video.alfa/servers/flashx.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugin.video.alfa/servers/flashx.json b/plugin.video.alfa/servers/flashx.json
index 2ad87bff..1a1972f2 100644
--- a/plugin.video.alfa/servers/flashx.json
+++ b/plugin.video.alfa/servers/flashx.json
@@ -4,7 +4,7 @@
"ignore_urls": [],
"patterns": [
{
- "pattern": "flashx.(?:tv|pw|ws|sx)/(?:embed.php\\?c=|embed-|playvid-|)([A-z0-9]+)",
+ "pattern": "flashx.(?:tv|pw|ws|sx|to)/(?:embed.php\\?c=|embed-|playvid-|)([A-z0-9]+)",
"url": "https://www.flashx.tv/\\1.html"
}
]
From 4e74641f19e6b6bff204255ab865734081a59fa4 Mon Sep 17 00:00:00 2001
From: Intel1 <25161862+Intel11@users.noreply.github.com>
Date: Sat, 26 May 2018 00:07:30 -0500
Subject: [PATCH 02/29] unshortenit: updated
---
plugin.video.alfa/lib/unshortenit.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugin.video.alfa/lib/unshortenit.py b/plugin.video.alfa/lib/unshortenit.py
index 07141af1..a3973b87 100755
--- a/plugin.video.alfa/lib/unshortenit.py
+++ b/plugin.video.alfa/lib/unshortenit.py
@@ -28,11 +28,11 @@ def find_in_text(regex, text, flags=re.IGNORECASE | re.DOTALL):
class UnshortenIt(object):
- _adfly_regex = r'adf\.ly|q\.gs|j\.gs|u\.bb|ay\.gy|threadsphere\.bid|restorecosm\.bid'
+ _adfly_regex = r'adf\.ly|q\.gs|j\.gs|u\.bb|ay\.gy|threadsphere\.bid|restorecosm\.bid|clearload\.bid'
_linkbucks_regex = r'linkbucks\.com|any\.gs|cash4links\.co|cash4files\.co|dyo\.gs|filesonthe\.net|goneviral\.com|megaline\.co|miniurls\.co|qqc\.co|seriousdeals\.net|theseblogs\.com|theseforums\.com|tinylinks\.co|tubeviral\.com|ultrafiles\.net|urlbeat\.net|whackyvidz\.com|yyv\.co'
_adfocus_regex = r'adfoc\.us'
_lnxlu_regex = r'lnx\.lu'
- _shst_regex = r'sh\.st'
+ _shst_regex = r'sh\.st|gestyy\.com'
_hrefli_regex = r'href\.li'
_anonymz_regex = r'anonymz\.com'
_shrink_service_regex = r'shrink-service\.it'
From e416089190eece7324effee5a53be0c399c2f3b1 Mon Sep 17 00:00:00 2001
From: Intel1 <25161862+Intel11@users.noreply.github.com>
Date: Sat, 26 May 2018 08:30:38 -0500
Subject: [PATCH 03/29] clipwatching: fix
---
plugin.video.alfa/servers/clipwatching.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/plugin.video.alfa/servers/clipwatching.py b/plugin.video.alfa/servers/clipwatching.py
index a954f252..f1858955 100644
--- a/plugin.video.alfa/servers/clipwatching.py
+++ b/plugin.video.alfa/servers/clipwatching.py
@@ -17,7 +17,9 @@ def get_video_url(page_url, user="", password="", video_password=""):
logger.info("(page_url='%s')" % page_url)
data = httptools.downloadpage(page_url).data
video_urls = []
- videourl, label = scrapertools.find_single_match(data, 'file:"([^"]+).*?label:"([^"]+)')
- video_urls.append([label + " [clipwatching]", videourl])
-
+ videos = scrapertools.find_multiple_matches(data, 'file:"([^"]+).*?label:"([^"]+)')
+ for video, label in videos:
+ video_urls.append([label + " [clipwatching]", video])
+ logger.info("Url: %s" %videos)
+ video_urls.sort(key=lambda it: int(it[0].split("p ", 1)[0]))
return video_urls
From 5faba0d79fb9bcb0ee950d2cd20ea126232c4ffc Mon Sep 17 00:00:00 2001
From: Intel1 <25161862+Intel11@users.noreply.github.com>
Date: Sat, 26 May 2018 08:31:12 -0500
Subject: [PATCH 04/29] clipwatching: fix
---
plugin.video.alfa/servers/clipwatching.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugin.video.alfa/servers/clipwatching.json b/plugin.video.alfa/servers/clipwatching.json
index a411ac8b..8fceac73 100644
--- a/plugin.video.alfa/servers/clipwatching.json
+++ b/plugin.video.alfa/servers/clipwatching.json
@@ -9,7 +9,7 @@
},
{
"pattern": "clipwatching.com/(\\w+)",
- "url": "http://clipwatching.com/\\1.html"
+ "url": "http://clipwatching.com/embed-\\1.html"
}
]
},
From 017e3ba97629a9a291d7352ffd4bfa352d9f201d Mon Sep 17 00:00:00 2001
From: Intel1 <25161862+Intel11@users.noreply.github.com>
Date: Sat, 26 May 2018 08:55:43 -0500
Subject: [PATCH 05/29] vidup: fix
---
plugin.video.alfa/servers/vidup.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugin.video.alfa/servers/vidup.json b/plugin.video.alfa/servers/vidup.json
index aae98f24..62ec188d 100755
--- a/plugin.video.alfa/servers/vidup.json
+++ b/plugin.video.alfa/servers/vidup.json
@@ -4,8 +4,8 @@
"ignore_urls": [],
"patterns": [
{
- "pattern": "vidup.me/(?:embed-|)([A-z0-9]+)",
- "url": "http://vidup.me/embed-\\1.html"
+ "pattern": "vidup.(?:me|tv)/(?:embed-|)([A-z0-9]+)",
+ "url": "http://vidup.tv/embed-\\1.html"
}
]
},
@@ -39,4 +39,4 @@
}
],
"thumbnail": "http://i.imgur.com/sZvy8IC.png?1"
-}
\ No newline at end of file
+}
From e6025ae411732a82039939dfe8ecce07d79c24e5 Mon Sep 17 00:00:00 2001
From: Intel1 <25161862+Intel11@users.noreply.github.com>
Date: Sat, 26 May 2018 08:56:39 -0500
Subject: [PATCH 06/29] vidup: fix
---
plugin.video.alfa/servers/vidup.py | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/plugin.video.alfa/servers/vidup.py b/plugin.video.alfa/servers/vidup.py
index 59eefc60..d6ffa53d 100755
--- a/plugin.video.alfa/servers/vidup.py
+++ b/plugin.video.alfa/servers/vidup.py
@@ -7,32 +7,25 @@ from platformcode import logger
def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url)
-
data = httptools.downloadpage(page_url).data
-
if "Not Found" in data:
- return False, "[Vidup.me] El fichero no existe o ha sido borrado"
-
+ return False, "[Vidup] El fichero no existe o ha sido borrado"
return True, ""
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("url=" + page_url)
-
data = httptools.downloadpage(page_url).data
- key = scrapertools.find_single_match(data, "var mpri_Key\s*=\s*'([^']+)'")
- data_vt = httptools.downloadpage("http://vidup.me/jwv/%s" % key).data
- vt = scrapertools.find_single_match(data_vt, 'file\|(.*?)\|direct')
-
+ key = scrapertools.find_single_match(data, "var thief\s*=\s*'([^']+)'")
+ data_vt = httptools.downloadpage("http://vidup.tv/jwv/%s" % key).data
+ vt = scrapertools.find_single_match(data_vt, 'file\|direct\|(.*?)\|')
# Extrae la URL
video_urls = []
media_urls = scrapertools.find_multiple_matches(data, '\{"file"\:"([^"]+)","label"\:"([^"]+)"\}')
for media_url, label in media_urls:
ext = scrapertools.get_filename_from_url(media_url)[-4:]
media_url += "?direct=false&ua=1&vt=%s" % vt
- video_urls.append(["%s (%s) [vidup.me]" % (ext, label), media_url])
-
+ video_urls.append(["%s (%s) [vidup]" % (ext, label), media_url])
for video_url in video_urls:
logger.info("%s - %s" % (video_url[0], video_url[1]))
-
return video_urls
From 5e11c91b80ca19c47350c89cbf543b23a6ed40ea Mon Sep 17 00:00:00 2001
From: Intel1 <25161862+Intel11@users.noreply.github.com>
Date: Sat, 26 May 2018 09:16:49 -0500
Subject: [PATCH 07/29] descargacineclasico: agregado opcion videoteca
---
.../channels/descargacineclasico.py | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/plugin.video.alfa/channels/descargacineclasico.py b/plugin.video.alfa/channels/descargacineclasico.py
index 88291a9d..2d52b3e8 100755
--- a/plugin.video.alfa/channels/descargacineclasico.py
+++ b/plugin.video.alfa/channels/descargacineclasico.py
@@ -2,7 +2,7 @@
import re
from channelselector import get_thumb
-from platformcode import logger
+from platformcode import logger, config
from core import scrapertools, httptools
from core import servertools
from core import tmdb
@@ -86,7 +86,6 @@ def agregadas(item):
thumbnail=thumbnail,
plot=plot,
show=title) )
- scrapertools.printMatches(itemlist)
tmdb.set_infoLabels(itemlist)
# Paginación
try:
@@ -116,8 +115,20 @@ def findvideos(item):
itemlist.append( item.clone(action="play",
title=title,
url=scrapedurl) )
- tmdb.set_infoLabels(itemlist)
itemlist = servertools.get_servers_itemlist(itemlist)
+ tmdb.set_infoLabels(itemlist)
+ if itemlist:
+ itemlist.append(Item(channel = item.channel))
+ itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer", context="",
+ text_color="magenta"))
+ # Opción "Añadir esta película a la biblioteca de KODI"
+ if item.extra != "library":
+ if config.get_videolibrary_support():
+ itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
+ action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
+ contentTitle = item.contentTitle
+ ))
+ return itemlist
return itemlist
From 435902fea60774c17d28ede65e13ffe7dafff8bc Mon Sep 17 00:00:00 2001
From: alaquepasa <39385022+alaquepasa@users.noreply.github.com>
Date: Sat, 26 May 2018 17:50:28 +0200
Subject: [PATCH 08/29] =?UTF-8?q?A=C3=B1adir=20opci=C3=B3n=20para=20reduir?=
=?UTF-8?q?=20el=20item=20en=20context?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Se añade una opción que permite activar o desactivar (por defecto desactivado)
la posibilidad de generar Items con menos elementos en el método de set_context_menu.
Esto genera un speedup considerable (aprox 2x) y parece que no daña mucho las funcionalidades
actuales al realizar este filtrado.
---
.../platformcode/platformtools.py | 42 ++++++++++++++++++-
.../resources/language/Spanish/strings.po | 4 ++
plugin.video.alfa/resources/settings.xml | 1 +
3 files changed, 45 insertions(+), 2 deletions(-)
diff --git a/plugin.video.alfa/platformcode/platformtools.py b/plugin.video.alfa/platformcode/platformtools.py
index 7c934e31..88866089 100644
--- a/plugin.video.alfa/platformcode/platformtools.py
+++ b/plugin.video.alfa/platformcode/platformtools.py
@@ -372,6 +372,44 @@ def set_context_commands(item, parent_item):
else:
context = []
+ if config.get_setting("faster_item_serialization"):
+ # logger.info("Reducing serialization!")
+ itemBK = item
+ item = Item()
+ item.action = itemBK.action
+ item.channel = itemBK.channel
+ infoLabels = {}
+ if itemBK.infoLabels["year"]: infoLabels["year"] = itemBK.infoLabels["year"]
+ if itemBK.infoLabels["imdb_id"]: infoLabels["imdb_id"] = itemBK.infoLabels["imdb_id"]
+ if itemBK.infoLabels["tmdb_id"]: infoLabels["tmdb_id"] = itemBK.infoLabels["tmdb_id"]
+ if itemBK.infoLabels["tvdb_id"]: infoLabels["tvdb_id"] = itemBK.infoLabels["tvdb_id"]
+ if itemBK.infoLabels["noscrap_id"]: infoLabels["noscrap_id"] = itemBK.infoLabels["noscrap_id"]
+ if len(infoLabels) > 0: item.infoLabels = infoLabels
+
+ if itemBK.thumbnail: item.thumbnail = itemBK.thumbnail
+ if itemBK.extra: item.extra = itemBK.extra
+ if itemBK.contentEpisodeNumber: item.contentEpisodeNumber = itemBK.contentEpisodeNumber
+ if itemBK.contentEpisodeTitle: item.contentEpisodeTitle = itemBK.contentEpisodeTitle
+ if itemBK.contentPlot: item.contentPlot = itemBK.contentPlot
+ if itemBK.contentQuality: item.contentQuality = itemBK.contentQuality
+ if itemBK.contentSeason: item.contentSeason = itemBK.contentSeason
+ if itemBK.contentSerieName: item.contentSerieName = itemBK.contentSerieName
+ if itemBK.contentThumbnail: item.contentThumbnail = itemBK.contentThumbnail
+ if itemBK.contentTitle: item.contentTitle = itemBK.contentTitle
+ if itemBK.contentType: item.contentType = itemBK.contentType
+ if itemBK.duration: item.duration = itemBK.duration
+ if itemBK.fulltitle: item.fulltitle = itemBK.fulltitle
+ if itemBK.plot: item.plot = itemBK.plot
+ if itemBK.quality: item.quality = itemBK.quality
+ if itemBK.show: item.show = itemBK.show
+ if itemBK.title: item.title = itemBK.title
+ if itemBK.viewcontent: item.viewcontent = itemBK.viewcontent
+
+ # itemJson = item.tojson()
+ # logger.info("Elemento: {0} bytes".format(len(itemJson)))
+ # logger.info(itemJson)
+ # logger.info("--------------------------------------------------------------")
+
# Opciones segun item.context
for command in context:
# Predefinidos
@@ -507,14 +545,14 @@ def set_context_commands(item, parent_item):
from_action=item.action).tourl())))
# Descargar episodio
- if item.contentType == "episode":
+ elif item.contentType == "episode":
context_commands.append(("Descargar Episodio", "XBMC.RunPlugin(%s?%s)" %
(sys.argv[0], item.clone(channel="downloads", action="save_download",
from_channel=item.channel,
from_action=item.action).tourl())))
# Descargar temporada
- if item.contentType == "season":
+ elif item.contentType == "season":
context_commands.append(("Descargar Temporada", "XBMC.RunPlugin(%s?%s)" %
(sys.argv[0], item.clone(channel="downloads", action="save_download",
from_channel=item.channel,
diff --git a/plugin.video.alfa/resources/language/Spanish/strings.po b/plugin.video.alfa/resources/language/Spanish/strings.po
index bc41ec1b..38cecf4d 100644
--- a/plugin.video.alfa/resources/language/Spanish/strings.po
+++ b/plugin.video.alfa/resources/language/Spanish/strings.po
@@ -251,6 +251,10 @@ msgctxt "#30164"
msgid "Delete this file"
msgstr "Borrar este fichero"
+msgctxt "#30300"
+msgid "Faster context menus"
+msgstr "Menús contextuales rápidos (puede causar que algunas opciones no funcionen)"
+
msgctxt "#30501"
msgid "Paths"
msgstr "Rutas"
diff --git a/plugin.video.alfa/resources/settings.xml b/plugin.video.alfa/resources/settings.xml
index 950bf63b..719cd5e6 100644
--- a/plugin.video.alfa/resources/settings.xml
+++ b/plugin.video.alfa/resources/settings.xml
@@ -7,6 +7,7 @@
", "", data)
+
+ return data
+
+def put_movies(itemlist, data, pattern):
+ matches = scrapertools.find_multiple_matches(data, pattern)
+ for link, img, title, rating, plot in matches:
+ if 'pelicula' in link:
+ itemTitle = "%s [COLOR yellow](%s/100)[/COLOR]" % (title, rating)
+ itemlist.append(Item(channel = __channel__, title=itemTitle, fulltitle=title, thumbnail=img,
+ url=link, plot=plot, action="findvideos"))
+ logger.info(link)
+
+ return itemlist
+
+def put_episodes(itemlist, item, text):
+ pattern = '.*?'
+ pattern += '"txt">(.*?)
.*?'
+ pattern += '"txt">(.*?)