Prova test-suite

This commit is contained in:
marco
2022-11-07 20:21:40 +01:00
parent 54bab829b5
commit 9c07dceab7
4 changed files with 14 additions and 7 deletions

View File

@@ -14,7 +14,7 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
- name: Run tests
run: |

View File

@@ -57,7 +57,9 @@ def peliculas(item):
def itemHook(item):
if not sceneTitle:
item.title = item.title.replace('_', ' ')
item.fulltitle = item.fulltitle.replace('_', ' ')
item.title = support.scrapertools.decodeHtmlentities(support.urlparse.unquote(item.title))
return item
if 'search' not in item.args:

View File

@@ -3,10 +3,10 @@ rm tests/home/userdata/addon_data/plugin.video.kod/settings_channels/*.json
rm tests/home/userdata/addon_data/plugin.video.kod/settings_servers/*.json
rm tests/home/userdata/addon_data/plugin.video.kod/cookies.dat
rm tests/home/userdata/addon_data/plugin.video.kod/kod_db.sqlite
python3.9 -m pip install --upgrade pip
pip3.9 install -U sakee
pip3.9 install -U html-testRunner
pip3.9 install -U parameterized
python -m pip install --upgrade pip
pip install -U sakee
pip install -U html-testRunner
pip install -U parameterized
export PYTHONPATH=$PWD
export KODI_INTERACTIVE=0
export KODI_HOME=$PWD/tests/home
@@ -14,4 +14,4 @@ if (( $# >= 1 ))
then
export KOD_TST_CH=$1
fi
python3.9 tests/test_generic.py
python tests/test_generic.py

View File

@@ -197,7 +197,12 @@ for chItem in channel_list:
# if more search action (ex: movie, tvshow), firstcontent need to be changed in every menu
if itemlist and itemlist[0].action in ('findvideos', 'episodios'):
firstContent = re.match('[ \w]*', itemlist[0].fulltitle).group(0)
for it2 in itemlist:
# some sites refuse to search if the search term is too short
title = it2.fulltitle if it2.contentType == 'movie' else it2.contentSerieName
if title > 5:
firstContent = re.match('[ \w]*', title).group(0)
break
# some sites might have no link inside, but if all results are without servers, there's something wrong
for resIt in itemlist: