mr-orange/Sick-Beard — pull request #208 by nervling (2013-05-29 17:18:09+00:00)
Title: Increased support for seeding torrents after rename.

I tested this out works fine. If anyone runs into bugs I'll be happy to help. The way processTv was written it was processing the root directory twice, which doesn't really cause any issues but to log an error message when it tries to copy the file again (as the file already exists of the same size). I modified it to just skip video files in the root directory on the second pass to avoid this, but it would work either way.

Instead of simply leaving an option to keep files when renaming, there are now four options.
Move - Do not keep just move.
Copy - Same as keep before, copy file.
Physical Link - Creates a physical link in the destination folder.
Symbolic Link - Moves the file and creates a link in its original location.

Combining post processing scripts with this will allow using to continue seeding torrents while still having the media files renamed/moved into their TV directories.

I've added linktastic to libs which is used by CouchPotato and nzbToMedia to create symbolic/hard links on both *Nix and Windows systems.

Also I realize that by using nzbToMedia we can create physical links and then just allow sickbeard to move the files. However, not all systems support physical links (unRaid to name one). Additionally, it seems better to me to just include this support in sickbeard itself rather than in the scripts.