From 8164c49bdf48ce31b5b1ebe2d2ed4af856d33468 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sun, 14 Feb 2016 00:26:42 -0600 Subject: [PATCH] Fix live tv It is transcoding, mark as such to delete ffmpeg process when playback ends. --- resources/lib/playutils.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/lib/playutils.py b/resources/lib/playutils.py index 7978b567..5617a6e9 100644 --- a/resources/lib/playutils.py +++ b/resources/lib/playutils.py @@ -36,14 +36,15 @@ class PlayUtils(): item = self.item playurl = None - if item.get('Type') in ["Recording","TvChannel"] and item.get('MediaSources') and item['MediaSources'][0]['Protocol'] == "Http": - #Is this the right way to play a Live TV or recordings ? + if (item.get('Type') in ("Recording", "TvChannel") and + item.get('MediaSources') and item['MediaSources'][0]['Protocol'] == "Http"): + # Play LiveTV or recordings self.logMsg("File protocol is http (livetv).", 1) 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": - # Only play as http + # Only play as http, used for channels, or online hosting of content self.logMsg("File protocol is http.", 1) playurl = self.httpPlay() utils.window('emby_%s.playmethod' % playurl, value="DirectStream")