bug fixing
This commit is contained in:
@@ -63,6 +63,13 @@ class Settings:
|
|||||||
return ""
|
return ""
|
||||||
else:
|
else:
|
||||||
return show["InputDirectory"]
|
return show["InputDirectory"]
|
||||||
|
|
||||||
|
def GetShowUnknownDirectory(self, showName):
|
||||||
|
show = self.__GetShowSubsection(showName)
|
||||||
|
if show is None:
|
||||||
|
return ""
|
||||||
|
else:
|
||||||
|
return show["UnknownDirectory"]
|
||||||
|
|
||||||
def GetShowOutputDirectory(self, showName):
|
def GetShowOutputDirectory(self, showName):
|
||||||
show = self.__GetShowSubsection(showName)
|
show = self.__GetShowSubsection(showName)
|
||||||
|
|||||||
@@ -30,13 +30,15 @@ class TVData:
|
|||||||
else:
|
else:
|
||||||
return number
|
return number
|
||||||
|
|
||||||
def GetDirectory(self, title, season):
|
def GetDirectory(self, title, seasonFolder, season, episode):
|
||||||
show = self.settings.GetShow(title)
|
show = self.settings.GetShow(title)
|
||||||
if not show or show == "":
|
if not show or show == "":
|
||||||
print "Couldn't find show for {0}".format(title)
|
print "Couldn't find show for {0}".format(title)
|
||||||
return self.settings.UnknownDirectory()
|
return self.settings.UnknownDirectory()
|
||||||
|
elif season == "S00" or episode == "E00":
|
||||||
|
return self.settings.GetShowUnknownDirectory(show)
|
||||||
else:
|
else:
|
||||||
return os.path.join(self.settings.GetShowInputDirectory(show), season)
|
return os.path.join(self.settings.GetShowInputDirectory(show), seasonFolder)
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
# if title == "Thomas and Friends" or title == "Thomas the Tank Engine & Friends":
|
# if title == "Thomas and Friends" or title == "Thomas the Tank Engine & Friends":
|
||||||
# directory = THOMAS
|
# directory = THOMAS
|
||||||
@@ -80,17 +82,17 @@ class TVData:
|
|||||||
show.episode = str(result[1])
|
show.episode = str(result[1])
|
||||||
show.subtitle = result[2]
|
show.subtitle = result[2]
|
||||||
|
|
||||||
if show.season != "0" and show.episode != "0":
|
#if show.season != "0" and show.episode != "0":
|
||||||
show.season = self.FixEpisodeSeasonNumber(show.season)
|
show.season = self.FixEpisodeSeasonNumber(show.season)
|
||||||
show.episode = self.FixEpisodeSeasonNumber(show.episode)
|
show.episode = self.FixEpisodeSeasonNumber(show.episode)
|
||||||
|
|
||||||
seasonFolder = "Season {0}".format(show.season)
|
seasonFolder = "Season {0}".format(show.season)
|
||||||
season = "S{0}".format(show.season)
|
season = "S{0}".format(show.season)
|
||||||
episode = "E{0}".format(show.episode)
|
episode = "E{0}".format(show.episode)
|
||||||
renamedFile = "{0}{1} - {2} - SD TV_.mpg".format(season, episode, show.subtitle)
|
renamedFile = "{0}{1} - {2} - SD TV_.mpg".format(season, episode, show.subtitle)
|
||||||
|
|
||||||
directory = self.GetDirectory(show.title, seasonFolder)
|
directory = self.GetDirectory(show.title, seasonFolder, season, episode)
|
||||||
|
|
||||||
show.outputFile = os.path.join(directory, file[:-4], renamedFile)
|
show.outputFile = os.path.join(directory, file[:-4], renamedFile)
|
||||||
show.inputFile = inputFile
|
show.inputFile = inputFile
|
||||||
|
|
||||||
|
|||||||
@@ -16,36 +16,42 @@ HandbrakeCommand = "HandBrakeCLI", "--verbose", "-i", "SUBSTITUTE WITH INPUT FIL
|
|||||||
UnknownInput = "/srv/storage2/files/VideoProcessing/Unknown/"
|
UnknownInput = "/srv/storage2/files/VideoProcessing/Unknown/"
|
||||||
[[ "Thomas the Tank Engine & Friends" ]]
|
[[ "Thomas the Tank Engine & Friends" ]]
|
||||||
InputDirectory = "/srv/storage2/files/VideoProcessing/Thomas/Input/"
|
InputDirectory = "/srv/storage2/files/VideoProcessing/Thomas/Input/"
|
||||||
|
UnknownDirectory = "/srv/storage2/files/VideoProcessing/Unknown/Thomas/"
|
||||||
OutputDirectory = "/srv/storage2/videos/Kids/TV/Thomas The Tank Engine & Friends/"
|
OutputDirectory = "/srv/storage2/videos/Kids/TV/Thomas The Tank Engine & Friends/"
|
||||||
alias = "Thomas and Friends",
|
alias = "Thomas and Friends",
|
||||||
MythTvEpisodePrefix = ,
|
MythTvEpisodePrefix = ,
|
||||||
SickbeardPrefix = ""
|
SickbeardPrefix = ""
|
||||||
[[ "Chuggington" ]]
|
[[ "Chuggington" ]]
|
||||||
InputDirectory = "/srv/storage2/files/VideoProcessing/Chuggington/Input/"
|
InputDirectory = "/srv/storage2/files/VideoProcessing/Chuggington/Input/"
|
||||||
|
UnknownDirectory = "/srv/storage2/files/VideoProcessing/Unknown/Chuggington/"
|
||||||
OutputDirectory = "/srv/storage2/videos/Kids/TV/Chuggington/"
|
OutputDirectory = "/srv/storage2/videos/Kids/TV/Chuggington/"
|
||||||
alias = ,
|
alias = ,
|
||||||
MythTvEpisodePrefix = ,
|
MythTvEpisodePrefix = ,
|
||||||
SickbeardPrefix = ""
|
SickbeardPrefix = ""
|
||||||
[[ "Mike the Knight" ]]
|
[[ "Mike the Knight" ]]
|
||||||
InputDirectory = "/srv/storage2/files/VideoProcessing/MikeTheKnight/Input/"
|
InputDirectory = "/srv/storage2/files/VideoProcessing/MikeTheKnight/Input/"
|
||||||
|
UnknownDirectory = "/srv/storage2/files/VideoProcessing/Unknown/MikeTheKnight/"
|
||||||
OutputDirectory = "/srv/storage2/videos/Kids/TV/Mike the Knight/"
|
OutputDirectory = "/srv/storage2/videos/Kids/TV/Mike the Knight/"
|
||||||
alias = ,
|
alias = ,
|
||||||
MythTvEpisodePrefix = "Mike the Knight and the ", Mike the Knight and "
|
MythTvEpisodePrefix = "Mike the Knight and the ", Mike the Knight and "
|
||||||
SickbeardPrefix = ""
|
SickbeardPrefix = ""
|
||||||
[[ "Octonauts" ]]
|
[[ "Octonauts" ]]
|
||||||
InputDirectory = "/srv/storage2/files/VideoProcessing/Octonauts/Input/"
|
InputDirectory = "/srv/storage2/files/VideoProcessing/Octonauts/Input/"
|
||||||
|
UnknownDirectory = "/srv/storage2/files/VideoProcessing/Unknown/Octonauts/"
|
||||||
OutputDirectory = "/srv/storage2/videos/Kids/TV/Octonauts/"
|
OutputDirectory = "/srv/storage2/videos/Kids/TV/Octonauts/"
|
||||||
alias = "The Octonauts",
|
alias = "The Octonauts",
|
||||||
MythTvEpisodePrefix = "The Octonauts and ",
|
MythTvEpisodePrefix = "The Octonauts and ",
|
||||||
SickbeardPrefix = "The "
|
SickbeardPrefix = "The"
|
||||||
[[ "In the Night Garden" ]]
|
[[ "In the Night Garden" ]]
|
||||||
InputDirectory = "/srv/storage2/files/VideoProcessing/InTheNightGarden/Input/"
|
InputDirectory = "/srv/storage2/files/VideoProcessing/InTheNightGarden/Input/"
|
||||||
|
UnknownDirectory = "/srv/storage2/files/VideoProcessing/Unknown/InTheNightGarden/"
|
||||||
OutputDirectory = "/srv/storage2/videos/Kids/TV/In The Night Garden/"
|
OutputDirectory = "/srv/storage2/videos/Kids/TV/In The Night Garden/"
|
||||||
alias = ,
|
alias = ,
|
||||||
MythTvEpisodePrefix = ,
|
MythTvEpisodePrefix = ,
|
||||||
SickbeardPrefix = ""
|
SickbeardPrefix = ""
|
||||||
[[ "Raa Raa! The Noisy Lion" ]]
|
[[ "Raa Raa! The Noisy Lion" ]]
|
||||||
InputDirectory = "/srv/storage2/files/VideoProcessing/RaaRaa/Input/"
|
InputDirectory = "/srv/storage2/files/VideoProcessing/RaaRaa/Input/"
|
||||||
|
UnknownDirectory = "/srv/storage2/files/VideoProcessing/Unknown/RaaRaa/"
|
||||||
OutputDirectory = "/srv/storage2/videos/Kids/TV/Raa Raa the Noisy Lion/"
|
OutputDirectory = "/srv/storage2/videos/Kids/TV/Raa Raa the Noisy Lion/"
|
||||||
alias = ,
|
alias = ,
|
||||||
MythTvEpisodePrefix = ,
|
MythTvEpisodePrefix = ,
|
||||||
|
|||||||
Reference in New Issue
Block a user