nzbToMedia/core/transcoder
Marvin Pinto 2c8b2fc8cf Typecast the 'bit_rate' and 'channels' values into floats before attempting to convert them to ints
Otherwise we end up in a situation where audio3[0].get("bit_rate", 0)
returns the string `"192000.000000"`, which cannot be converted into an
int.

Example:

```
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> int("192000.000000")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: '192000.000000'
>>> int(float("192000.000000"))
192000
```

Relevant log entry:
```
[10:50:57] [DEBUG]::TRANSCODER: ******* Specified bit rate is: 192000.000000
Traceback (most recent call last):
  File "/opt/nzbtomedia/nzbToSickBeard.py", line 254, in <module>
    result = nzbToMedia.main(sys.argv, section)
  File "/opt/nzbtomedia/nzbToMedia.py", line 726, in main
    download_id='')
  File "/opt/nzbtomedia/nzbToMedia.py", line 615, in process
    download_id, inputCategory, failureLink)
  File "/opt/nzbtomedia/core/autoProcess/autoProcessTV.py", line 162, in processEpisode
    result, newDirName = transcoder.Transcode_directory(dirName)
  File "/opt/nzbtomedia/core/transcoder/transcoder.py", line 708, in Transcode_directory
    command = buildCommands(file, newDir, movieName, bitbucket)
  File "/opt/nzbtomedia/core/transcoder/transcoder.py", line 278, in buildCommands
    bitrate = int(audio1[0].get("bit_rate", 0)) / 1000
ValueError: invalid literal for int() with base 10: '192000.000000'
Exception TypeError: "'NoneType' object is not callable" in <bound method PosixProcess.__del__ of <core.nzbToMediaUtil.PosixProcess object at 0x7ffa6a37e590>> ignored
```
2016-10-03 16:00:37 -04:00
..
__init__.py Add encoding declaration 2016-06-05 02:01:03 -04:00
transcoder.py Typecast the 'bit_rate' and 'channels' values into floats before attempting to convert them to ints 2016-10-03 16:00:37 -04:00