mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-22 14:13:33 -07:00
alternative transmission support
This commit is contained in:
parent
4bde49b993
commit
b9e9f9e225
1 changed files with 9 additions and 5 deletions
|
@ -249,11 +249,16 @@ else:
|
||||||
Logger.info("MAIN: Loading config from %s", configFilename)
|
Logger.info("MAIN: Loading config from %s", configFilename)
|
||||||
config.read(configFilename)
|
config.read(configFilename)
|
||||||
|
|
||||||
if len(sys.argv) == 3:
|
if len(sys.argv) == 3 or os.getenv('TR_TORRENT_DIR') != '':
|
||||||
# We will pass in %D, %N from uTorrent, or %TR_TORRENT_DIR% %TR_TORRENT_NAME% from Transmission (Transmission needs additional script, see TorrentToMedia.sh and TorrentToMedia.bat
|
# We will pass in %D, %N from uTorrent, or %TR_TORRENT_DIR% %TR_TORRENT_NAME% from Transmission
|
||||||
# In short pass "/path/to/downloaded/torrent/ name" to TorrentToMedia.py, eg >>>> TorrentToMedia.py /Downloaded/MovieName.2013.BluRay.1080p.x264-10bit.DTS MovieName.2013.BluRay.1080p.x264-10bit.DTS <<<<
|
# In short pass "/path/to/downloaded/torrent/ name" to TorrentToMedia.py, eg >>>> TorrentToMedia.py /Downloaded/MovieName.2013.BluRay.1080p.x264-10bit.DTS MovieName.2013.BluRay.1080p.x264-10bit.DTS <<<<
|
||||||
inputDirectory = os.path.normpath(sys.argv[1])
|
if os.getenv('TR_TORRENT_DIR') != '':
|
||||||
inputName = sys.argv[2]
|
inputDirectory = os.path.normpath(os.getenv('TR_TORRENT_DIR'))
|
||||||
|
inputName = os.getenv('TR_TORRENT_NAME')
|
||||||
|
else:
|
||||||
|
inputDirectory = os.path.normpath(sys.argv[1])
|
||||||
|
inputName = sys.argv[2]
|
||||||
|
inputCategory = '' # We dont have a category yet
|
||||||
Logger.debug("MAIN: Received Directory: %s | Name: %s", inputDirectory, inputName)
|
Logger.debug("MAIN: Received Directory: %s | Name: %s", inputDirectory, inputName)
|
||||||
|
|
||||||
# Sick-Beard
|
# Sick-Beard
|
||||||
|
@ -273,7 +278,6 @@ else:
|
||||||
root = int(0)
|
root = int(0)
|
||||||
video = int(0)
|
video = int(0)
|
||||||
video2 = int(0)
|
video2 = int(0)
|
||||||
inputCategory = '' # We dont have a category yet
|
|
||||||
|
|
||||||
inputDirectory, inputCategory, root = category_search(inputDirectory, inputCategory, root) # Confirm the catgeogy by parsing directory structure
|
inputDirectory, inputCategory, root = category_search(inputDirectory, inputCategory, root) # Confirm the catgeogy by parsing directory structure
|
||||||
if inputCategory == movieCategory:
|
if inputCategory == movieCategory:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue