Now uses ip for other plex server
This commit is contained in:
@@ -92,7 +92,7 @@ class strayEpisode(object):
|
|||||||
def analyseSubtitles(self, subFile):
|
def analyseSubtitles(self, subFile):
|
||||||
# TODO verify that it is a file
|
# TODO verify that it is a file
|
||||||
try:
|
try:
|
||||||
subtitlePath = os.path.join([env.show_dir, self.parent, subFile])
|
subtitlePath = os.path.join([env.input_dir, self.parent, subFile])
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# TODO don't get a list in subtitlePath
|
# TODO don't get a list in subtitlePath
|
||||||
return self.removeUploadSign(subFile)
|
return self.removeUploadSign(subFile)
|
||||||
@@ -131,7 +131,7 @@ class strayEpisode(object):
|
|||||||
conn = sqlite3.connect(env.db_path)
|
conn = sqlite3.connect(env.db_path)
|
||||||
c = conn.cursor()
|
c = conn.cursor()
|
||||||
|
|
||||||
path = '/'.join([env.show_dir, self.parent])
|
path = '/'.join([env.input_dir, self.parent])
|
||||||
video_files = json.dumps(self.videoFiles)
|
video_files = json.dumps(self.videoFiles)
|
||||||
subtitles = json.dumps(self.subtitles)
|
subtitles = json.dumps(self.subtitles)
|
||||||
trash = json.dumps(self.trash)
|
trash = json.dumps(self.trash)
|
||||||
@@ -149,7 +149,7 @@ class strayEpisode(object):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
def getDirContent(dir=env.show_dir):
|
def getDirContent(dir=env.input_dir):
|
||||||
# TODO What if item in db is not in this list?
|
# TODO What if item in db is not in this list?
|
||||||
try:
|
try:
|
||||||
return [d for d in os.listdir(dir) if d[0] != '.']
|
return [d for d in os.listdir(dir) if d[0] != '.']
|
||||||
@@ -189,12 +189,12 @@ def XOR(list1, list2):
|
|||||||
|
|
||||||
def filterChildItems(parent):
|
def filterChildItems(parent):
|
||||||
try:
|
try:
|
||||||
children = getDirContent('/'.join([env.show_dir, parent]))
|
children = getDirContent('/'.join([env.input_dir, parent]))
|
||||||
if children:
|
if children:
|
||||||
strayEpisode(parent, children)
|
strayEpisode(parent, children)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
# TODO Log to error file
|
# TODO Log to error file
|
||||||
logging.info('Error: "' + '/'.join([env.show_dir, parent]) + '" is not a valid directory.')
|
logging.info('Error: "' + '/'.join([env.input_dir, parent]) + '" is not a valid directory.')
|
||||||
|
|
||||||
def getNewItems():
|
def getNewItems():
|
||||||
newItems = XOR(getDirContent(), getShowNames())
|
newItems = XOR(getDirContent(), getShowNames())
|
||||||
|
|||||||
Reference in New Issue
Block a user