From 2caa28c54247d443c336e3d70d8019190e674b0e Mon Sep 17 00:00:00 2001 From: wgw Date: Sat, 15 Mar 2008 12:14:14 -0500 Subject: [PATCH] no audio is compatible --- plugins/video/transcode.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/plugins/video/transcode.py b/plugins/video/transcode.py index 7205294..8496656 100644 --- a/plugins/video/transcode.py +++ b/plugins/video/transcode.py @@ -298,12 +298,18 @@ def tivo_compatable(inFile, tsn = ''): debug_write(__name__, fn_attr(), ['FALSE, acodec', acodec, ', not supported.', inFile]) return False - if not akbps or int(akbps) > config.getMaxAudioBR(tsn): - debug_write(__name__, fn_attr(), ['FALSE,', akbps, 'kbps exceeds max audio bitrate.', inFile]) - return False - - if not kbps or int(kbps)-int(akbps) > config.strtod(config.getMaxVideoBR())/1000: - debug_write(__name__, fn_attr(), ['FALSE,', kbps, 'kbps exceeds max video bitrate.', inFile]) + if acodec != None: + if not akbps or int(akbps) > config.getMaxAudioBR(tsn): + debug_write(__name__, fn_attr(), ['FALSE,', akbps, 'kbps exceeds max audio bitrate.', inFile]) + return False + + if kbps != None: + abit = max('0', akbps) + if int(kbps)-int(abit) > config.strtod(config.getMaxVideoBR())/1000: + debug_write(__name__, fn_attr(), ['FALSE,', kbps, 'kbps exceeds max video bitrate.', inFile]) + return False + else: + debug_write(__name__, fn_attr(), ['FALSE,', kbps, 'kbps not supported.', inFile]) return False if config.isHDtivo(tsn): -- 2.11.4.GIT