Skip to content

Commit

Permalink
fix hls playback
Browse files Browse the repository at this point in the history
  • Loading branch information
fancl20 committed Jul 16, 2015
1 parent 0c097e4 commit 46032dd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
13 changes: 1 addition & 12 deletions pili/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,4 @@ def list_streams(self, marker=None, limit=None):
for data in res["items"]:
items.append(Stream(self.__auth__, stream_id=data["id"]))
res["items"] = items
return res

#def streams(hub=conf.HUB, limit=None):
# marker = None
# while True:
# res = api.get_stream_list(hub=hub, marker=marker, limit=None)
# if res["items"] is not None:
# for data in res["items"]:
# yield Stream(data=data)
# else:
# break
# marker = res["marker"]#
return res
4 changes: 3 additions & 1 deletion pili/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ def hls_live_urls(self):

def hls_playback_urls(self, start_second, end_second):
res = dict()
res["ORIGIN"] = self.__base__("http", self.hosts["play"]["hls"], "")
url = self.__base__("http", self.hosts["play"]["hls"], "")
url += "?start=%d&end=%d" % (start_second, end_second)
res["ORIGIN"] = url
if self.profiles!=None:
for profile in self.profiles:
url = self.__base__("http", self.hosts["play"]["hls"], profile)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name = 'pili',
version = '1.2.0',
version = '1.2.1',
keywords = ('pili'),
description = 'SDK for pili',
license = 'MIT License',
Expand Down

0 comments on commit 46032dd

Please sign in to comment.