1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-08-13 16:53:54 -04:00

Merge pull request #487 from mythern/dev

Workaround for #336
This commit is contained in:
Nils 2014-05-10 01:16:20 +02:00
commit 1d7b904c50

View File

@ -2221,12 +2221,18 @@ class NewHomeAddShows:
# figure out what show we're adding and where # figure out what show we're adding and where
series_pieces = whichSeries.split('|') series_pieces = whichSeries.split('|')
if len(series_pieces) < 6: if (whichSeries and rootDir) or (whichSeries and fullShowPath and len(series_pieces) > 1):
return "Error with show selection." if len(series_pieces) < 6:
logger.log("Unable to add show due to show selection. Not anough arguments: %s" % (repr(series_pieces)), logger.ERROR)
indexer = int(series_pieces[1]) ui.notifications.error("Unknown error. Unable to add show due to problem with show selection.")
indexer_id = int(series_pieces[3]) redirect('/home/addShows/existingShows/')
show_name = series_pieces[4] indexer = int(series_pieces[1])
indexer_id = int(series_pieces[3])
show_name = series_pieces[4]
else:
indexer = 1
indexer_id = int(whichSeries)
show_name = os.path.basename(os.path.normpath(fullShowPath))
# use the whole path if it's given, or else append the show name to the root dir to get the full show path # use the whole path if it's given, or else append the show name to the root dir to get the full show path
if fullShowPath: if fullShowPath: