From 8d71f37419ef5a4beff87772a7abec0594659cda Mon Sep 17 00:00:00 2001 From: Bram Neijt Date: Sun, 3 Apr 2022 20:13:54 +0200 Subject: [PATCH 1/5] Add valid default version for development --- addon.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index 8bc3802..d00e8ee 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + From f77eb360af876084e38b45f07896346df17e0c4e Mon Sep 17 00:00:00 2001 From: Bram Neijt Date: Sun, 3 Apr 2022 20:14:14 +0200 Subject: [PATCH 2/5] Document that the branch source zip is not a kodi plugin zip --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 212f7ee..0ed6a3a 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ It has a configurable gateway and a configurable root CID that you can browse. - `make package` - Copy the `build/plugin_video_ipfs.zip` +The main branch in github is _not_ installable as a kodi package, please use the [zip from the releases](https://github.com/bneijt/ipfs-video-kodi/releases) if you want to install a zip directly from github. + # Viewing your own content - Install IPFS on your media player From a5db3ad7c042cdc38fb1d9ae8430d251aedbc820 Mon Sep 17 00:00:00 2001 From: Bram Neijt Date: Sun, 3 Apr 2022 20:14:25 +0200 Subject: [PATCH 3/5] Add new gateway, closes issue 4 --- resources/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/settings.xml b/resources/settings.xml index 5f44892..396a185 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -2,6 +2,6 @@ - + \ No newline at end of file From ab1928d81d8bb30d8289b7da59d12024b31e6a50 Mon Sep 17 00:00:00 2001 From: Bram Neijt Date: Sun, 3 Apr 2022 20:21:02 +0200 Subject: [PATCH 4/5] Enforce mypy in ci --- .github/workflows/main.yml | 1 + ipfs_video_kodi/main.py | 5 +++-- pyproject.toml | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd5409e..4ceb230 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,6 +25,7 @@ jobs: - name: static code analysis run: | poetry run black --check ipfs_video_kodi test + poetry run mypy ipfs_video_kodi - run: poetry run pytest - name: build package run: | diff --git a/ipfs_video_kodi/main.py b/ipfs_video_kodi/main.py index cc117b8..5a67539 100644 --- a/ipfs_video_kodi/main.py +++ b/ipfs_video_kodi/main.py @@ -8,8 +8,9 @@ # Python 3 from urllib.parse import parse_qsl, urlencode except ImportError: - from urllib import urlencode - from urlparse import parse_qsl + # Python 2 + from urllib import urlencode # type: ignore + from urlparse import parse_qsl # type: ignore import ipfs diff --git a/pyproject.toml b/pyproject.toml index 8c5f3a2..218d788 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,9 +11,13 @@ requests = "^2.26.0" [tool.poetry.dev-dependencies] pytest = "^6.2.5" -black = {version = "^21.12b0", allow-prereleases = true} +black = { version = "^21.12b0", allow-prereleases = true } mypy = "^0.930" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" + +[[tool.mypy.overrides]] +module = ["requests", "xbmcgui", "xbmcplugin"] +ignore_missing_imports = true From d6c7f9c2b8b56a233a4f0ca3fcec7163e02df51f Mon Sep 17 00:00:00 2001 From: Bram Neijt Date: Sun, 3 Apr 2022 20:28:54 +0200 Subject: [PATCH 5/5] Move tests --- .github/workflows/main.yml | 2 +- {test => tests}/test_ipfs.py | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename {test => tests}/test_ipfs.py (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4ceb230..fb6c3d4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: - run: poetry install - name: static code analysis run: | - poetry run black --check ipfs_video_kodi test + poetry run black --check ipfs_video_kodi tests poetry run mypy ipfs_video_kodi - run: poetry run pytest - name: build package diff --git a/test/test_ipfs.py b/tests/test_ipfs.py similarity index 100% rename from test/test_ipfs.py rename to tests/test_ipfs.py