Changeset 757425cfde5a8ac009725515121e7f9570020ace
- Timestamp:
- 01/12/08 18:36:02
(10 months ago)
- Author:
- William McBrine <wmcbrine@gmail.com>
- git-committer:
- William McBrine <wmcbrine@gmail.com> 1200184562 -0500
- git-parent:
[80d87112c29e1defd21c2ae39354b7db73870413]
- git-author:
- William McBrine <wmcbrine@gmail.com> 1200184562 -0500
- Message:
Use getboolean() where appropriate.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| ree1f97f |
r757425c |
|
| 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 True |
|---|
| 36 | | else: |
|---|
| 37 | | return False |
|---|
| 38 | | |
|---|
| | 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 | |
|---|
| 76 | 72 | def getOptres(): |
|---|
| 77 | 73 | try: |
|---|
| 78 | | optres = config.get('Server', 'optres') |
|---|
| 79 | | if optres.lower() == 'true': |
|---|
| 80 | | return True |
|---|
| 81 | | else: |
|---|
| 82 | | return False |
|---|
| 83 | | except NoOptionError: |
|---|
| | 74 | return config.getboolean('Server', 'optres') |
|---|
| | 75 | except NoOptionError, ValueError: |
|---|
| 84 | 76 | return False |
|---|
| 85 | 77 | |
|---|
| … | … | |
| 90 | 82 | if tsn and config.has_section('_tivo_' + tsn): |
|---|
| 91 | 83 | try: |
|---|
| 92 | | return config.get('_tivo_' + tsn, 'ffmpeg_prams', raw = True) |
|---|
| 93 | | except NoOptionError: |
|---|
| 94 | | pass |
|---|
| 95 | | |
|---|
| 96 | | try: |
|---|
| 97 | | return config.get('Server', 'ffmpeg_prams', raw = True) |
|---|
| | 84 | return config.get('_tivo_' + tsn, 'ffmpeg_prams', raw=True) |
|---|
| | 85 | except NoOptionError: |
|---|
| | 86 | pass |
|---|
| | 87 | |
|---|
| | 88 | try: |
|---|
| | 89 | return config.get('Server', 'ffmpeg_prams', raw=True) |
|---|
| 98 | 90 | except NoOptionError: #default |
|---|
| 99 | 91 | 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 -' |
|---|
| 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: |
|---|