Closed jrruethe closed 2 weeks ago
My flow is a bit big, I can't get a good screenshot, but here it is. The left column is "Stage 1", the middle two columns are "Stage 2", and the rightmost column decides if the output of Stage 1 or Stage 2 should be kept.
I had thought that using "Replace Original File" after Stage 1, then either "Replace Original File" or "Delete Working File" after Stage 2 would accomplish what I want, but its not quite there.
When the flow ends, the current working file is what will be kept in Tdarr's database (the file that shows in the Transcode: Success/Not Required
and contributes to the Tdarr stats). So if the current working file at the end of the flow is deleted or in the cache then it will cause a flow error. So if you only replace the original file at the end of the flow then should be no issues. And you don't need to manually delete files still in the cache as they're automatically cleaned up.
Are any of your plugins renaming the file? If not then using Set Original File
after Replace Original File
should still point to the new file as they have the same name.
I am not doing any renaming.
Ok, so maybe I misunderstood what was happening behind the scenes. You are saying:
Is this correct?
That should work but I assume Set Container
will sometimes change the filename if the original container is different so would not work in that case. So we'd need a new type of plugin to handle this type of situation.
It seems like I need a way to end a flow successfully that does not require replacing the file.
"Replace Original File" appears to be the way to "end" a flow successfully, and results in the working file replacing the original file. But I'm not sure how to "end" a flow successfully while simultaneously discarding the working file. I thought "Delete Working File" was the way to do this. "Set Original File" doesn't appear quite right either, because I don't want to rewind all the way back to the beginning.
My current workaround is to use the "Review Required" node, which allows me to use the "Skip" button in the staging window. That is better than failing the flow and selecting "ignore". But this causes my staging area to fill up, which stops the node from processing, until I manually clear it.
I suppose another alternative would be a way to assign multiple flows to a library, and require all flows to complete (in a specified order). Then I could split my "Stages" into two flows, and the second flow would be able to use "Set Original File". However, that is a complicated feature request.
Thanks for your help and responses!
For what it is worth, I tinkered some more and came to the same conclusion as this issue, where I do the reencoding first, then the cleaning.
This way, my "Stage 1" determines whether to reencode. If it does, it determines if the reencoding should be kept. If so, replace, otherwise reset to original file. Then "Stage 2" does the cleaning operations, which will either be on the original file or the reencoded file.
Therefore, I think I have my problem solved. I'll close this issue.
Here is my new flow: new_flow.txt
Describe the bug My problem is similar to this one, where I want to accomplish the following:
The main issue is that the "Set Original File" resets back before Stage 1, regardless of my "Replace Original File".
My attempt to delete the working file at the end also fails. (This might be the actual bug?)
To Reproduce Steps to reproduce the behavior:
I attached both the flow and the job report flow.txt job_report.txt
The error at the bottom, in the "Delete File" step, shows:
Followed by:
which implies that the delete didn't actually occur? No permission issues.
Expected behavior
I expected two things:
Please provide the following information: Using version 2.24.05 in Docker