mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 22:03:13 -07:00
extentions moved to config file
This commit is contained in:
parent
141eaf9456
commit
dc175f9818
2 changed files with 25 additions and 19 deletions
|
@ -221,7 +221,8 @@ else:
|
||||||
## We will pass in %D, %N from uTorrent, or %TR_TORRENT_DIR% %TR_TORRENT_NAME% from Transmission
|
## We will pass in %D, %N from uTorrent, or %TR_TORRENT_DIR% %TR_TORRENT_NAME% from Transmission
|
||||||
inputDirectory = os.path.normpath(sys.argv[1])
|
inputDirectory = os.path.normpath(sys.argv[1])
|
||||||
inputName = sys.argv[2]
|
inputName = sys.argv[2]
|
||||||
|
Logger.debug("Received Directory: %s | Name: %s", inputDirectory, inputName)
|
||||||
|
|
||||||
# Sick-Beard
|
# Sick-Beard
|
||||||
tvCategory = config.get("SickBeard", "category")
|
tvCategory = config.get("SickBeard", "category")
|
||||||
tvDestination = os.path.normpath(config.get("SickBeard", "outputDirectory"))
|
tvDestination = os.path.normpath(config.get("SickBeard", "outputDirectory"))
|
||||||
|
@ -231,17 +232,16 @@ else:
|
||||||
# Torrent specific
|
# Torrent specific
|
||||||
useLink = int(config.get("Torrent", "uselink"))
|
useLink = int(config.get("Torrent", "uselink"))
|
||||||
extractionTool = os.path.normpath(config.get("Torrent", "extractiontool"))
|
extractionTool = os.path.normpath(config.get("Torrent", "extractiontool"))
|
||||||
|
compressedContainer = config.get("Torrent", "compressedExtentions")
|
||||||
|
mediaContainer = config.get("Torrent", "mediaExtentions")
|
||||||
|
metaContainer = config.get("Torrent", "metaExtentions")
|
||||||
|
|
||||||
|
status = int(1) # we start as "failed" until we verify movie file in destination
|
||||||
|
root = int(0)
|
||||||
|
video = int(0)
|
||||||
|
video2 = int(0)
|
||||||
inputCategory = '' # We dont have a category yet
|
inputCategory = '' # We dont have a category yet
|
||||||
|
|
||||||
status = 1 # we start as "failed" until we verify movie file in destination
|
|
||||||
root = 0
|
|
||||||
video = 0
|
|
||||||
video2 = 0
|
|
||||||
compressedContainer = ['.zip', '.rar', '.7z', '.gz', '.bz', '.tar', '.arj']
|
|
||||||
mediaContainer = ['.mkv', '.avi', '.divx', '.xvid', '.mov', '.wmv', '.mp4', '.mpg', '.mpeg', '.vob', '.iso']
|
|
||||||
metaFile = ['.nfo', '.sub', '.srt', '.jpg', '.gif']
|
|
||||||
|
|
||||||
Logger.debug("Received Directory: %s | Name: %s", inputDirectory, inputName)
|
|
||||||
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:
|
||||||
outputDestination = os.path.normpath(os.path.join(movieDestination, inputName))
|
outputDestination = os.path.normpath(os.path.join(movieDestination, inputName))
|
||||||
|
@ -274,7 +274,7 @@ else:
|
||||||
state = copy_link(source, target, useLink, outputDestination)
|
state = copy_link(source, target, useLink, outputDestination)
|
||||||
if state == False:
|
if state == False:
|
||||||
Logger.info("Failed to link file %s.", file)
|
Logger.info("Failed to link file %s.", file)
|
||||||
elif fileExtention in metaFile:
|
elif fileExtention in metaContainer:
|
||||||
source = filePath
|
source = filePath
|
||||||
target = os.path.join(outputDestination, file)
|
target = os.path.join(outputDestination, file)
|
||||||
Logger.info("Found metadata file %s.", file)
|
Logger.info("Found metadata file %s.", file)
|
||||||
|
|
|
@ -1,18 +1,23 @@
|
||||||
[CouchPotato]
|
[CouchPotato]
|
||||||
|
category = movie
|
||||||
|
outputDirectory = /abs/path/to/complete/movies
|
||||||
|
apikey =
|
||||||
|
###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
|
||||||
host = localhost
|
host = localhost
|
||||||
port = 5050
|
port = 5050
|
||||||
username =
|
username =
|
||||||
password =
|
password =
|
||||||
ssl = 0
|
ssl = 0
|
||||||
web_root =
|
web_root =
|
||||||
apikey = xxxxxxxx
|
|
||||||
delay = 60
|
delay = 60
|
||||||
method = renamer
|
method = renamer
|
||||||
delete_failed = 0
|
delete_failed = 0
|
||||||
category = movies
|
|
||||||
outputDirectory = /abs/path/to/complete/movies
|
|
||||||
|
|
||||||
[SickBeard]
|
[SickBeard]
|
||||||
|
category = tv
|
||||||
|
outputDirectory = /abs/path/to/complete/tv
|
||||||
|
###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
|
||||||
host=localhost
|
host=localhost
|
||||||
port=8081
|
port=8081
|
||||||
username=
|
username=
|
||||||
|
@ -21,10 +26,11 @@ web_root=
|
||||||
ssl=0
|
ssl=0
|
||||||
watch_dir=
|
watch_dir=
|
||||||
failed_fork=0
|
failed_fork=0
|
||||||
category = tv
|
|
||||||
outputDirectory = /abs/path/to/complete/tv
|
|
||||||
|
|
||||||
[Torrent]
|
[Torrent]
|
||||||
uselink = 0
|
uselink = 1
|
||||||
extractiontool = C:\Program Files\7-Zip\7z.exe
|
###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ######
|
||||||
|
compressedExtentions = ['.zip', '.rar', '.7z', '.gz', '.bz', '.tar', '.arj']
|
||||||
|
mediaExtentions = ['.mkv', '.avi', '.divx', '.xvid', '.mov', '.wmv', '.mp4', '.mpg', '.mpeg', '.vob', '.iso']
|
||||||
|
metaExtentions = ['.nfo', '.sub', '.srt', '.jpg', '.gif']
|
||||||
|
extractionTool = C:\Program Files\7-Zip\7z.exe
|
Loading…
Add table
Add a link
Reference in a new issue