Fix possible IndexError

This commit is contained in:
tomkat83 2017-03-05 16:30:39 +01:00
parent 501a7ddbd9
commit 4d555a9314
1 changed files with 4 additions and 3 deletions

View File

@ -9,6 +9,7 @@ import xbmcgui
import xbmcvfs
from utils import window, settings, tryEncode, language as lang
import variables as v
import PlexAPI
@ -160,11 +161,11 @@ class PlayUtils():
- video bitrate above specified settings bitrate
if the corresponding file settings are set to 'true'
"""
videoCodec = self.API.getVideoCodec()
log.info("videoCodec: %s" % videoCodec)
if self.API.getType() in ('clip', 'track'):
if self.API.getType() in (v.PLEX_TYPE_CLIP, v.PLEX_TYPE_SONG):
log.info('Plex clip or music track, not transcoding')
return False
videoCodec = self.API.getVideoCodec()
log.info("videoCodec: %s" % videoCodec)
if window('plex_forcetranscode') == 'true':
log.info('User chose to force-transcode')
return True