mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-04 15:12:23 -05:00
Merge pull request #1186 from Ulrar/master
Adding a download field for the episodes
This commit is contained in:
commit
9fb34b128c
@ -321,6 +321,18 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="field-pair">
|
||||
<label for="download_url">
|
||||
<span class="component-title">Download url</span>
|
||||
<input type="text" name="download_url" id="download_url" value="$sickbeard.DOWNLOAD_URL" size="35" />
|
||||
</label>
|
||||
<label>
|
||||
<span class="component-title"> </span>
|
||||
<span class="component-desc">URL where the shows can be downloaded.</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="submit" class="btn config_submitter" value="Save Changes" />
|
||||
|
||||
</fieldset>
|
||||
|
@ -6,6 +6,7 @@
|
||||
#from lib import subliminal
|
||||
#import os.path, os
|
||||
#import datetime
|
||||
#import urllib
|
||||
|
||||
#set global $title=$show.name
|
||||
##set global $header = '<a></a>' %
|
||||
@ -376,6 +377,9 @@
|
||||
#end if
|
||||
<th class="col-name">Name</th>
|
||||
<th class="col-airdate">Airdate</th>
|
||||
#if len($sickbeard.DOWNLOAD_URL) > 0
|
||||
<th class="col-ep">Download</th>
|
||||
#end if
|
||||
#if $sickbeard.USE_SUBTITLES and $show.subtitles:
|
||||
<th class="col-subtitles">Subtitles</th>
|
||||
#end if
|
||||
@ -470,6 +474,21 @@
|
||||
<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>
|
||||
|
||||
#if len($sickbeard.DOWNLOAD_URL) > 0 and len($epResult['location']) > 0
|
||||
<td>
|
||||
#set $filename = $epResult['location']
|
||||
#for $rootDir in $sickbeard.ROOT_DIRS.split('|')
|
||||
#if $rootDir.startswith('/')
|
||||
#set $filename = $filename.replace($rootDir, "")
|
||||
#end if
|
||||
#end for
|
||||
#set $filename = $sickbeard.DOWNLOAD_URL + $urllib.quote($filename.encode('utf8'))
|
||||
<center><a href="$filename">Download</a></center>
|
||||
</td>
|
||||
#elif len($sickbeard.DOWNLOAD_URL) > 0
|
||||
<td></td>
|
||||
#end if
|
||||
|
||||
#if $sickbeard.USE_SUBTITLES and $show.subtitles:
|
||||
<td class="col-subtitles" align="center">
|
||||
|
@ -140,6 +140,8 @@ WEB_IPV6 = None
|
||||
|
||||
PLAY_VIDEOS = False
|
||||
|
||||
DOWNLOAD_URL = None
|
||||
|
||||
HANDLE_REVERSE_PROXY = False
|
||||
PROXY_SETTING = None
|
||||
PROXY_INDEXERS = True
|
||||
@ -534,7 +536,7 @@ def initialize(consoleLogging=True):
|
||||
USE_FAILED_DOWNLOADS, DELETE_FAILED, ANON_REDIRECT, LOCALHOST_IP, TMDB_API_KEY, DEBUG, PROXY_SETTING, PROXY_INDEXERS, \
|
||||
AUTOPOSTPROCESSER_FREQUENCY, DEFAULT_AUTOPOSTPROCESSER_FREQUENCY, MIN_AUTOPOSTPROCESSER_FREQUENCY, \
|
||||
ANIME_DEFAULT, NAMING_ANIME, ANIMESUPPORT, USE_ANIDB, ANIDB_USERNAME, ANIDB_PASSWORD, ANIDB_USE_MYLIST, \
|
||||
ANIME_SPLIT_HOME, SCENE_DEFAULT, PLAY_VIDEOS, BACKLOG_DAYS, GIT_ORG, GIT_REPO, GIT_USERNAME, GIT_PASSWORD, \
|
||||
ANIME_SPLIT_HOME, SCENE_DEFAULT, PLAY_VIDEOS, DOWNLOAD_URL, BACKLOG_DAYS, GIT_ORG, GIT_REPO, GIT_USERNAME, GIT_PASSWORD, \
|
||||
GIT_AUTOISSUES, gh
|
||||
|
||||
if __INITIALIZED__:
|
||||
@ -650,6 +652,8 @@ def initialize(consoleLogging=True):
|
||||
|
||||
PLAY_VIDEOS = bool(check_setting_int(CFG, 'General', 'play_videos', 0))
|
||||
|
||||
DOWNLOAD_URL = check_setting_str(CFG, 'General', 'download_url', "")
|
||||
|
||||
LOCALHOST_IP = check_setting_str(CFG, 'General', 'localhost_ip', '')
|
||||
|
||||
CPU_PRESET = check_setting_str(CFG, 'General', 'cpu_preset', 'NORMAL')
|
||||
@ -1450,6 +1454,7 @@ def save_config():
|
||||
new_config['General']['web_username'] = WEB_USERNAME
|
||||
new_config['General']['web_password'] = helpers.encrypt(WEB_PASSWORD, ENCRYPTION_VERSION)
|
||||
new_config['General']['play_videos'] = int(PLAY_VIDEOS)
|
||||
new_config['General']['download_url'] = DOWNLOAD_URL
|
||||
new_config['General']['localhost_ip'] = LOCALHOST_IP
|
||||
new_config['General']['cpu_preset'] = CPU_PRESET
|
||||
new_config['General']['anon_redirect'] = ANON_REDIRECT
|
||||
|
@ -3451,13 +3451,14 @@ class ConfigGeneral(Config):
|
||||
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,
|
||||
indexer_timeout=None, play_videos=None, rootDir=None, theme_name=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):
|
||||
|
||||
results = []
|
||||
|
||||
# Misc
|
||||
sickbeard.PLAY_VIDEOS = config.checkbox_to_value(play_videos)
|
||||
sickbeard.DOWNLOAD_URL = download_url
|
||||
sickbeard.LAUNCH_BROWSER = config.checkbox_to_value(launch_browser)
|
||||
config.change_VERSION_NOTIFY(config.checkbox_to_value(version_notify))
|
||||
sickbeard.AUTO_UPDATE = config.checkbox_to_value(auto_update)
|
||||
|
Loading…
Reference in New Issue
Block a user