Changeset 6379785af275a63402793579bba70323f0b2a8d7

Show
Ignore:
Timestamp:
02/03/08 09:28:46 (10 months ago)
Author:
William McBrine <wmcbrine@gmail.com>
git-committer:
William McBrine <wmcbrine@gmail.com> 1202052526 -0500
git-parent:

[fb9eabd78b86782b341a08f173278793d5598eb1], [1b2d64212d09600494663f5d247c1a06398f4352]

git-author:
William McBrine <wmcbrine@gmail.com> 1202052526 -0500
Message:

Merge branch 'master' into subfolders-8.3

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • config.py

    rfb9eabd r6379785  
    101101        return '-vcodec mpeg2video -r 29.97 -b %(video_br)s -maxrate %(max_video_br)s -bufsize %(buff_size)s %(aspect_ratio)s -comment pyTivo.py %(audio_codec)s -ab %(audio_br)s -f vob -' 
    102102 
    103 def getHDtivos():  # tsn's of High Definition Tivo's 
    104     return ['648', '652'] 
     103def getHDtivos(tsn):  # tsn's of High Definition Tivo's 
     104    return tsn and tsn[:3] in ['648', '652'] 
    105105 
    106106def getValidWidths(): 
     
    138138        return nearestTivoHeight(height) 
    139139    except NoOptionError: #defaults for S3/S2 TiVo 
    140         if tsn and tsn[:3] in getHDtivos(): 
     140        if getHDtivos(tsn): 
    141141            return 720 
    142142        else: 
     
    154154        return nearestTivoWidth(width) 
    155155    except NoOptionError: #defaults for S3/S2 TiVo 
    156         if tsn and tsn[:3] in getHDtivos(): 
     156        if getHDtivos(tsn): 
    157157            return 1280 
    158158        else: 
     
    172172        return str(min(audiobr, getMaxAudioBR(tsn))) + 'k' 
    173173    except NoOptionError: #defaults for S3/S2 TiVo 
    174         if tsn and tsn[:3] in getHDtivos(): 
     174        if getHDtivos(tsn): 
    175175            return '384k' 
    176176        else: 
     
    186186        return config.get('Server', 'video_br') 
    187187    except NoOptionError: #defaults for S3/S2 TiVo 
    188         if tsn and tsn[:3] in getHDtivos(): 
     188        if getHDtivos(tsn): 
    189189            return '8192k' 
    190190        else: 
     
    213213        return int(int(strtod(config.get('Server', 'max_audio_br'))/1000)/64)*64 
    214214    except NoOptionError:  
    215         if tsn and tsn[:3] in getHDtivos(): 
     215        if getHDtivos(tsn): 
    216216            return int(448) #default to 448, max supported by HD TiVo's 
    217217        else: 
  • plugins/video/transcode.py

    r6fc56fd r1fd7a51  
    6666def select_audiocodec(tsn = ''): 
    6767    #check for HD tivo and return compatible audio parameters 
    68     if tsn and tsn[:3] in config.getHDtivos(): 
     68    if config.getHDtivos(tsn): 
    6969        return '-acodec ac3 -ar 48000' 
    7070    else: 
     
    104104    multiplier4by3  =  (4.0 * TIVO_HEIGHT) / (3.0 * TIVO_WIDTH) 
    105105    
    106     if tsn[:3] in config.getHDtivos() and height <= TIVO_HEIGHT and config.getOptres() == False: 
     106    if config.getHDtivos(tsn) and height <= TIVO_HEIGHT and config.getOptres() == False: 
    107107        return [] #pass all resolutions to S3/HD, except heights greater than conf height 
    108108                # else, optres is enabled and resizes SD video to the "S2" standard on S3/HD. 
     
    244244        return False 
    245245 
    246     if tsn[:3] in config.getHDtivos(): 
     246    if config.getHDtivos(tsn): 
    247247        debug_write(['tivo_compatible: ', inFile, ' you have a S3 skiping the rest of the tests', '\n']) 
    248248        return True