Opened 11 years ago

Closed 9 years ago

#12385 closed Patch - Bug Fix (Duplicate)

Patch: Suggest that mythtranscode shouldn't always remove the original file

Reported by: Bill Meek <keemllib@…> Owned by:
Priority: minor Milestone: 0.28.1
Component: MythTV - Mythtranscode Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

changeset:3d64f8a now calls CompleteJob() for all types of transcodes.

When using --hlsstreamid, the output goes to the Streaming Storage Group and the original file(s) shouldn't be removed.

Currently, the following happens (there is no .tmp file):

mythtranscode: about to rename '/srv/mythtv-0/recordings/2609_20150217165800.ts' to '/srv/mythtv-0/recordings/2609_20150217165800.ts.old'
mythtranscode: About to unlink/delete file: /srv/mythtv-0/recordings/2609_20150217165800.ts.old

Patch tested on v0.28-pre-2670-g3d05b39-dirty. I'm not sure if the test should be for --hls or --hlsstreamid. Either works for the Content/AddLiveStream endpoint and I believe cares for the original intent to handle command line xcodes.

diff --git a/mythtv/programs/mythtranscode/main.cpp b/mythtv/programs/mythtranscode/main.cpp
index 8c84813..a01acde 100644
--- a/mythtv/programs/mythtranscode/main.cpp
+++ b/mythtv/programs/mythtranscode/main.cpp
@@ -748,7 +748,8 @@ int main(int argc, char *argv[])
         exitcode = result;
     }
 
-    CompleteJob(jobID, pginfo, useCutlist, &deleteMap, exitcode, result);
+    if (!cmdline.toBool("hlsstreamid"))
+        CompleteJob(jobID, pginfo, useCutlist, &deleteMap, exitcode, result);
 
     transcode->deleteLater();

Attachments (1)

mythtranscode-fifo-nodelete-12385.patch (522 bytes ) - added by Bradley Baetz <bbaetz@…> 9 years ago.
patch

Download all attachments as: .zip

Change History (12)

comment:1 by Stuart Morgan <smorgan@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 0f52e5c146625aef83ca880974ce94efcd17c5fb/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:2 by stuartm, 11 years ago

Milestone: unknown0.28

Thanks Bill, apologies for missing that case, I hope the damage wasn't too bad.

comment:3 by steve_g@…, 11 years ago

Should also not delete is FIFO was used. THe files may not have been transcode to the same place they came from.

}

if (!cmdline.toBool("hls")
(cmdline.toBool("fifodir")))

CompleteJob(jobID, pginfo, useCutlist, &deleteMap, exitcode, result);

or do O have to file another bug report?

comment:4 by stuartm, 11 years ago

Resolution: fixed
Status: closednew

comment:5 by stuartm, 11 years ago

Owner: changed from JYA to stuartm
Status: newaccepted

comment:6 by Stuart Auchterlonie, 9 years ago

Milestone: 0.280.28.1

Moving unresolved tickets to next point release

by Bradley Baetz <bbaetz@…>, 9 years ago

patch

comment:7 by Bradley Baetz <bbaetz@…>, 9 years ago

I've attached a patch that also avoids deleting the source file when a fifodir is being used (e.g. by nuvexport)

comment:8 by Christophe Boyanique <tof-mythtvtrac@…>, 9 years ago

I can confirm that patch provided by Bradley Baetz corrects the unwanted deletion of original file in fifo mode. Please consider including it in 0.28.1 release.

comment:9 by perkins1724@…, 9 years ago

Can the use case of the -o output file override please be considered / checked as well? It seems the original recording file is getting deleted even though there is no xxxxx.ts.tmp file to move back into its place - this is resulting in orphaned records.

http://www.gossamer-threads.com/lists/mythtv/commits/601913 refers.

comment:10 by stuartm, 9 years ago

Owner: stuartm removed
Status: acceptednew

comment:11 by JYA, 9 years ago

Resolution: Duplicate
Status: newclosed

duplicate of #12845

Note: See TracTickets for help on using tickets.