Changeset 5d38aa0848c8b9c42e34c11f6856097b9a5ebc32
- Timestamp:
- 01/12/08 19:33:50 (10 months ago)
- git-parent:
[b0ed4fafaa3d25f63bc59a12f099d5eb19d5a51a], [26a47c2a6f72222661d6d67e46991d7833aae016]
- Files:
-
- config.py (modified) (8 diffs)
- pyTivoConfigurator.pyw (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
config.py
rb0ed4fa r5d38aa0 32 32 if config.has_section('_tivo_' + tsn): 33 33 if config.has_option('_tivo_' + tsn, 'aspect169'): 34 if config.get('_tivo_' + tsn, 'aspect169').lower() == 'true':35 return True36 e lse:37 return False38 34 try: 35 return config.getboolean('_tivo_' + tsn, 'aspect169') 36 except ValueError: 37 pass 38 39 39 if tsn[:3] in BLACKLIST_169: 40 40 return False … … 66 66 def getDebug(): 67 67 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: 74 70 return False 75 71 … … 86 82 def getOptres(): 87 83 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: 94 86 return False 95 87 … … 100 92 if tsn and config.has_section('_tivo_' + tsn): 101 93 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) 108 100 except NoOptionError: #default 109 101 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 -' … … 138 130 if tsn and config.has_section('_tivo_' + tsn): 139 131 try: 140 height = int(config.get('_tivo_' + tsn, 'height'))132 height = config.getint('_tivo_' + tsn, 'height') 141 133 return nearestTivoHeight(height) 142 134 except NoOptionError: … … 144 136 145 137 try: 146 height = int(config.get('Server', 'height'))138 height = config.getint('Server', 'height') 147 139 return nearestTivoHeight(height) 148 140 except NoOptionError: #default … … 152 144 if tsn and config.has_section('_tivo_' + tsn): 153 145 try: 154 width = int(config.get('_tivo_' + tsn, 'width'))146 width = config.getint('_tivo_' + tsn, 'width') 155 147 return nearestTivoWidth(width) 156 148 except NoOptionError: … … 158 150 159 151 try: 160 width = int(config.get('Server', 'width'))152 width = config.getint('Server', 'width') 161 153 return nearestTivoWidth(width) 162 154 except NoOptionError: #default pyTivoConfigurator.pyw
r80d8711 r757425c 139 139 140 140 if self.config.has_option(name, 'auto_subshares') and \ 141 self.config.get (name, 'auto_subshares') == 'True':141 self.config.getboolean(name, 'auto_subshares'): 142 142 subshares = 1 143 143 else:
