rimossi test github actions, alcuni fix e disabilitato tantifilm

This commit is contained in:
marco
2020-09-27 16:13:58 +02:00
parent 049757aa30
commit d17401ebc1
6 changed files with 17 additions and 54 deletions
-46
View File
@@ -1,46 +0,0 @@
# This is a basic workflow to help you get started with Actions
name: Test Suite
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
workflow_dispatch:
schedule:
- cron: '30 17 * * *'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: 2.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sakee
pip install html-testRunner
pip install parameterized
- name: Run tests
run: |
export PYTHONPATH=$GITHUB_WORKSPACE
export KODI_INTERACTIVE=0
export KODI_HOME=$GITHUB_WORKSPACE/tests/home
python tests/test_generic.py
- uses: actions/upload-artifact@v2
with:
name: report
path: reports/report.html
+1 -1
View File
@@ -101,7 +101,7 @@ def peliculas(item):
# debug= True # debug= True
if 'newest' in item.args: if 'newest' in item.args:
if '/serietv/' not in item.url: if '/serietv/' not in item.url:
debug = True # debug = True
pagination = '' pagination = ''
patronBlock = r'Ultimi 100 film [^:]+:(?P<block>.*?)<\/td>' patronBlock = r'Ultimi 100 film [^:]+:(?P<block>.*?)<\/td>'
patron = r'<a href="?(?P<url>[^">]+)"?>(?P<title>[^<([]+)(?:\[(?P<lang>Sub-ITA|B/N|SUB-ITA)\])?\s*(?:\[(?P<quality>HD|SD|HD/3D)\])?\s*\((?P<year>[0-9]{4})\)<\/a>' patron = r'<a href="?(?P<url>[^">]+)"?>(?P<title>[^<([]+)(?:\[(?P<lang>Sub-ITA|B/N|SUB-ITA)\])?\s*(?:\[(?P<quality>HD|SD|HD/3D)\])?\s*\((?P<year>[0-9]{4})\)<\/a>'
+1 -1
View File
@@ -2,7 +2,7 @@
"id": "tantifilm", "id": "tantifilm",
"name": "Tantifilm", "name": "Tantifilm",
"language": ["ita"], "language": ["ita"],
"active": true, "active": false,
"thumbnail": "tantifilm.png", "thumbnail": "tantifilm.png",
"banner": "tantifilm.png", "banner": "tantifilm.png",
"categories": ["tvshow", "movie", "anime"], "categories": ["tvshow", "movie", "anime"],
+2 -2
View File
@@ -7,12 +7,12 @@ def context():
context = [] context = []
# original # original
# if config.get_setting('quick_menu'): context.append((config.get_localized_string(60360).upper(), "RunPlugin(plugin://plugin.video.kod/?%s)" % Item(channel='shortcuts', action="shortcut_menu").tourl())) # if config.get_setting('quick_menu'): context.append((config.get_localized_string(60360).upper(), "RunPlugin(plugin://plugin.video.kod/?%s)" % Item(channel='shortcuts', action="shortcut_menu").tourl()))
# if config.get_setting('side_menu'): context.append((config.get_localized_string(70737).upper(), "RunPlugin(plugin://plugin.video.kod/?%s)" % Item(channel='shortcuts',action="side_menu").tourl())) # if config.get_setting('side_menu'): context.append((config.get_localized_string(70737).upper(), "RunPlugin(plugin://plugin.video.kod/?%s)" % Item(channel='shortcuts',action="Side_menu").tourl()))
# if config.get_setting('kod_menu'): context.append((config.get_localized_string(60026), "RunPlugin(plugin://plugin.video.kod/?%s)" % Item(channel='shortcuts', action="settings_menu").tourl())) # if config.get_setting('kod_menu'): context.append((config.get_localized_string(60026), "RunPlugin(plugin://plugin.video.kod/?%s)" % Item(channel='shortcuts', action="settings_menu").tourl()))
# pre-serialised # pre-serialised
if config.get_setting('quick_menu'): context.append((config.get_localized_string(60360), 'RunPlugin(plugin://plugin.video.kod/?ewogICAgImFjdGlvbiI6ICJzaG9ydGN1dF9tZW51IiwgCiAgICAiY2hhbm5lbCI6ICJzaG9ydGN1dHMiLCAKICAgICJpbmZvTGFiZWxzIjoge30KfQ%3D%3D)')) if config.get_setting('quick_menu'): context.append((config.get_localized_string(60360), 'RunPlugin(plugin://plugin.video.kod/?ewogICAgImFjdGlvbiI6ICJzaG9ydGN1dF9tZW51IiwgCiAgICAiY2hhbm5lbCI6ICJzaG9ydGN1dHMiLCAKICAgICJpbmZvTGFiZWxzIjoge30KfQ%3D%3D)'))
if config.get_setting('Side_menu'): context.append((config.get_localized_string(70737), 'RunPlugin(plugin://plugin.video.kod/?ewogICAgImFjdGlvbiI6ICJzaWRlX21lbnUiLCAKICAgICJjaGFubmVsIjogInNob3J0Y3V0cyIsIAogICAgImluZm9MYWJlbHMiOiB7fQp9)')) if config.get_setting('Side_menu'): context.append((config.get_localized_string(70737), 'RunPlugin(plugin://plugin.video.kod/?ewogICAgImFjdGlvbiI6ICJTaWRlX21lbnUiLCAKICAgICJjaGFubmVsIjogInNob3J0Y3V0cyIsIAogICAgImluZm9MYWJlbHMiOiB7fQp9)'))
if config.get_setting('kod_menu'): context.append((config.get_localized_string(60026), 'RunPlugin(plugin://plugin.video.kod/?ewogICAgImFjdGlvbiI6ICJzZXR0aW5nc19tZW51IiwgCiAgICAiY2hhbm5lbCI6ICJzaG9ydGN1dHMiLCAKICAgICJpbmZvTGFiZWxzIjoge30KfQ%3D%3D)')) if config.get_setting('kod_menu'): context.append((config.get_localized_string(60026), 'RunPlugin(plugin://plugin.video.kod/?ewogICAgImFjdGlvbiI6ICJzZXR0aW5nc19tZW51IiwgCiAgICAiY2hhbm5lbCI6ICJzaG9ydGN1dHMiLCAKICAgICJpbmZvTGFiZWxzIjoge30KfQ%3D%3D)'))
return context return context
+11 -3
View File
@@ -9,6 +9,11 @@ import sys, os, threading, time, re, math, xbmc, xbmcgui
PY3 = False PY3 = False
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
if PY3:
import urllib.request as urllib2 # Es muy lento en PY2. En PY3 es nativo
else:
import urllib2 # Usamos el nativo de PY2 que es más rápido
from core import filetools, jsontools from core import filetools, jsontools
from platformcode import config, logger, platformtools from platformcode import config, logger, platformtools
from core import scrapertools from core import scrapertools
@@ -434,7 +439,10 @@ def get_data(payload):
@param payload: data @param payload: data
:return: :return:
""" """
import urllib.request, urllib.error try:
import urllib.request as urllib
except ImportError:
import urllib
logger.info("payload: %s" % payload) logger.info("payload: %s" % payload)
# Required header for XBMC JSON-RPC calls, otherwise you'll get a 415 HTTP response code - Unsupported media type # Required header for XBMC JSON-RPC calls, otherwise you'll get a 415 HTTP response code - Unsupported media type
headers = {'content-type': 'application/json'} headers = {'content-type': 'application/json'}
@@ -447,8 +455,8 @@ def get_data(payload):
xbmc_port = 0 xbmc_port = 0
xbmc_json_rpc_url = "http://" + config.get_setting("xbmc_host", "videolibrary") + ":" + str(xbmc_port) + "/jsonrpc" xbmc_json_rpc_url = "http://" + config.get_setting("xbmc_host", "videolibrary") + ":" + str(xbmc_port) + "/jsonrpc"
req = urllib.request.Request(xbmc_json_rpc_url, data=jsontools.dump(payload), headers=headers) req = urllib2.Request(xbmc_json_rpc_url, data=jsontools.dump(payload), headers=headers)
f = urllib.request.urlopen(req) f = urllib.urlopen(req)
response = f.read() response = f.read()
f.close() f.close()
+2 -1
View File
@@ -52,7 +52,7 @@ validUrlRegex = re.compile(
r'(?::\d+)?' # optional port r'(?::\d+)?' # optional port
r'(?:/?|[/?]\S+)$', re.IGNORECASE) r'(?:/?|[/?]\S+)$', re.IGNORECASE)
chBlackList = ['url'] chBlackList = ['url', 'mediasetplay']
chNumRis = { chNumRis = {
'altadefinizione01': { 'altadefinizione01': {
'Film': 20 'Film': 20
@@ -133,6 +133,7 @@ servers = []
channels = [] channels = []
channel_list = channelselector.filterchannels("all") if 'KOD_TST_CH' not in os.environ else [Item(channel=os.environ['KOD_TST_CH'], action="mainlist")] channel_list = channelselector.filterchannels("all") if 'KOD_TST_CH' not in os.environ else [Item(channel=os.environ['KOD_TST_CH'], action="mainlist")]
logger.info(channel_list)
ret = [] ret = []
for chItem in channel_list: for chItem in channel_list:
try: try: