/
config_postProcessing.tmpl
302 lines (258 loc) · 19.2 KB
/
config_postProcessing.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
#import os.path
#import sickbeard
#from sickbeard.common import *
#from sickbeard import config
#from sickbeard import metadata
#from sickbeard.metadata.generic import GenericMetadata
#set global $title = "Config - Post Processing"
#set global $header = "Post Processing Configuration"
#set global $sbPath="../.."
#set global $topmenu="config"#
#include $os.path.join($sickbeard.PROG_DIR, "data/interfaces/default/inc_top.tmpl")
<script type="text/javascript" src="$sbRoot/js/configPostProcessing.js"></script>
<div id="config">
<div id="config-content">
<h5>All non-absolute folder locations are relative to " <span class="path">$sickbeard.DATA_DIR</span> "</h5>
<form action="savePostProcessing" method="post">
<div id="config-components">
<div id="core-component-group3" class="component-group clearfix">
<div class="component-group-desc">
<h3>Post-Processing</h3>
<p>Settings that dictate how Sick Beard should process completed downloads.</p>
</div>
<fieldset class="component-group-list">
<div class="field-pair">
<label class="nocheck clearfix" for="tv_download_dir">
<span class="component-title">TV Download Dir</span>
<input type="text" name="tv_download_dir" id="tv_download_dir" value="$sickbeard.TV_DOWNLOAD_DIR" size="45" />
</label>
<label class="nocheck clearfix">
<span class="component-title"> </span>
<span class="component-desc">The folder where your download client puts your TV downloads.</span>
</label>
<label class="nocheck clearfix">
<span class="component-title"> </span>
<span class="component-desc"><b>NOTE:</b> Use only if not using SABnzbd+ post processing.</span>
</label>
<label class="nocheck clearfix">
<span class="component-title"> </span>
<span class="component-desc">Or if SABnzbd+ and Sick Beard are on different PCs.</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="keep_processed_dir" id="keep_processed_dir" #if $sickbeard.KEEP_PROCESSED_DIR == True then "checked=\"checked\"" else ""# />
<label class="clearfix" for="keep_processed_dir">
<span class="component-title">Keep Original Files</span>
<span class="component-desc">Keep original files after they've been processed?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="move_associated_files" id="move_associated_files" #if $sickbeard.MOVE_ASSOCIATED_FILES == True then "checked=\"checked\"" else ""# />
<label class="clearfix" for="move_associated_files">
<span class="component-title">Move Associated Files</span>
<span class="component-desc">Move srr/srt/sfv/etc files with the episode when processed?</span>
</label>
<label class="nocheck clearfix" for="move_associated_files">
<span class="component-title"> </span>
<span class="component-desc"><b>NOTE:</b> <i>.nfo</i> will be renamed to <i>.nfo-orig</i> when moved.</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="rename_episodes" id="rename_episodes" #if $sickbeard.RENAME_EPISODES == True then "checked=\"checked\"" else ""# />
<label class="clearfix" for="rename_episodes">
<span class="component-title">Rename Episodes</span>
<span class="component-desc">Rename episode using the naming settings in <a href="$sbRoot/config/general">General</a>?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="process_automatically" id="process_automatically" #if $sickbeard.PROCESS_AUTOMATICALLY == True then "checked=\"checked\"" else ""# />
<label class="clearfix" for="process_automatically">
<span class="component-title">Scan and Process</span>
<span class="component-desc">Scan and post-process any files in your <i>TV Download Dir</i>?</span>
</label>
<label class="nocheck clearfix" for="process_automatically">
<span class="component-title"> </span>
<span class="component-desc"><b>NOTE:</b> Do not use if you use sabToSickbeard w/ SABnzbd+!</span>
</label>
</div>
<div class="clearfix"></div>
<input type="submit" value="Save Changes" /><br/>
</fieldset>
</div><!-- /component-group3 //-->
<div id="core-component-group2" class="component-group clearfix">
<div class="component-group-desc">
<h3>Metadata</h3>
<p>The data associated to the data. These are files associated to a TV show in the form of images and text that, when supported, will enhance the viewing experience.</p>
</div>
<fieldset class="component-group-list">
<div class="field-pair">
<label class="clearfix">
<span class="component-title jumbo">Metadata Type:</span>
<span class="component-desc">
#set $m_dict = $metadata.get_metadata_generator_dict()
<select id="metadataType">
#for ($cur_name, $cur_generator) in $m_dict.items():
<option value="$GenericMetadata.makeID($cur_name)">$cur_name</option>
#end for
</select>
</span>
</label>
<span>Toggle the metadata options that you wish to be created. <b>Multiple targets may be used.</b></span>
</div>
<div id="metadataLegend">
<div style="width: 190px; float: left;">Create:</div>
<div style="width: 260px; float: left;">Results:</div>
</div>
<div class="clearfix"></div>
#for ($cur_name, $cur_generator) in $m_dict.items():
#set $cur_metadata_inst = $sickbeard.metadata_provider_dict[$cur_generator.name]
#set $cur_id = $GenericMetadata.makeID($cur_name)
<div class="metadataDiv" id="$cur_id">
<div class="metadata_options">
<label for="${cur_id}_show_metadata"><input type="checkbox" class="metadata_checkbox" id="${cur_id}_show_metadata" #if $cur_metadata_inst.show_metadata then "checked=\"checked\"" else ""#/> Show Metadata</label>
<label for="${cur_id}_episode_metadata"><input type="checkbox" class="metadata_checkbox" id="${cur_id}_episode_metadata" #if $cur_metadata_inst.episode_metadata then "checked=\"checked\"" else ""#/> Episode Metadata</label>
<label for="${cur_id}_fanart"><input type="checkbox" class="metadata_checkbox" id="${cur_id}_fanart" #if $cur_metadata_inst.fanart then "checked=\"checked\"" else ""#/> Show Fanart Image</label>
<label for="${cur_id}_poster"><input type="checkbox" class="metadata_checkbox" id="${cur_id}_poster" #if $cur_metadata_inst.poster then "checked=\"checked\"" else ""#/> Show Folder Image</label>
<label for="${cur_id}_episode_thumbnails"><input type="checkbox" class="metadata_checkbox" id="${cur_id}_episode_thumbnails" #if $cur_metadata_inst.episode_thumbnails then "checked=\"checked\"" else ""#/> Episode Thumbnail</label>
<label for="${cur_id}_season_thumbnails"><input type="checkbox" class="metadata_checkbox" id="${cur_id}_season_thumbnails" #if $cur_metadata_inst.season_thumbnails then "checked=\"checked\"" else ""#/> Season Thumbnail</label>
</div>
<div class="metadata_example">
<label for="${cur_id}_show_metadata"><span id="${cur_id}_eg_show_metadata">$cur_metadata_inst.eg_show_metadata</span></label>
<label for="${cur_id}_episode_metadata"><span id="${cur_id}_eg_episode_metadata">$cur_metadata_inst.eg_episode_metadata</span></label>
<label for="${cur_id}_fanart"><span id="${cur_id}_eg_fanart">$cur_metadata_inst.eg_fanart</span></label>
<label for="${cur_id}_poster"><span id="${cur_id}_eg_poster">$cur_metadata_inst.eg_poster</span></label>
<label for="${cur_id}_episode_thumbnails"><span id="${cur_id}_eg_episode_thumbnails">$cur_metadata_inst.eg_episode_thumbnails</span></label>
<label for="${cur_id}_season_thumbnails"><span id="${cur_id}_eg_season_thumbnails">$cur_metadata_inst.eg_season_thumbnails</span></label>
</div>
<input type="hidden" name="${cur_id}_data" id="${cur_id}_data" value="$cur_metadata_inst.get_config()" />
</div>
#end for
<div class="clearfix" style="clear:left;"></div>
<div class="field-pair clearfix">
<input type="checkbox" name="use_banner" id="use_banner" #if $sickbeard.USE_BANNER then "checked=checked" else ""#/>
<label class="clearfix" for="use_banner">
<span class="component-title">Use Banners</span>
<span class="component-desc">Use banners instead of posters for your Show Folder Images</span>
</label>
</div>
<input type="submit" value="Save Changes" /><br/>
</fieldset>
</div><!-- /component-group2 //-->
<div id="core-component-group4" class="component-group clearfix">
<div class="component-group-desc">
<h3>Episode Naming</h3>
<p>If post-processing 'Rename episodes' is enabled then use these settings.</p>
</div>
#set $naming_ep_type_text = ("1x02", "s01e02", "S01E02")
#set $naming_multi_ep_type_text = ("extend", "duplicate", "repeat")
<fieldset class="component-group-list">
<div class="field-pair">
<input type="checkbox" name="naming_show_name" id="naming_show_name" #if $sickbeard.NAMING_SHOW_NAME then "checked=\"checked\"" else ""#/>
<label class="clearfix" for="naming_show_name">
<span class="component-title">Show Name</span>
<span class="component-desc">Include the TV show's name when renaming the file?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="naming_ep_name" id="naming_ep_name" #if $sickbeard.NAMING_EP_NAME then "checked=\"checked\"" else ""#/>
<label class="clearfix" for="naming_ep_name">
<span class="component-title">Episode Name</span>
<span class="component-desc">Include the TV show's episode title when renaming the file?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="naming_use_periods" id="naming_use_periods" #if $sickbeard.NAMING_USE_PERIODS then "checked=\"checked\"" else ""#/>
<label class="clearfix" for="naming_use_periods">
<span class="component-title">Use Periods</span>
<span class="component-desc">Replace the spaces with periods in the filename instead?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="naming_quality" id="naming_quality" #if $sickbeard.NAMING_QUALITY then "checked=\"checked\"" else ""#/>
<label class="clearfix" for="naming_quality">
<span class="component-title">Quality</span>
<span class="component-desc">Append the show quality to the end of the filename?</span>
</label>
</div>
<div class="field-pair">
<input type="checkbox" name="naming_dates" id="naming_dates" #if $sickbeard.NAMING_DATES then "checked=\"checked\"" else ""#/>
<label class="clearfix" for="naming_dates">
<span class="component-title">Air-By-Date Format</span>
<span class="component-desc">Use the date instead of the season/episode format?</span>
</label>
<label class="nocheck clearfix">
<span class="component-title"> </span>
<span class="component-desc">Only applies to air-by-date shows. (eg. 2010-02-15 vs S12E23)</span>
</label>
</div>
<div class="field-pair">
<label class="nocheck clearfix" for="naming_sep_type">
<span class="component-title">Separator Style</span>
<span class="component-desc">
<select name="naming_sep_type" id="naming_sep_type">
#for ($i, $ex) in enumerate($config.naming_sep_type_text):
<option value="$i" #if $i == int($sickbeard.NAMING_SEP_TYPE) then "selected=\"selected\"" else ""#>$ex</option>
#end for
</select>
</span>
</label>
</div>
<div class="field-pair">
<label class="nocheck clearfix" for="naming_ep_type">
<span class="component-title">Number Style</span>
<span class="component-desc">
<select name="naming_ep_type" id="naming_ep_type">
#for ($i, $ex) in enumerate($config.naming_ep_type_text):
<option value="$i" #if $i == int($sickbeard.NAMING_EP_TYPE) then "selected=\"selected\"" else ""#>$ex</option>
#end for
</select>
</span>
</label>
</div>
<div class="field-pair" style="padding:10px; background: #efefef;">
<label class="clearfix" for="naming_ep_type">
<span class="component-title jumbo">Single-Ep Example:</span>
<span class="component-desc jumbo" id="normalExampleText"></span>
</label>
</div>
<div class="field-pair">
<label class="nocheck clearfix" for="naming_multi_ep_type">
<span class="component-title">Multi-episode Style</span>
<span class="component-desc">
<select name="naming_multi_ep_type" id="naming_multi_ep_type">
#for ($i, $ex) in enumerate($config.naming_multi_ep_type_text):
<option value="$i" #if $i == int($sickbeard.NAMING_MULTI_EP_TYPE) then "selected=\"selected\"" else ""#>$ex</option>
#end for
</select>
</span>
</label>
</div>
<div class="field-pair" style="padding:10px; background: #efefef;">
<label class="clearfix" for="naming_multi_ep_type">
<span class="component-title jumbo">Multi-Ep Example:</span>
<span class="component-desc jumbo" id="multiExampleText"></span>
</label>
</div>
<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">Season Folder Format</span>
<input type="text" id="season_folders_format" name="season_folders_format" value="$sickbeard.SEASON_FOLDERS_FORMAT" size="15" />
</label>
<label class="nocheck clearfix">
<span class="component-title"> </span>
<span class="component-desc">Format to use when creating season folders.</span>
</label>
<label class="nocheck clearfix">
<span class="component-title"> </span>
<span class="component-desc">(eg. 'Season %0d' or 'season%02d')</span>
</label>
</div>
<input type="submit" value="Save Changes" />
</fieldset>
</div><!-- /component-group4 //-->
<br/><input type="submit" value="Save Changes" /><br/>
</div><!-- /config-components -->
</form>
</div></div>
<div class="clearfix"></div>
#include $os.path.join($sickbeard.PROG_DIR, "data/interfaces/default/inc_bottom.tmpl")