diff --git a/pandora/archive/external.py b/pandora/archive/external.py index 5f4ac3fd..be0b0a39 100644 --- a/pandora/archive/external.py +++ b/pandora/archive/external.py @@ -205,7 +205,6 @@ def download(item_id, url, referer=None): f.extract_stream() status = True else: - logger.error("failed to import %s file already exists %s", url, oshash) status = 'file exists' if len(parts) == 1: add_subtitles(f.item, media, tmp) diff --git a/pandora/archive/extract.py b/pandora/archive/extract.py index 6bb3acc1..2765f0f0 100644 --- a/pandora/archive/extract.py +++ b/pandora/archive/extract.py @@ -733,24 +733,19 @@ def remux_stream(src, dst): cmd = [ settings.FFMPEG, '-nostats', '-loglevel', 'error', - '-i', src, '-map_metadata', '-1', '-sn', + '-i', src, ] + video + [ ] + audio + [ '-movflags', '+faststart', dst ] - print(cmd) p = subprocess.Popen(cmd, stdin=subprocess.PIPE, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, + stdout=open('/dev/null', 'w'), + stderr=open('/dev/null', 'w'), close_fds=True) - stdout, stderr = p.communicate() - if stderr: - logger.error("failed to remux %s %s", cmd, stderr) - return False, stderr - else: - return True, None + p.wait() + return True, None def ffprobe(path, *args): diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 70077cfa..e5f0a1e6 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -821,10 +821,7 @@ class Stream(models.Model): done = True elif self.file.can_remux(): ok, error = extract.remux_stream(media, target) - if ok: - self.available = True - self.save() - done = True + done = True if not done: ok, error = extract.stream(media, target, self.name(), info, flags=self.flags)