Fix live tv

It is transcoding, mark as such to delete ffmpeg process when playback
ends.
This commit is contained in:
angelblue05 2016-02-14 00:26:42 -06:00
parent 6c801c326c
commit 8164c49bdf

View file

@ -36,14 +36,15 @@ class PlayUtils():
item = self.item item = self.item
playurl = None playurl = None
if item.get('Type') in ["Recording","TvChannel"] and item.get('MediaSources') and item['MediaSources'][0]['Protocol'] == "Http": if (item.get('Type') in ("Recording", "TvChannel") and
#Is this the right way to play a Live TV or recordings ? item.get('MediaSources') and item['MediaSources'][0]['Protocol'] == "Http"):
# Play LiveTV or recordings
self.logMsg("File protocol is http (livetv).", 1) self.logMsg("File protocol is http (livetv).", 1)
playurl = "%s/emby/Videos/%s/live.m3u8?static=true" % (self.server, item['Id']) playurl = "%s/emby/Videos/%s/live.m3u8?static=true" % (self.server, item['Id'])
utils.window('emby_%s.playmethod' % playurl, value="DirectPlay") utils.window('emby_%s.playmethod' % playurl, value="Transcode")
elif item.get('MediaSources') and item['MediaSources'][0]['Protocol'] == "Http": elif item.get('MediaSources') and item['MediaSources'][0]['Protocol'] == "Http":
# Only play as http # Only play as http, used for channels, or online hosting of content
self.logMsg("File protocol is http.", 1) self.logMsg("File protocol is http.", 1)
playurl = self.httpPlay() playurl = self.httpPlay()
utils.window('emby_%s.playmethod' % playurl, value="DirectStream") utils.window('emby_%s.playmethod' % playurl, value="DirectStream")