Changeset 5d38aa0848c8b9c42e34c11f6856097b9a5ebc32

Show
Ignore:
Timestamp:
01/12/08 19:33:50 (10 months ago)
Author:
William McBrine <wmcbrine@gmail.com>
git-committer:
William McBrine <wmcbrine@gmail.com> 1200188030 -0500
git-parent:

[b0ed4fafaa3d25f63bc59a12f099d5eb19d5a51a], [26a47c2a6f72222661d6d67e46991d7833aae016]

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

Merge branch 'master' into subfolders-8.3

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • config.py

    rb0ed4fa r5d38aa0  
    3232    if config.has_section('_tivo_' + tsn): 
    3333        if config.has_option('_tivo_' + tsn, 'aspect169'): 
    34             if config.get('_tivo_' + tsn, 'aspect169').lower() == 'true'
    35                 return True 
    36             else
    37                 return False     
    38      
     34            try
     35                return config.getboolean('_tivo_' + tsn, 'aspect169') 
     36            except ValueError
     37                pass 
     38 
    3939    if tsn[:3] in BLACKLIST_169: 
    4040        return False 
     
    6666def getDebug(): 
    6767    try: 
    68         debug = config.get('Server', 'debug') 
    69         if debug.lower() == 'true': 
    70             return True 
    71         else: 
    72             return False 
    73     except NoOptionError: 
     68        return config.getboolean('Server', 'debug') 
     69    except NoOptionError, ValueError: 
    7470        return False 
    7571 
     
    8682def getOptres(): 
    8783    try: 
    88         optres = config.get('Server', 'optres') 
    89         if optres.lower() == 'true': 
    90             return True 
    91         else: 
    92             return False 
    93     except NoOptionError: 
     84        return config.getboolean('Server', 'optres') 
     85    except NoOptionError, ValueError: 
    9486        return False 
    9587 
     
    10092    if tsn and config.has_section('_tivo_' + tsn): 
    10193        try: 
    102             return config.get('_tivo_' + tsn, 'ffmpeg_prams', raw = True) 
    103         except NoOptionError: 
    104             pass 
    105  
    106     try: 
    107         return config.get('Server', 'ffmpeg_prams', raw = True) 
     94            return config.get('_tivo_' + tsn, 'ffmpeg_prams', raw=True) 
     95        except NoOptionError: 
     96            pass 
     97 
     98    try: 
     99        return config.get('Server', 'ffmpeg_prams', raw=True) 
    108100    except NoOptionError: #default 
    109101        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 -' 
     
    138130    if tsn and config.has_section('_tivo_' + tsn): 
    139131        try: 
    140             height = int(config.get('_tivo_' + tsn, 'height')
     132            height = config.getint('_tivo_' + tsn, 'height'
    141133            return nearestTivoHeight(height) 
    142134        except NoOptionError: 
     
    144136 
    145137    try: 
    146         height = int(config.get('Server', 'height')
     138        height = config.getint('Server', 'height'
    147139        return nearestTivoHeight(height) 
    148140    except NoOptionError: #default 
     
    152144    if tsn and config.has_section('_tivo_' + tsn): 
    153145        try: 
    154             width = int(config.get('_tivo_' + tsn, 'width')
     146            width = config.getint('_tivo_' + tsn, 'width'
    155147            return nearestTivoWidth(width) 
    156148        except NoOptionError: 
     
    158150 
    159151    try: 
    160         width = int(config.get('Server', 'width')
     152        width = config.getint('Server', 'width'
    161153        return nearestTivoWidth(width) 
    162154    except NoOptionError: #default 
  • pyTivoConfigurator.pyw

    r80d8711 r757425c  
    139139 
    140140        if self.config.has_option(name, 'auto_subshares') and \ 
    141            self.config.get(name, 'auto_subshares') == 'True'
     141           self.config.getboolean(name, 'auto_subshares')
    142142            subshares = 1 
    143143        else: