aboutsummaryrefslogtreecommitdiff
path: root/multimedia/livestreamer
diff options
context:
space:
mode:
authorJuergen Lock <nox@FreeBSD.org>2014-12-12 17:15:45 +0000
committerJuergen Lock <nox@FreeBSD.org>2014-12-12 17:15:45 +0000
commit9c64d41eee4764b8d81f3128072fb6c1e5b27fa7 (patch)
treea47d5782929601dd84b3bda314274f40ad68d7c4 /multimedia/livestreamer
parentcef62f601228b32c2d15357bb3525ed2737d0ddb (diff)
downloadports-9c64d41eee4764b8d81f3128072fb6c1e5b27fa7.tar.gz
ports-9c64d41eee4764b8d81f3128072fb6c1e5b27fa7.zip
Notes
Diffstat (limited to 'multimedia/livestreamer')
-rw-r--r--multimedia/livestreamer/Makefile3
-rw-r--r--multimedia/livestreamer/distinfo4
-rw-r--r--multimedia/livestreamer/files/patch-bbc6d0e7c1a8b6bf053345e88366cae115baa2d354
3 files changed, 58 insertions, 3 deletions
diff --git a/multimedia/livestreamer/Makefile b/multimedia/livestreamer/Makefile
index 0a7a58d1699c..4ca9dbac5f51 100644
--- a/multimedia/livestreamer/Makefile
+++ b/multimedia/livestreamer/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= livestreamer
-PORTVERSION= 1.10.2
+PORTVERSION= 1.11.0
CATEGORIES= multimedia python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -21,5 +21,6 @@ RUN_DEPENDS= rtmpdump:${PORTSDIR}/multimedia/rtmpdump \
USES= python
USE_PYTHON= autoplist distutils
+PATCH_STRIP= -p1
.include <bsd.port.mk>
diff --git a/multimedia/livestreamer/distinfo b/multimedia/livestreamer/distinfo
index 289a47f61baa..9d1d73b1a6ea 100644
--- a/multimedia/livestreamer/distinfo
+++ b/multimedia/livestreamer/distinfo
@@ -1,2 +1,2 @@
-SHA256 (livestreamer-1.10.2.tar.gz) = 50bae61fe2a1ec1df215a825b62ebba508a31d7d54ecb332586feb968d137391
-SIZE (livestreamer-1.10.2.tar.gz) = 418516
+SHA256 (livestreamer-1.11.0.tar.gz) = 5af677ec93ebce229ac235ea6c23aec915deb4aacc8bdb8418c8488fbdd96920
+SIZE (livestreamer-1.11.0.tar.gz) = 421706
diff --git a/multimedia/livestreamer/files/patch-bbc6d0e7c1a8b6bf053345e88366cae115baa2d3 b/multimedia/livestreamer/files/patch-bbc6d0e7c1a8b6bf053345e88366cae115baa2d3
new file mode 100644
index 000000000000..62a330ffd5a8
--- /dev/null
+++ b/multimedia/livestreamer/files/patch-bbc6d0e7c1a8b6bf053345e88366cae115baa2d3
@@ -0,0 +1,54 @@
+From bbc6d0e7c1a8b6bf053345e88366cae115baa2d3 Mon Sep 17 00:00:00 2001
+From: Christopher Rosell <chrippa@tanuki.se>
+Date: Fri, 12 Dec 2014 00:14:43 +0100
+Subject: [PATCH] plugins.twitch: Update for API change.
+
+Resolves #633.
+---
+ src/livestreamer/plugins/twitch.py | 17 +++++++++--------
+ 1 file changed, 9 insertions(+), 8 deletions(-)
+
+diff --git a/src/livestreamer/plugins/twitch.py b/src/livestreamer/plugins/twitch.py
+index ca0d2bd..0adc872 100644
+--- a/src/livestreamer/plugins/twitch.py
++++ b/src/livestreamer/plugins/twitch.py
+@@ -125,8 +125,8 @@ def time_to_offset(t):
+
+
+ class UsherService(object):
+- def _create_url(self, endpoint, asset, **extra_params):
+- url = "http://usher.twitch.tv/{0}/{1}".format(endpoint, asset)
++ def _create_url(self, endpoint, **extra_params):
++ url = "http://usher.twitch.tv{0}".format(endpoint)
+ params = {
+ "player": "twitchweb",
+ "p": int(random() * 999999),
+@@ -145,11 +145,12 @@ def _create_url(self, endpoint, asset, **extra_params):
+
+ return req.url
+
+- def select(self, channel, **extra_params):
+- return self._create_url("select", channel, **extra_params)
++ def channel(self, channel, **extra_params):
++ return self._create_url("/api/channel/hls/{0}.m3u8".format(channel),
++ **extra_params)
+
+- def vod(self, vod_id, **extra_params):
+- return self._create_url("vod", vod_id, **extra_params)
++ def video(self, video_id, **extra_params):
++ return self._create_url("/vod/{0}".format(video_id), **extra_params)
+
+
+ class TwitchAPI(object):
+@@ -417,9 +418,9 @@ def _get_hls_streams(self, type="live"):
+ self._authenticate()
+ sig, token = self._access_token(type)
+ if type == "live":
+- url = self.usher.select(self.channel, nauthsig=sig, nauth=token)
++ url = self.usher.channel(self.channel, sig=sig, token=token)
+ elif type == "video":
+- url = self.usher.vod(self.video_id, nauthsig=sig, nauth=token)
++ url = self.usher.video(self.video_id, nauthsig=sig, nauth=token)
+
+ try:
+ streams = HLSStream.parse_variant_playlist(self.session, url)