mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-08 11:03:38 +00:00
Change Add Show on Add Trending Show Page to use the full Add New Show flow.
All the features of adding a new show are now available to shows added on the Add Trending Show page.
This commit is contained in:
parent
9f5b6649b3
commit
96cd8590a8
2 changed files with 6 additions and 34 deletions
|
@ -8,6 +8,7 @@
|
||||||
* Add dropdown on Add Trending Shows to display all shows, shows not in library, or shows in library
|
* Add dropdown on Add Trending Shows to display all shows, shows not in library, or shows in library
|
||||||
* Change Help and Info icon sprites to color and text of Arguments if unused
|
* Change Help and Info icon sprites to color and text of Arguments if unused
|
||||||
* Change sharper looking heart image on the Add Show page
|
* Change sharper looking heart image on the Add Show page
|
||||||
|
* Change Add Show on Add Trending Show Page to use the full Add New Show flow
|
||||||
|
|
||||||
|
|
||||||
### 0.3.0 (2014-11-12 14:30:00 UTC)
|
### 0.3.0 (2014-11-12 14:30:00 UTC)
|
||||||
|
|
|
@ -2885,8 +2885,7 @@ class NewHomeAddShows(MainHandler):
|
||||||
|
|
||||||
return _munge(t)
|
return _munge(t)
|
||||||
|
|
||||||
|
def newShow(self, show_to_add=None, other_shows=None, use_show_name=None):
|
||||||
def newShow(self, show_to_add=None, other_shows=None):
|
|
||||||
"""
|
"""
|
||||||
Display the new show page which collects a tvdb id, folder, and extra options and
|
Display the new show page which collects a tvdb id, folder, and extra options and
|
||||||
posts them to addNewShow
|
posts them to addNewShow
|
||||||
|
@ -2905,7 +2904,9 @@ class NewHomeAddShows(MainHandler):
|
||||||
t.use_provided_info = use_provided_info
|
t.use_provided_info = use_provided_info
|
||||||
|
|
||||||
# use the given show_dir for the indexer search if available
|
# use the given show_dir for the indexer search if available
|
||||||
if not show_dir:
|
if use_show_name:
|
||||||
|
t.default_show_name = show_name
|
||||||
|
elif not show_dir:
|
||||||
t.default_show_name = ''
|
t.default_show_name = ''
|
||||||
elif not show_name:
|
elif not show_name:
|
||||||
t.default_show_name = ek.ek(os.path.basename, ek.ek(os.path.normpath, show_dir)).replace('.', ' ')
|
t.default_show_name = ek.ek(os.path.basename, ek.ek(os.path.normpath, show_dir)).replace('.', ' ')
|
||||||
|
@ -3009,37 +3010,7 @@ class NewHomeAddShows(MainHandler):
|
||||||
def addTraktShow(self, indexer_id, showName):
|
def addTraktShow(self, indexer_id, showName):
|
||||||
if helpers.findCertainShow(sickbeard.showList, int(indexer_id)):
|
if helpers.findCertainShow(sickbeard.showList, int(indexer_id)):
|
||||||
return
|
return
|
||||||
|
return self.newShow('|'.join(['', '', indexer_id, showName]), use_show_name=True)
|
||||||
if sickbeard.ROOT_DIRS:
|
|
||||||
root_dirs = sickbeard.ROOT_DIRS.split('|')
|
|
||||||
location = root_dirs[int(root_dirs[0]) + 1]
|
|
||||||
else:
|
|
||||||
location = None
|
|
||||||
|
|
||||||
if location:
|
|
||||||
show_dir = ek.ek(os.path.join, location, helpers.sanitizeFileName(showName))
|
|
||||||
dir_exists = helpers.makeDir(show_dir)
|
|
||||||
if not dir_exists:
|
|
||||||
logger.log(u"Unable to create the folder " + show_dir + ", can't add the show", logger.ERROR)
|
|
||||||
return
|
|
||||||
else:
|
|
||||||
helpers.chmodAsParent(show_dir)
|
|
||||||
|
|
||||||
sickbeard.showQueueScheduler.action.addShow(1, int(indexer_id), show_dir,
|
|
||||||
default_status=sickbeard.STATUS_DEFAULT,
|
|
||||||
quality=sickbeard.QUALITY_DEFAULT,
|
|
||||||
flatten_folders=sickbeard.FLATTEN_FOLDERS_DEFAULT,
|
|
||||||
subtitles=sickbeard.SUBTITLES_DEFAULT,
|
|
||||||
anime=sickbeard.ANIME_DEFAULT,
|
|
||||||
scene=sickbeard.SCENE_DEFAULT)
|
|
||||||
|
|
||||||
ui.notifications.message('Show added', 'Adding the specified show into ' + show_dir)
|
|
||||||
else:
|
|
||||||
logger.log(u"There was an error creating the show, no root directory setting found", logger.ERROR)
|
|
||||||
return
|
|
||||||
|
|
||||||
# done adding show
|
|
||||||
redirect('/home/')
|
|
||||||
|
|
||||||
def addNewShow(self, whichSeries=None, indexerLang="en", rootDir=None, defaultStatus=None,
|
def addNewShow(self, whichSeries=None, indexerLang="en", rootDir=None, defaultStatus=None,
|
||||||
anyQualities=None, bestQualities=None, flatten_folders=None, subtitles=None,
|
anyQualities=None, bestQualities=None, flatten_folders=None, subtitles=None,
|
||||||
|
|
Loading…
Reference in a new issue