mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-05 17:05:03 -05:00
Added option to display file sizes in Show page
- Added option checkbox under General -> GUI (display filesizes) - Added filesize column on Show Page to display filesize when episode is Downloaded - Changed style min-width for Episode Name when display_filesize = True to keep episode names from wrapping around earlier on mobile devices. (min-width: 190px)
This commit is contained in:
parent
91cb8d885c
commit
9c635f81ff
@ -244,7 +244,15 @@
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="field-pair">
|
||||
<label for="display_filesize">
|
||||
<span class="component-title">Display Filesizes</span>
|
||||
<span class="component-desc">
|
||||
<input type="checkbox" name="display_filesize" id="display_filesize" #if $sickbeard.DISPLAY_FILESIZE == True then 'checked="checked"' else ''#/>
|
||||
<p>display filesizes for downloaded episodes on show page</p>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="field-pair">
|
||||
<label for="fuzzy_dating">
|
||||
<span class="component-title">Display fuzzy dates</span>
|
||||
|
@ -375,7 +375,14 @@
|
||||
#if $scene_anime:
|
||||
<th class="col-ep">Scene Absolute</th>
|
||||
#end if
|
||||
<th class="col-name">Name</th>
|
||||
<th class="col-name"
|
||||
#if ($sickbeard.DISPLAY_FILESIZE == True):
|
||||
style="min-width: 190px"
|
||||
#end if
|
||||
>>Name</th>
|
||||
#if ($sickbeard.DISPLAY_FILESIZE == True):
|
||||
<th class="col-ep">Filesize</th>
|
||||
#end if
|
||||
<th class="col-airdate">Airdate</th>
|
||||
#if len($sickbeard.DOWNLOAD_URL) > 0
|
||||
<th class="col-ep">Download</th>
|
||||
@ -471,6 +478,14 @@
|
||||
$epResult["name"]
|
||||
</td>
|
||||
|
||||
#if ($sickbeard.DISPLAY_FILESIZE == True):
|
||||
<td class="col-ep">
|
||||
#if $epResult["file_size"]:
|
||||
#set $file_size = $epResult["file_size"] / 1024 / 1024
|
||||
$file_size MB
|
||||
#end if
|
||||
</td>
|
||||
#end if
|
||||
<td class="col-airdate">
|
||||
<span class="${fuzzydate}">#if int($epResult['airdate']) == 1 then 'never' else $sbdatetime.sbdatetime.sbfdate($sbdatetime.sbdatetime.convert_to_setting($network_timezones.parse_date_time($epResult['airdate'],$show.airs,$show.network)))#</span>
|
||||
</td>
|
||||
|
@ -451,6 +451,7 @@ COMING_EPS_LAYOUT = None
|
||||
COMING_EPS_DISPLAY_PAUSED = False
|
||||
COMING_EPS_SORT = None
|
||||
COMING_EPS_MISSED_RANGE = None
|
||||
DISPLAY_FILESIZE = False
|
||||
FUZZY_DATING = False
|
||||
TRIM_ZERO = False
|
||||
DATE_PRESET = None
|
||||
@ -529,7 +530,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_LISTVIEW, METADATA_KODI, METADATA_KODI_12PLUS, METADATA_MEDIABROWSER, METADATA_PS3, metadata_provider_dict, \
|
||||
NEWZBIN, NEWZBIN_USERNAME, NEWZBIN_PASSWORD, GIT_PATH, MOVE_ASSOCIATED_FILES, POSTPONE_IF_SYNC_FILES, dailySearchScheduler, NFO_RENAME, \
|
||||
GUI_NAME, HOME_LAYOUT, HISTORY_LAYOUT, DISPLAY_SHOW_SPECIALS, COMING_EPS_LAYOUT, COMING_EPS_SORT, COMING_EPS_DISPLAY_PAUSED, COMING_EPS_MISSED_RANGE, FUZZY_DATING, TRIM_ZERO, DATE_PRESET, TIME_PRESET, TIME_PRESET_W_SECONDS, THEME_NAME, \
|
||||
GUI_NAME, HOME_LAYOUT, HISTORY_LAYOUT, DISPLAY_SHOW_SPECIALS, COMING_EPS_LAYOUT, COMING_EPS_SORT, COMING_EPS_DISPLAY_PAUSED, COMING_EPS_MISSED_RANGE, DISPLAY_FILESIZE, FUZZY_DATING, TRIM_ZERO, DATE_PRESET, TIME_PRESET, TIME_PRESET_W_SECONDS, THEME_NAME, \
|
||||
POSTER_SORTBY, POSTER_SORTDIR, \
|
||||
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, SUBTITLES_MULTI, subtitlesFinderScheduler, \
|
||||
@ -1016,6 +1017,7 @@ def initialize(consoleLogging=True):
|
||||
COMING_EPS_DISPLAY_PAUSED = bool(check_setting_int(CFG, 'GUI', 'coming_eps_display_paused', 0))
|
||||
COMING_EPS_SORT = check_setting_str(CFG, 'GUI', 'coming_eps_sort', 'date')
|
||||
COMING_EPS_MISSED_RANGE = check_setting_int(CFG, 'GUI', 'coming_eps_missed_range', 7)
|
||||
DISPLAY_FILESIZE = bool(check_setting_int(CFG, 'GUI', 'display_filesize', 0))
|
||||
FUZZY_DATING = bool(check_setting_int(CFG, 'GUI', 'fuzzy_dating', 0))
|
||||
TRIM_ZERO = bool(check_setting_int(CFG, 'GUI', 'trim_zero', 0))
|
||||
DATE_PRESET = check_setting_str(CFG, 'GUI', 'date_preset', '%x')
|
||||
@ -1853,6 +1855,7 @@ def save_config():
|
||||
new_config['GUI']['coming_eps_display_paused'] = int(COMING_EPS_DISPLAY_PAUSED)
|
||||
new_config['GUI']['coming_eps_sort'] = COMING_EPS_SORT
|
||||
new_config['GUI']['coming_eps_missed_range'] = int(COMING_EPS_MISSED_RANGE)
|
||||
new_config['GUI']['display_filesize'] = int(DISPLAY_FILESIZE)
|
||||
new_config['GUI']['fuzzy_dating'] = int(FUZZY_DATING)
|
||||
new_config['GUI']['trim_zero'] = int(TRIM_ZERO)
|
||||
new_config['GUI']['date_preset'] = DATE_PRESET
|
||||
|
@ -3450,7 +3450,7 @@ class ConfigGeneral(Config):
|
||||
handle_reverse_proxy=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,
|
||||
fuzzy_dating=None, trim_zero=None, date_preset=None, date_preset_na=None, time_preset=None,
|
||||
display_filesize=None, fuzzy_dating=None, trim_zero=None, date_preset=None, date_preset_na=None, time_preset=None,
|
||||
indexer_timeout=None, play_videos=None, download_url=None, rootDir=None, theme_name=None,
|
||||
git_reset=None, git_username=None, git_password=None, git_autoissues=None):
|
||||
|
||||
@ -3492,6 +3492,7 @@ class ConfigGeneral(Config):
|
||||
sickbeard.WEB_USERNAME = web_username
|
||||
sickbeard.WEB_PASSWORD = web_password
|
||||
|
||||
sickbeard.DISPLAY_FILESIZE = config.checkbox_to_value(display_filesize)
|
||||
sickbeard.FUZZY_DATING = config.checkbox_to_value(fuzzy_dating)
|
||||
sickbeard.TRIM_ZERO = config.checkbox_to_value(trim_zero)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user