diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3661e88c..8ca779c7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: | diff --git a/channels/ilcorsaronero.py b/channels/ilcorsaronero.py index 1880f52b..d6ed4b0c 100644 --- a/channels/ilcorsaronero.py +++ b/channels/ilcorsaronero.py @@ -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: diff --git a/tests/run.sh b/tests/run.sh index a8a3a802..a2e3600d 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -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 \ No newline at end of file +python tests/test_generic.py \ No newline at end of file diff --git a/tests/test_generic.py b/tests/test_generic.py index 7817de7d..32e99761 100644 --- a/tests/test_generic.py +++ b/tests/test_generic.py @@ -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: