Support Python 3.10 (#107)
* Support Python 3.10 * Add timeout * Fix test
This commit is contained in:
parent
9f4bba446a
commit
98a0ffb162
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@ -15,17 +15,19 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
python-version: [ 2.7, 3.5, 3.6, 3.7, 3.8, 3.9 ]
|
||||
python-version: [ "2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10" ]
|
||||
include:
|
||||
# Kodi Leia on Windows uses a bundled Python 2.7.
|
||||
- os: windows-latest
|
||||
python-version: 2.7
|
||||
python-version: "2.7"
|
||||
|
||||
# Kodi Matrix on Windows uses a bundled Python 3.8, but we test 3.9 also to be sure.
|
||||
# Kodi Matrix on Windows uses a bundled Python 3.8, but we test 3.9 and 3.10 also to be sure.
|
||||
- os: windows-latest
|
||||
python-version: 3.8
|
||||
python-version: "3.8"
|
||||
- os: windows-latest
|
||||
python-version: 3.9
|
||||
python-version: "3.9"
|
||||
- os: windows-latest
|
||||
python-version: "3.10"
|
||||
steps:
|
||||
- name: Check out ${{ github.sha }} from repository ${{ github.repository }}
|
||||
uses: actions/checkout@v2
|
||||
|
@ -125,7 +125,7 @@ class KodiPlayer(Player):
|
||||
if not self.av_started:
|
||||
# Check stream path
|
||||
import requests
|
||||
response = requests.get(self.stream_path)
|
||||
response = requests.get(self.stream_path, timeout=5)
|
||||
if response.status_code == 403:
|
||||
message_id = 30720
|
||||
else:
|
||||
|
@ -75,7 +75,7 @@ class TestApi(unittest.TestCase):
|
||||
|
||||
@unittest.skipUnless(kodiutils.get_setting('username') and kodiutils.get_setting('password'), 'Skipping since we have no credentials.')
|
||||
def test_get_drm_stream(self):
|
||||
resolved_stream = self._api.get_stream_by_uuid('b74882b7-7b19-4bfe-9773-22d8ce474aa5') # https://www.goplay.be/video/ncis-los-angeles/ncis-los-angeles-s3/ncis-los-angeles-s3-aflevering-3
|
||||
resolved_stream = self._api.get_stream_by_uuid('62e04ab5-1f3c-4385-ad7a-e2943ddb1849') # https://www.goplay.be/video/ncis-los-angeles/ncis-los-angeles-s10/ncis-los-angeles-s10-aflevering-12
|
||||
self.assertIsInstance(resolved_stream, ResolvedStream)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user