summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzoe2019-02-12 23:24:16 +0100
committerzoe2019-02-12 23:24:16 +0100
commit02c1ffa854eb3796efb5ae008f92c10b0049a1a3 (patch)
tree0fd70f7ad1e2a8c1da5416ac8ec71f6ef16b148e
parent7cabf3ecf0f586e8026909ec4efa66a4abde5d1d (diff)
downloadaur-02c1ffa854eb3796efb5ae008f92c10b0049a1a3.tar.gz
Pached pytrainer.sh so that osm maps work again
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD4
-rwxr-xr-xpytrainer.sh7
3 files changed, 12 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c3b371769ebe..f749bd60da3b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Sat Dec 15 19:19:39 UTC 2018
+# Tue Feb 12 22:22:37 UTC 2019
pkgbase = pytrainer
pkgdesc = A tool to log your sport activities.
pkgver = 2.0.0rc1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/pytrainer/pytrainer/wiki
arch = any
license = GPL
@@ -21,7 +21,7 @@ pkgbase = pytrainer
source = pytrainer-2.0.0rc1.tar.gz::https://github.com/pytrainer/pytrainer/archive/v2.0.0rc1.tar.gz
source = pytrainer.sh
md5sums = 1a29bd8749a7ce218e1959e918b60211
- md5sums = b39a8511bc63e6d65a615d26defbb05f
+ md5sums = 87bc8c7037f17f0be158853485ef713f
pkgname = pytrainer
diff --git a/PKGBUILD b/PKGBUILD
index 7fa8669082f6..c99622e86e6a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgname=pytrainer
pkgver=2.0.0rc1
-pkgrel=1
+pkgrel=2
pkgdesc='A tool to log your sport activities.'
arch=('any')
url='https://github.com/pytrainer/pytrainer/wiki'
@@ -22,7 +22,7 @@ source=("$pkgname-${pkgver}.tar.gz::https://github.com/$pkgname/$pkgname/archive
#pathfix.patch
)
md5sums=('1a29bd8749a7ce218e1959e918b60211'
- 'b39a8511bc63e6d65a615d26defbb05f'
+ '87bc8c7037f17f0be158853485ef713f'
#'c80aa188dce3a5675b15a703873bf3ad'
)
diff --git a/pytrainer.sh b/pytrainer.sh
index f0b9a2cbd3f5..32cd360d5f2f 100755
--- a/pytrainer.sh
+++ b/pytrainer.sh
@@ -1,5 +1,12 @@
#!/bin/sh
# First arg is log level, e.g. -d for DEBUG
+# As explained on : https://github.com/pytrainer/pytrainer/issues/158#issuecomment-448475330
+# The reason for the non working OSM in pytrainer is, that openlayers.org / cloudfare is sending:
+#`Access denied | openlayers.org used Cloudflare to restrict access`
+#when using the default user-agent of the python urllib. Changing user-agent to pytrainer solves it:
+wget -q -O ${HOME}/.pytrainer/tmp/cache/OpenLayers.js http://www.openlayers.org/api/OpenLayers.js
+
+
cd /usr/share/pytrainer
exec python2 pytrainer "$@"