mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
Merge pull request #231 from JackDandy/feature/AddSetDefaultHomePage
Add a "Use as default home page" selector to...
This commit is contained in:
commit
2fed918e06
5 changed files with 28 additions and 3 deletions
|
@ -8,6 +8,7 @@
|
||||||
* Update Pushbullet notifier (port from midgetspy/sickbeard)
|
* Update Pushbullet notifier (port from midgetspy/sickbeard)
|
||||||
* Change startup code cleanup and PEP8
|
* Change startup code cleanup and PEP8
|
||||||
* Change authentication credentials to display more securely on config pages
|
* Change authentication credentials to display more securely on config pages
|
||||||
|
* Add a "Use as default home page" selector to General Config/Interface/User Interface
|
||||||
|
|
||||||
[develop changelog]
|
[develop changelog]
|
||||||
|
|
||||||
|
|
|
@ -225,6 +225,19 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair">
|
||||||
|
<label for="default_home">
|
||||||
|
<span class="component-title">Use as default home page:</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<select id="default_home" name="default_home" class="form-control input-sm">
|
||||||
|
<option value="shows" #if $sickbeard.DEFAULT_HOME == 'shows' then 'selected="selected"' else ''#>Shows</option>
|
||||||
|
<option value="episodes" #if $sickbeard.DEFAULT_HOME == 'episodes' then 'selected="selected"' else ''#>Episodes</option>
|
||||||
|
<option value="history" #if $sickbeard.DEFAULT_HOME == 'history' then 'selected="selected"' else ''#>History</option>
|
||||||
|
</select>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="field-pair">
|
<div class="field-pair">
|
||||||
<label for="home_search_focus">
|
<label for="home_search_focus">
|
||||||
<span class="component-title">Give show list search focus</span>
|
<span class="component-title">Give show list search focus</span>
|
||||||
|
|
|
@ -144,7 +144,7 @@
|
||||||
<li id="NAVhome" class="dropdown">
|
<li id="NAVhome" class="dropdown">
|
||||||
<a href="$sbRoot/home/" class="dropdown-toggle" data-toggle="dropdown" data-delay="0" tabindex="$tab#set $tab += 1#">Shows <b class="caret"></b></a>
|
<a href="$sbRoot/home/" class="dropdown-toggle" data-toggle="dropdown" data-delay="0" tabindex="$tab#set $tab += 1#">Shows <b class="caret"></b></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="$sbRoot/home/" tabindex="$tab#set $tab += 1#"><i class="menu-icon-home"></i> Show List</a></li>
|
<li><a href="$sbRoot/home/showlistView/" tabindex="$tab#set $tab += 1#"><i class="menu-icon-home"></i> Show List</a></li>
|
||||||
<li><a href="$sbRoot/home/addShows/" tabindex="$tab#set $tab += 1#"><i class="menu-icon-addshow"></i> Add Shows</a></li>
|
<li><a href="$sbRoot/home/addShows/" tabindex="$tab#set $tab += 1#"><i class="menu-icon-addshow"></i> Add Shows</a></li>
|
||||||
<li><a href="$sbRoot/home/postprocess/" tabindex="$tab#set $tab += 1#"><i class="menu-icon-postprocess"></i> Manual Post-Processing</a></li>
|
<li><a href="$sbRoot/home/postprocess/" tabindex="$tab#set $tab += 1#"><i class="menu-icon-postprocess"></i> Manual Post-Processing</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -412,6 +412,7 @@ EMAIL_FROM = None
|
||||||
EMAIL_LIST = None
|
EMAIL_LIST = None
|
||||||
|
|
||||||
GUI_NAME = None
|
GUI_NAME = None
|
||||||
|
DEFAULT_HOME = None
|
||||||
HOME_LAYOUT = None
|
HOME_LAYOUT = None
|
||||||
HISTORY_LAYOUT = None
|
HISTORY_LAYOUT = None
|
||||||
DISPLAY_SHOW_SPECIALS = False
|
DISPLAY_SHOW_SPECIALS = False
|
||||||
|
@ -496,7 +497,7 @@ def initialize(consoleLogging=True):
|
||||||
USE_EMAIL, EMAIL_HOST, EMAIL_PORT, EMAIL_TLS, EMAIL_USER, EMAIL_PASSWORD, EMAIL_FROM, EMAIL_NOTIFY_ONSNATCH, EMAIL_NOTIFY_ONDOWNLOAD, EMAIL_NOTIFY_ONSUBTITLEDOWNLOAD, EMAIL_LIST, \
|
USE_EMAIL, EMAIL_HOST, EMAIL_PORT, EMAIL_TLS, EMAIL_USER, EMAIL_PASSWORD, EMAIL_FROM, EMAIL_NOTIFY_ONSNATCH, EMAIL_NOTIFY_ONDOWNLOAD, EMAIL_NOTIFY_ONSUBTITLEDOWNLOAD, EMAIL_LIST, \
|
||||||
USE_LISTVIEW, METADATA_XBMC, METADATA_XBMC_12PLUS, METADATA_MEDIABROWSER, METADATA_PS3, metadata_provider_dict, \
|
USE_LISTVIEW, METADATA_XBMC, METADATA_XBMC_12PLUS, METADATA_MEDIABROWSER, METADATA_PS3, metadata_provider_dict, \
|
||||||
NEWZBIN, NEWZBIN_USERNAME, NEWZBIN_PASSWORD, GIT_PATH, MOVE_ASSOCIATED_FILES, POSTPONE_IF_SYNC_FILES, recentSearchScheduler, NFO_RENAME, \
|
NEWZBIN, NEWZBIN_USERNAME, NEWZBIN_PASSWORD, GIT_PATH, MOVE_ASSOCIATED_FILES, POSTPONE_IF_SYNC_FILES, recentSearchScheduler, NFO_RENAME, \
|
||||||
GUI_NAME, HOME_LAYOUT, HISTORY_LAYOUT, DISPLAY_SHOW_SPECIALS, EPISODE_VIEW_LAYOUT, EPISODE_VIEW_SORT, EPISODE_VIEW_DISPLAY_PAUSED, EPISODE_VIEW_MISSED_RANGE, FUZZY_DATING, TRIM_ZERO, DATE_PRESET, TIME_PRESET, TIME_PRESET_W_SECONDS, THEME_NAME, \
|
GUI_NAME, DEFAULT_HOME, HOME_LAYOUT, HISTORY_LAYOUT, DISPLAY_SHOW_SPECIALS, EPISODE_VIEW_LAYOUT, EPISODE_VIEW_SORT, EPISODE_VIEW_DISPLAY_PAUSED, EPISODE_VIEW_MISSED_RANGE, FUZZY_DATING, TRIM_ZERO, DATE_PRESET, TIME_PRESET, TIME_PRESET_W_SECONDS, THEME_NAME, \
|
||||||
POSTER_SORTBY, POSTER_SORTDIR, \
|
POSTER_SORTBY, POSTER_SORTDIR, \
|
||||||
METADATA_WDTV, METADATA_TIVO, METADATA_MEDE8ER, IGNORE_WORDS, REQUIRE_WORDS, CALENDAR_UNPROTECTED, CREATE_MISSING_SHOW_DIRS, \
|
METADATA_WDTV, METADATA_TIVO, METADATA_MEDE8ER, IGNORE_WORDS, REQUIRE_WORDS, CALENDAR_UNPROTECTED, CREATE_MISSING_SHOW_DIRS, \
|
||||||
ADD_SHOWS_WO_DIR, USE_SUBTITLES, SUBTITLES_LANGUAGES, SUBTITLES_DIR, SUBTITLES_SERVICES_LIST, SUBTITLES_SERVICES_ENABLED, SUBTITLES_HISTORY, SUBTITLES_FINDER_FREQUENCY, subtitlesFinderScheduler, \
|
ADD_SHOWS_WO_DIR, USE_SUBTITLES, SUBTITLES_LANGUAGES, SUBTITLES_DIR, SUBTITLES_SERVICES_LIST, SUBTITLES_SERVICES_ENABLED, SUBTITLES_HISTORY, SUBTITLES_FINDER_FREQUENCY, subtitlesFinderScheduler, \
|
||||||
|
@ -563,6 +564,7 @@ def initialize(consoleLogging=True):
|
||||||
helpers.clearCache()
|
helpers.clearCache()
|
||||||
|
|
||||||
GUI_NAME = check_setting_str(CFG, 'GUI', 'gui_name', 'slick')
|
GUI_NAME = check_setting_str(CFG, 'GUI', 'gui_name', 'slick')
|
||||||
|
DEFAULT_HOME = check_setting_str(CFG, 'GUI', 'default_home', 'home')
|
||||||
|
|
||||||
THEME_NAME = check_setting_str(CFG, 'GUI', 'theme_name', 'dark')
|
THEME_NAME = check_setting_str(CFG, 'GUI', 'theme_name', 'dark')
|
||||||
|
|
||||||
|
@ -1748,6 +1750,7 @@ def save_config():
|
||||||
|
|
||||||
new_config['GUI'] = {}
|
new_config['GUI'] = {}
|
||||||
new_config['GUI']['gui_name'] = GUI_NAME
|
new_config['GUI']['gui_name'] = GUI_NAME
|
||||||
|
new_config['GUI']['default_home'] = DEFAULT_HOME
|
||||||
new_config['GUI']['theme_name'] = THEME_NAME
|
new_config['GUI']['theme_name'] = THEME_NAME
|
||||||
new_config['GUI']['home_layout'] = HOME_LAYOUT
|
new_config['GUI']['home_layout'] = HOME_LAYOUT
|
||||||
new_config['GUI']['history_layout'] = HISTORY_LAYOUT
|
new_config['GUI']['history_layout'] = HISTORY_LAYOUT
|
||||||
|
|
|
@ -557,7 +557,14 @@ class Home(MainHandler):
|
||||||
return epObj
|
return epObj
|
||||||
|
|
||||||
def index(self, *args, **kwargs):
|
def index(self, *args, **kwargs):
|
||||||
|
if 'episodes' == sickbeard.DEFAULT_HOME:
|
||||||
|
self.redirect('/episodeView/')
|
||||||
|
elif 'history' == sickbeard.DEFAULT_HOME:
|
||||||
|
self.redirect('/history/')
|
||||||
|
else:
|
||||||
|
self.redirect('/home/showlistView/')
|
||||||
|
|
||||||
|
def showlistView(self):
|
||||||
t = PageTemplate(headers=self.request.headers, file='home.tmpl')
|
t = PageTemplate(headers=self.request.headers, file='home.tmpl')
|
||||||
if sickbeard.ANIME_SPLIT_HOME:
|
if sickbeard.ANIME_SPLIT_HOME:
|
||||||
shows = []
|
shows = []
|
||||||
|
@ -3288,7 +3295,7 @@ class ConfigGeneral(Config):
|
||||||
handle_reverse_proxy=None, home_search_focus=None, sort_article=None, auto_update=None, notify_on_update=None,
|
handle_reverse_proxy=None, home_search_focus=None, sort_article=None, auto_update=None, notify_on_update=None,
|
||||||
proxy_setting=None, proxy_indexers=None, anon_redirect=None, git_path=None, git_remote=None, calendar_unprotected=None,
|
proxy_setting=None, proxy_indexers=None, anon_redirect=None, git_path=None, git_remote=None, calendar_unprotected=None,
|
||||||
fuzzy_dating=None, trim_zero=None, date_preset=None, date_preset_na=None, time_preset=None,
|
fuzzy_dating=None, trim_zero=None, date_preset=None, date_preset_na=None, time_preset=None,
|
||||||
indexer_timeout=None, rootDir=None, theme_name=None):
|
indexer_timeout=None, rootDir=None, theme_name=None, default_home=None):
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
|
@ -3362,6 +3369,7 @@ class ConfigGeneral(Config):
|
||||||
sickbeard.HANDLE_REVERSE_PROXY = config.checkbox_to_value(handle_reverse_proxy)
|
sickbeard.HANDLE_REVERSE_PROXY = config.checkbox_to_value(handle_reverse_proxy)
|
||||||
|
|
||||||
sickbeard.THEME_NAME = theme_name
|
sickbeard.THEME_NAME = theme_name
|
||||||
|
sickbeard.DEFAULT_HOME = default_home
|
||||||
|
|
||||||
sickbeard.save_config()
|
sickbeard.save_config()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue