mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
use linktastic
thanks berkona
This commit is contained in:
parent
2f65f0d7fc
commit
a09b5e0fda
1 changed files with 2 additions and 7 deletions
|
@ -4,7 +4,7 @@ import autoProcessMovie
|
||||||
import autoProcessTV
|
import autoProcessTV
|
||||||
import sys, os, ConfigParser, shutil
|
import sys, os, ConfigParser, shutil
|
||||||
import logging, logging.config
|
import logging, logging.config
|
||||||
from subprocess import call
|
import linktastic
|
||||||
|
|
||||||
from nzbToMediaEnv import *
|
from nzbToMediaEnv import *
|
||||||
|
|
||||||
|
@ -222,12 +222,7 @@ elif useLink == 1 and packed == 0 and video == 1: ## hardlink
|
||||||
source = os.path.join(dirpath, file)
|
source = os.path.join(dirpath, file)
|
||||||
target = os.path.join(destination, file)
|
target = os.path.join(destination, file)
|
||||||
|
|
||||||
if os.name == 'nt':
|
linktastic.link(source, target)
|
||||||
subprocess.call(['cmd', '/C', 'mklink', '/H', source, target], stdout=subprocess.PIPE)
|
|
||||||
elif os.name == 'posix':
|
|
||||||
os.link(source, target)
|
|
||||||
else:
|
|
||||||
Logger.info("Hardlink failed, cannot determine OS.")
|
|
||||||
|
|
||||||
elif packed == 1: ## unpack
|
elif packed == 1: ## unpack
|
||||||
## Using Windows?
|
## Using Windows?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue