From 8a7aa56d07527e755d0e7b134d12181bd520c608 Mon Sep 17 00:00:00 2001 From: "A. Bram Neijt" Date: Thu, 24 Jan 2019 22:29:47 +0100 Subject: [PATCH] Set timeout, update default content --- Makefile | 4 ++-- resources/settings.xml | 2 +- src/ipfs/__init__.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 185d421..fbc3bd2 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -SOURCES=$(shell find . -name *.py) +SOURCES=$(shell find . -name '*.py') OUTPUT_PATH=build/plugin.video.ipfs venv: @@ -21,7 +21,7 @@ clean: build/plugin_video_ipfs.zip: build cd build && zip -r plugin_video_ipfs.zip plugin.video.ipfs -build: $(SOURCES) fanart.jpg icon.png addon.xml +build: $(SOURCES) fanart.jpg icon.png addon.xml resources/settings.xml mkdir -p $(OUTPUT_PATH)/ipfs cp -r src/*.py $(OUTPUT_PATH) cp -r src/ipfs/*.py $(OUTPUT_PATH)/ipfs diff --git a/resources/settings.xml b/resources/settings.xml index f4e0c76..7a84558 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -1,7 +1,7 @@ - + diff --git a/src/ipfs/__init__.py b/src/ipfs/__init__.py index 88593b7..9dab079 100644 --- a/src/ipfs/__init__.py +++ b/src/ipfs/__init__.py @@ -12,7 +12,7 @@ def __init__(self, gateway): self._cache = {} def get(self, path, params): - r = requests.get(self._gateway + '/api/v0/dag/get', params=params) + r = requests.get(self._gateway + '/api/v0/dag/get', params=params, timeout=15) r.raise_for_status() return r