mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 13:53:15 -07:00
commit
084e404b92
3 changed files with 3 additions and 3 deletions
|
@ -398,7 +398,7 @@ def configure_general():
|
||||||
FFMPEG_PATH = CFG['General']['ffmpeg_path']
|
FFMPEG_PATH = CFG['General']['ffmpeg_path']
|
||||||
SYS_PATH = CFG['General']['sys_path']
|
SYS_PATH = CFG['General']['sys_path']
|
||||||
CHECK_MEDIA = int(CFG['General']['check_media'])
|
CHECK_MEDIA = int(CFG['General']['check_media'])
|
||||||
REQUIRE_LAN = CFG['General']['require_lan'] or None
|
REQUIRE_LAN = CFG['General']['require_lan'].split(',') or None
|
||||||
SAFE_MODE = int(CFG['General']['safe_mode'])
|
SAFE_MODE = int(CFG['General']['safe_mode'])
|
||||||
NOEXTRACTFAILED = int(CFG['General']['no_extract_failed'])
|
NOEXTRACTFAILED = int(CFG['General']['no_extract_failed'])
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ def is_video_good(videofile, status, require_lan=None):
|
||||||
video_streams = [item for item in video_details['streams'] if item['codec_type'] == 'video']
|
video_streams = [item for item in video_details['streams'] if item['codec_type'] == 'video']
|
||||||
audio_streams = [item for item in video_details['streams'] if item['codec_type'] == 'audio']
|
audio_streams = [item for item in video_details['streams'] if item['codec_type'] == 'audio']
|
||||||
if require_lan:
|
if require_lan:
|
||||||
valid_audio = [item for item in audio_streams if 'tags' in item and 'language' in item['tags'] and item['tags']['language'] == require_lan ]
|
valid_audio = [item for item in audio_streams if 'tags' in item and 'language' in item['tags'] and item['tags']['language'] in require_lan ]
|
||||||
else:
|
else:
|
||||||
valid_audio = audio_streams
|
valid_audio = audio_streams
|
||||||
if len(video_streams) > 0 and len(valid_audio) > 0:
|
if len(video_streams) > 0 and len(valid_audio) > 0:
|
||||||
|
|
|
@ -281,7 +281,7 @@ class SeekPoint(tuple):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __new__(cls, first_sample, byte_offset, num_samples):
|
def __new__(cls, first_sample, byte_offset, num_samples):
|
||||||
return super(cls, SeekPoint).__new__(
|
return super(SeekPoint, cls).__new__(
|
||||||
cls, (first_sample, byte_offset, num_samples))
|
cls, (first_sample, byte_offset, num_samples))
|
||||||
|
|
||||||
first_sample = property(lambda self: self[0])
|
first_sample = property(lambda self: self[0])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue