docker-handbrake icon indicating copy to clipboard operation
docker-handbrake copied to clipboard

Exclude certain folder names in watch folder

Open RaphaelJenni opened this issue 6 years ago • 5 comments

First of all thanks for the image!

I'm currently having an issue with the auto-convert functionality. The tool that I use (Sabnzbd) converts its files during download in this folder and prefixes the folder name with UNPACK. During this time, handbrake already starts to convert the file, even though it isn't complete yet.

It would be nice to pass some kind of REGEX to the auto converter for ignoring this kind of folders.

I tried to run a pre hook and exit with 1, but this doesn't influence the auto converter it self.

RaphaelJenni avatar Aug 17 '19 16:08 RaphaelJenni

The best way to fix this is to prevent Sabnzbd to use the watch folder as its download/extract directory. I guess that Sabnzbd has a way to run custom commands/script once the download is finished? This can be used to copy/move the files to the HandBrake's watch folder.

Also, a file in the watch folder is not processed if it is not "stable" for at least 5 seconds. Maybe this is not enough for your scenario? You can try to increase this time via the AUTOMATED_CONVERSION_SOURCE_STABLE_TIME environment variable.

jlesage avatar Aug 26 '19 10:08 jlesage

The best way to fix this is to prevent Sabnzbd to use the watch folder as its download/extract directory. I guess that Sabnzbd has a way to run custom commands/script once the download is finished? This can be used to copy/move the files to the HandBrake's watch folder.

Also, a file in the watch folder is not processed if it is not "stable" for at least 5 seconds. Maybe this is not enough for your scenario? You can try to increase this time via the AUTOMATED_CONVERSION_SOURCE_STABLE_TIME environment variable.

I am having the same issue as Raphael. I have a 9900K CPU but sometimes it takes 4 minutes to unpack. So I have configured the stable time to 300 sec and this solved the issue.

However there is one downside, info, sub, txt, idx get picked up as well and some folders contain a few of them. This means that it can take up to 30 min before the actual movie file is picked up.

Now I am happy it actually works so not that bothered about this but having what Raphael suggested would be nice.

LaurensBot avatar Nov 21 '19 12:11 LaurensBot

@LaurensBot I solved it for me, by writing a custom app, that can watch multiple folders and ignore certain patterns (like for example UNPACK) of Folders/Files before moving them. I later also plan to compare the input and the output file of handbrake and take the smaller one into my library. If there is any interest in this kind of package, I will try to make it publicly available at some point.

RaphaelJenni avatar Nov 21 '19 13:11 RaphaelJenni

I think that disabling Direct Unpack in Sabnzbd could also be a solution?

jlesage avatar Nov 21 '19 23:11 jlesage

@jlesage , that does indeed help for most but there are still some cases where it starts before the unpack is done.

@RaphaelJenni I am sure there is an interest in this :)

LaurensBot avatar Nov 22 '19 07:11 LaurensBot