Skip to content

Commit

Permalink
Update mtg hls streams
Browse files Browse the repository at this point in the history
Fixes jackuess#9 somewhat.
  • Loading branch information
deadbeef84 committed Oct 19, 2015
1 parent e8f573f commit abdf0db
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/pirateplay/lib/services/mtg.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@

mtg_hls = { 'items': [TemplateRequest(
re = r'(hls\+?)?(http://)?(www\.)?tv[368]play\.se/.*/(?P<id>\d+).*',
encode_vars = lambda v: { 'req_url': 'http://viastream.viasat.tv/MobileStream/%(id)s' % v } ),
encode_vars = lambda v: { 'req_url': 'http://playapi.play.mtgx.tv/v3/videos/stream/%(id)s' % v } ),
TemplateRequest(
re = r'"(?P<req_url>(?P<base>.+/)[^/]+.m3u8)"',
encode_vars = lambda v: { 'req_url': v['req_url'].replace('\\', ''), 'base': v['base'].replace('\\', '') } ),
re = r'"hls":\s*"(?P<req_url>[^"]+?)"',
encode_vars = lambda v: { 'req_url': v['req_url'].replace('\\', '') } ),
TemplateRequest(
re = r'BANDWIDTH=(?P<bitrate>\d+)\n(?P<url>[^\n]+)',
encode_vars = lambda v: { 'final_url': '%(base)s%(url)s' % v,
re = r'BANDWIDTH=(?P<bitrate>\d+).*?\n(?P<url>[^\n]+)',
encode_vars = lambda v: { 'final_url': '%(url)s' % v,
'quality': '%s kbps' % (str(int(v['bitrate'])/1000)),
'suffix-hint': 'mp4' })] }

Expand Down

0 comments on commit abdf0db

Please sign in to comment.