Is there a way to prevent --action move from moving single media files that are NOT rar'd?

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Synk556
Posts: 21
Joined: 02 Dec 2017, 23:06

Is there a way to prevent --action move from moving single media files that are NOT rar'd?

Post by Synk556 »

So when I download a show that comes as a video file (ie no rars at all), it moves the file like it's supposed to, but that breaks the torrent. Is there a way to prevent this and still use the move command? I know I could use --action copy, but then that leaves the extracted files (For the majority of the torrents that are rar'd) in the torrent folder and I have to clean them up. (I know I could use --defclean=y to fix THAT, but that also deletes .nfo and .sfv files...breaking the torrent.)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Is there a way to prevent --action move from moving single media files that are NOT rar'd?

Post by rednoah »

1.
You're asking about this:

Code: Select all

--action copy --def clean=y --def deleteAfterExtract=y
:idea: --def clean=y won't delete NFO files if --action copy is used.


2.
You may want to read up on hardlinks. If disk space is your concern, then just always use hardlinks, and never delete files. It'll be faster and use less disk space than your current solution.
:idea: Please read the FAQ and How to Request Help.
Synk556
Posts: 21
Joined: 02 Dec 2017, 23:06

Re: Is there a way to prevent --action move from moving single media files that are NOT rar'd?

Post by Synk556 »

Ooo Sweet, I'll try that, thanks. Disk space isn't my concern, I'm just ocd about clean folders lol. How would I implement a hardlink with the FB script?

Changing the subject, I want to thank you for your customer service. You always respond, and are helpful. Definitely not always the case among developers.
Synk556
Posts: 21
Joined: 02 Dec 2017, 23:06

Re: Is there a way to prevent --action move from moving single media files that are NOT rar'd?

Post by Synk556 »

So this works for me, finally:

filebot -script fn:amc --output "D:\Downloads" --action copy --def clean=y --conflict skip -non-strict --log-file amc.log --def unsorted=y music=y artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" --def extractFolder=D:/Downloads/Empties

Extracts, copies, doesn't delete anything it shouldn't, and I now don't have to worry about broken torrents or doing anything manually. Thanks a bunch.

I'm still interested to know how I'd implement a hardlink in the FB script?
Last edited by Synk556 on 08 Mar 2018, 04:22, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Is there a way to prevent --action move from moving single media files that are NOT rar'd?

Post by rednoah »

Depends on your setup. If everything is on the same filesystem, then using hardlinks makes alot of sense. If things are not on the same filesystem, then putting everything on the same filesystem just to use hardlinks makes a lot of sense too.

:arrow: It means that you can have the same file many times in your filesystem in different folders with different names without taking up physical disk space more than once. That means that if you have 2 hardlinks for the same physical data, deleting one of them doesn't make a difference, because the space won't be released until all hardlinks are deleted, so there's no reason not to keep extra "copies" around. But if you're OCD and want to delete file entries, then hardlinks won't help you there. ;)

@see https://en.wikipedia.org/wiki/Hard_link#Example
:idea: Please read the FAQ and How to Request Help.
Synk556
Posts: 21
Joined: 02 Dec 2017, 23:06

Re: Is there a way to prevent --action move from moving single media files that are NOT rar'd?

Post by Synk556 »

Ah, note that I edited the post that you responded to because I found a solution.

As to what you're saying about hard links, it sounds like I would still have to have 1. the rars (for the torrent) and 2. the extracted file. So no real savings, because it's that duplicity that I have to have in order to maintain torrent integrity and be able to watch whatever. Nothing FB can do about that. (Or any program afaik).
Last edited by Synk556 on 08 Mar 2018, 04:29, edited 2 times in total.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Is there a way to prevent --action move from moving single media files that are NOT rar'd?

Post by rednoah »

Yes, in the case of compressed files, you won't be able to share physical disk space for compressed and uncompressed files.

The best solution is to extract to a custom --def extractFolder that is on the same filesystem as your final destination, and then --action hardlink to that final destination. That way your hard drive only has to write the file once when extracting the file. The --def extractFolder you can just forget afterwards, because it won't use extra disk space, and maybe delete once in a while if OCD demands.
:idea: Please read the FAQ and How to Request Help.
Synk556
Posts: 21
Joined: 02 Dec 2017, 23:06

Re: Is there a way to prevent --action move from moving single media files that are NOT rar'd?

Post by Synk556 »

Final question - I can find the --def commands easy enough. Is there a list of the --actions? Thanks.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Is there a way to prevent --action move from moving single media files that are NOT rar'd?

Post by rednoah »

:idea: --def name=value are script options so each script has it's own.

:arrow: The --action option is a FileBot option that is common to all filebot calls. You can use filebot -help to see the command-line usage manual.

:arrow: The basics are covered in the command-line usage, but --action as a manual for more advanced usages as well.
:idea: Please read the FAQ and How to Request Help.
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Re: Is there a way to prevent --action move from moving single media files that are NOT rar'd?

Post by devster »

Symlinks (direct or reverse) are one of the ways I use to keep things clean.
Especially on *nix systems utilities such as find can easily differentiate between files renamed and files in seeding just by looking at the presence of symlinks. This also helps if you have petabytes of stuff since it can't always be on the same filesystem. (at least not the ones I know)
I only work in black and sometimes very, very dark grey. (Batman)
Post Reply