diff --git a/plugins/video/transcode.py b/plugins/video/transcode.py index 09599e76..8cb6ba5a 100644 --- a/plugins/video/transcode.py +++ b/plugins/video/transcode.py @@ -534,6 +534,11 @@ def tivo_compatible_video(vInfo, tsn, mime=''): message = (False, 'vCodec %s not compatible' % codec) break + # Some requests from the TiVo don't have an associated MIME type. In + # that case assume an 'h264' codec is going to be compatible. + if config.is_ts_capable(tsn) and mime == '' and codec == 'h264': + logger.debug('Assuming vCodec %s will be compatible', codec) + break if codec not in ('mpeg2video', 'mpeg1video'): message = (False, 'vCodec %s not compatible' % codec) @@ -610,9 +615,14 @@ def tivo_compatible_audio(vInfo, inFile, tsn, mime=''): return message -def tivo_compatible_container(vInfo, inFile, mime=''): +def tivo_compatible_container(vInfo, inFile, tsn, mime=''): message = (True, '') container = vInfo.get('container', '') + # Some requests from the TiVo don't have an associated MIME type. In + # that case assume a 'mpegts' container is going to be compatible. + if (config.is_ts_capable(tsn) and mime == '' and container == 'mpegts'): + logger.debug('Assuming container %s will be compatible', container) + return message if ((mime == 'video/x-tivo-mpeg-ts' and container != 'mpegts') or (mime in ['video/x-tivo-mpeg', 'video/mpeg', ''] and (container != 'mpeg' or vInfo['vCodec'] == 'mpeg1video'))): @@ -640,7 +650,7 @@ def tivo_compatible(inFile, tsn='', mime=''): message = amessage break - cmessage = tivo_compatible_container(vInfo, inFile, mime) + cmessage = tivo_compatible_container(vInfo, inFile, tsn, mime) if not cmessage[0]: message = cmessage