From a26121ee377d9fd90b2dda28aef9d0274e4be5c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Arnauts?= Date: Thu, 7 Jul 2022 15:51:56 +0200 Subject: [PATCH] Fix API (#105) --- requirements.txt | 2 +- resources/lib/viervijfzes/content.py | 4 ++-- tests/test_api.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 5559ba9..d0448ee 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,6 @@ pytest-cov pytest-timeout python-dateutil requests -git+git://github.com/dagwieers/kodi-plugin-routing.git@setup#egg=routing +git+https://github.com/tamland/kodi-plugin-routing@master#egg=routing six sakee diff --git a/resources/lib/viervijfzes/content.py b/resources/lib/viervijfzes/content.py index 225b14c..f957ce6 100644 --- a/resources/lib/viervijfzes/content.py +++ b/resources/lib/viervijfzes/content.py @@ -689,8 +689,8 @@ class ContentApi: season=data.get('seasonNumber'), season_uuid=season_uuid, number=episode_number, - aired=datetime.fromtimestamp(data.get('createdDate')), - expiry=datetime.fromtimestamp(data.get('unpublishDate')) if data.get('unpublishDate') else None, + aired=datetime.fromtimestamp(int(data.get('createdDate'))), + expiry=datetime.fromtimestamp(int(data.get('unpublishDate'))) if data.get('unpublishDate') else None, rating=data.get('parentalRating'), stream=data.get('path'), ) diff --git a/tests/test_api.py b/tests/test_api.py index 90a8679..c80991e 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -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('32ac67c6-9b15-4e3e-9440-6de04e586a6e') # NCIS 12x8 + 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 self.assertIsInstance(resolved_stream, ResolvedStream)