Commit graph

24 commits

Author SHA1 Message Date
clinton-hall
5773da7fcd don't convert VobSub to mov_text. Fixes #1120 2016-10-29 08:55:29 +10:30
clinton-hall
ea6175e261 check for preferred codec even if not preferred language. Fixes #1118 2016-10-26 16:29:06 +10:30
clinton-hall
bfaf2ddb17 Merge branch 'nightly' of https://github.com/clinton-hall/nzbToMedia into nightly 2016-10-07 22:48:30 +10:30
clinton-hall
07f419640c catch errors if not audio codec name. Fixes #1109 2016-10-07 22:47:01 +10:30
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
clinton-hall
319d418af8 convert to 3 letter language code. Fixes #1088 2016-09-21 11:12:42 +09:30
clinton-hall
e5a46f581d added check for language tag size. Fixes #1087 2016-09-21 09:42:32 +09:30
labrys
c5b60adb33 Fix spelling 2016-06-06 09:08:32 -04:00
labrys
2ad9f2e35f Standardize string formatting to use .format instead of concat 2016-06-06 09:08:24 -04:00
Labrys
df8c6bc20f Too broad exceptions.
* Use .get() with default value instead.
2016-06-05 13:35:46 -04:00
Labrys
1cd073cd52 Use format() instead of % for string formatting 2016-06-05 12:54:24 -04:00
Labrys
94e8a45c62 Code cleanup
* Streamline variable assignment
* Replace assignment with augmented assignment
* Remove unused variables and redundant parentheses
2016-06-05 12:54:23 -04:00
Labrys
ec71e7806d Python 3: Convert except ExceptClass, Target: to except ExceptClass as Target: 2016-06-05 12:54:02 -04:00
Labrys
abf63d6bbe Use six.iteritems helper
* Standardizes dict.iteritems between Python 2 and Python 3
2016-06-05 12:14:04 -04:00
Labrys
382d108db2 Optimize imports
* PEP8: Fix module level import not at top of file
* Remove unused imports
* Remove simplejson
* Replace mimetools with email
2016-06-05 12:03:16 -04:00
Labrys
1fd904eb5b PEP8: Tests for membership should use in/not in
* .has_key() is deprecated, use `in`
2016-06-05 12:00:20 -04:00
Labrys
8cd0e76ef8 PEP8: Fix formatting
* Remove redundant backslash between brackets
* Fix multiple statements on one line
* Fix missing/excess whitespace
* Fix comments not starting with a single # and a space
* Convert tabs to spaces
* Use triple-quoted docstring
2016-06-05 11:59:58 -04:00
Labrys
81ffe0456d Add encoding declaration 2016-06-05 02:01:03 -04:00
clinton-hall
c1b73be96a fix string and integer concat error. Fixes #1036 2016-05-19 13:27:39 +09:30
clinton-hall
8e90e84c28 add -strict -2 to dts codec. Fixes #949 2016-01-29 22:31:05 +10:30
clinton-hall
bda80c656a create unique directory inoutput incase of rename error in sick/couch 2016-01-27 23:05:30 +10:30
clinton-hall
ecdc15c84b allways add -strict -2 to aac codec. 2015-08-22 07:51:18 +09:30
clinton-hall
c0cc0a41ee add img files to transcoder extraction list. Fixes #809 2015-08-17 22:20:55 +09:30
clinton-hall
c80a678ded rename nzbtomedia to core. Fixes #744 #746 2015-04-26 16:41:39 +09:30
Renamed from nzbtomedia/transcoder/transcoder.py (Browse further)