Compare commits

..

No commits in common. "4794c0f68a4384fbced9f182290b0928e84a5909" and "bcece622e35738766b9baa5030cde0f47318f719" have entirely different histories.

3 changed files with 6 additions and 15 deletions

View file

@ -205,7 +205,6 @@ def download(item_id, url, referer=None):
f.extract_stream() f.extract_stream()
status = True status = True
else: else:
logger.error("failed to import %s file already exists %s", url, oshash)
status = 'file exists' status = 'file exists'
if len(parts) == 1: if len(parts) == 1:
add_subtitles(f.item, media, tmp) add_subtitles(f.item, media, tmp)

View file

@ -733,24 +733,19 @@ def remux_stream(src, dst):
cmd = [ cmd = [
settings.FFMPEG, settings.FFMPEG,
'-nostats', '-loglevel', 'error', '-nostats', '-loglevel', 'error',
'-i', src,
'-map_metadata', '-1', '-sn', '-map_metadata', '-1', '-sn',
'-i', src,
] + video + [ ] + video + [
] + audio + [ ] + audio + [
'-movflags', '+faststart', '-movflags', '+faststart',
dst dst
] ]
print(cmd)
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, p = subprocess.Popen(cmd, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stdout=open('/dev/null', 'w'),
stderr=subprocess.STDOUT, stderr=open('/dev/null', 'w'),
close_fds=True) close_fds=True)
stdout, stderr = p.communicate() p.wait()
if stderr: return True, None
logger.error("failed to remux %s %s", cmd, stderr)
return False, stderr
else:
return True, None
def ffprobe(path, *args): def ffprobe(path, *args):

View file

@ -821,10 +821,7 @@ class Stream(models.Model):
done = True done = True
elif self.file.can_remux(): elif self.file.can_remux():
ok, error = extract.remux_stream(media, target) ok, error = extract.remux_stream(media, target)
if ok: done = True
self.available = True
self.save()
done = True
if not done: if not done:
ok, error = extract.stream(media, target, self.name(), info, flags=self.flags) ok, error = extract.stream(media, target, self.name(), info, flags=self.flags)