mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-30 19:40:03 -07:00
added default socket timeout. fixes #237
This commit is contained in:
parent
a20302d4bc
commit
555124b6b1
7 changed files with 13 additions and 0 deletions
|
@ -4,12 +4,14 @@ import os.path
|
||||||
import time
|
import time
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
import logging
|
import logging
|
||||||
|
import socket
|
||||||
|
|
||||||
from nzbToMediaEnv import *
|
from nzbToMediaEnv import *
|
||||||
from nzbToMediaUtil import *
|
from nzbToMediaUtil import *
|
||||||
from nzbToMediaSceneExceptions import process_all_exceptions
|
from nzbToMediaSceneExceptions import process_all_exceptions
|
||||||
|
|
||||||
Logger = logging.getLogger()
|
Logger = logging.getLogger()
|
||||||
|
socket.setdefaulttimeout(int(TimeOut)) #initialize socket timeout.
|
||||||
|
|
||||||
class AuthURLOpener(urllib.FancyURLopener):
|
class AuthURLOpener(urllib.FancyURLopener):
|
||||||
def __init__(self, user, pw):
|
def __init__(self, user, pw):
|
||||||
|
|
|
@ -7,11 +7,13 @@ import datetime
|
||||||
import time
|
import time
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
import socket
|
||||||
|
|
||||||
from nzbToMediaEnv import *
|
from nzbToMediaEnv import *
|
||||||
from nzbToMediaUtil import *
|
from nzbToMediaUtil import *
|
||||||
|
|
||||||
Logger = logging.getLogger()
|
Logger = logging.getLogger()
|
||||||
|
socket.setdefaulttimeout(int(TimeOut)) #initialize socket timeout.
|
||||||
|
|
||||||
def process(dirName, nzbName=None, status=0, inputCategory=None):
|
def process(dirName, nzbName=None, status=0, inputCategory=None):
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import datetime
|
||||||
import time
|
import time
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
import socket
|
||||||
|
|
||||||
import Transcoder
|
import Transcoder
|
||||||
from nzbToMediaEnv import *
|
from nzbToMediaEnv import *
|
||||||
|
@ -14,6 +15,7 @@ from nzbToMediaUtil import *
|
||||||
from nzbToMediaSceneExceptions import process_all_exceptions
|
from nzbToMediaSceneExceptions import process_all_exceptions
|
||||||
|
|
||||||
Logger = logging.getLogger()
|
Logger = logging.getLogger()
|
||||||
|
socket.setdefaulttimeout(int(TimeOut)) #initialize socket timeout.
|
||||||
|
|
||||||
def get_imdb(nzbName, dirName):
|
def get_imdb(nzbName, dirName):
|
||||||
|
|
||||||
|
|
|
@ -7,11 +7,13 @@ import datetime
|
||||||
import time
|
import time
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
import socket
|
||||||
|
|
||||||
from nzbToMediaEnv import *
|
from nzbToMediaEnv import *
|
||||||
from nzbToMediaUtil import *
|
from nzbToMediaUtil import *
|
||||||
|
|
||||||
Logger = logging.getLogger()
|
Logger = logging.getLogger()
|
||||||
|
socket.setdefaulttimeout(int(TimeOut)) #initialize socket timeout.
|
||||||
|
|
||||||
def process(dirName, nzbName=None, status=0, inputCategory=None):
|
def process(dirName, nzbName=None, status=0, inputCategory=None):
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ import ConfigParser
|
||||||
import logging
|
import logging
|
||||||
import shutil
|
import shutil
|
||||||
import time
|
import time
|
||||||
|
import socket
|
||||||
|
|
||||||
import Transcoder
|
import Transcoder
|
||||||
from nzbToMediaEnv import *
|
from nzbToMediaEnv import *
|
||||||
|
@ -12,6 +13,8 @@ from nzbToMediaUtil import *
|
||||||
from nzbToMediaSceneExceptions import process_all_exceptions
|
from nzbToMediaSceneExceptions import process_all_exceptions
|
||||||
|
|
||||||
Logger = logging.getLogger()
|
Logger = logging.getLogger()
|
||||||
|
TimeOut = 4 * int(TimeOut) # SickBeard needs to complete all moving and renaming before returning the log sequence via url.
|
||||||
|
socket.setdefaulttimeout(int(TimeOut)) #initialize socket timeout.
|
||||||
|
|
||||||
|
|
||||||
class AuthURLOpener(urllib.FancyURLopener):
|
class AuthURLOpener(urllib.FancyURLopener):
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
# Global Constants
|
# Global Constants
|
||||||
VERSION = 'V9.0'
|
VERSION = 'V9.0'
|
||||||
|
TimeOut = 60
|
||||||
|
|
||||||
# Constants pertinant to SabNzb
|
# Constants pertinant to SabNzb
|
||||||
SABNZB_NO_OF_ARGUMENTS = 8
|
SABNZB_NO_OF_ARGUMENTS = 8
|
||||||
|
|
|
@ -14,6 +14,7 @@ Added Torrent Hash to Deluge to assist with movie ID.
|
||||||
Added passwords option to attempt extraction od passworded archives.
|
Added passwords option to attempt extraction od passworded archives.
|
||||||
|
|
||||||
Impacts All
|
Impacts All
|
||||||
|
Added default socket timeout to prevent script hanging when the destination servers don't respond to http requests.
|
||||||
Made processing Category Centric as an option for people running multiple versions of SickBeard and CouchPotato etc.
|
Made processing Category Centric as an option for people running multiple versions of SickBeard and CouchPotato etc.
|
||||||
Added TPB version of SickBeard processing. This now uses a fork pass-in instead of failed_fork.
|
Added TPB version of SickBeard processing. This now uses a fork pass-in instead of failed_fork.
|
||||||
Added new option to convert files, directories, and parameters to ASCII. To be used if you regularly download "foreign" titles and have problems with CP/SB.
|
Added new option to convert files, directories, and parameters to ASCII. To be used if you regularly download "foreign" titles and have problems with CP/SB.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue