Permalink
Browse files

Metadata tweaks and updates

Lots of cleanup to make things a bit more standardized.

Remove Synology metadata since it was just a clone of MB and does not appear to be actually used by synology units.

Add banner, season banner season all poster and season all banner options.

Remove use_banner poster override since now we have a banner option.
  This now means users can have both a poster and banner instead of one or the other (XBMC12+).
  Migrate legacy XBMC poster + use_banner setup to just banner option (keeps old functionality).
  Notice that on XBMC the banner and poster result in the same name,
  if you have both checked it will just create folder.jpg with a poster
  since we don't overwrite existing metadata.
  • Loading branch information...
thezoggy authored and Patrick Vos committed Jan 15, 2014
1 parent ffd907b commit f2962c0d7ff0cd67a66367a94a5629a7c0c5c5c8
View
@@ -33,7 +33,7 @@
# We only need this for compiling an EXE and I will just always do that on 2.6+
if sys.hexversion >= 0x020600F0:
from multiprocessing import freeze_support
from multiprocessing import freeze_support # @UnresolvedImport
import locale
import os
View
@@ -908,14 +908,16 @@ div.metadata-options label {
div.metadata-options label:hover {
color: #fff;
background-color: #57442b;
cursor: pointer;
}
div.metadata-example {
padding: 7px;
padding: 8px;
}
div.metadata-example label {
display: block;
line-height: 21px;
line-height: 20px;
color: #000;
cursor: pointer;
}
div.metadataDiv .disabled {
color: #ccc;
@@ -473,10 +473,14 @@
<div class="metadata-options">
<label for="${cur_id}_show_metadata" class="clearfix"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_show_metadata" #if $cur_metadata_inst.show_metadata then "checked=\"checked\"" else ""#/>&nbsp;Show Metadata</label>
<label for="${cur_id}_episode_metadata" class="clearfix"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_episode_metadata" #if $cur_metadata_inst.episode_metadata then "checked=\"checked\"" else ""#/>&nbsp;Episode Metadata</label>
<label for="${cur_id}_fanart" class="clearfix"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_fanart" #if $cur_metadata_inst.fanart then "checked=\"checked\"" else ""#/>&nbsp;Show Fanart Image</label>
<label for="${cur_id}_poster" class="clearfix"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_poster" #if $cur_metadata_inst.poster then "checked=\"checked\"" else ""#/>&nbsp;Show Folder Image</label>
<label for="${cur_id}_episode_thumbnails" class="clearfix"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_episode_thumbnails" #if $cur_metadata_inst.episode_thumbnails then "checked=\"checked\"" else ""#/>&nbsp;Episode Thumbnail</label>
<label for="${cur_id}_season_thumbnails" class="clearfix"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_season_thumbnails" #if $cur_metadata_inst.season_thumbnails then "checked=\"checked\"" else ""#/>&nbsp;Season Thumbnail</label>
<label for="${cur_id}_fanart" class="clearfix"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_fanart" #if $cur_metadata_inst.fanart then "checked=\"checked\"" else ""#/>&nbsp;Show Fanart</label>
<label for="${cur_id}_poster" class="clearfix"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_poster" #if $cur_metadata_inst.poster then "checked=\"checked\"" else ""#/>&nbsp;Show Poster</label>
<label for="${cur_id}_banner" class="clearfix"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_banner" #if $cur_metadata_inst.banner then "checked=\"checked\"" else ""#/>&nbsp;Show Banner</label>
<label for="${cur_id}_episode_thumbnails" class="clearfix"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_episode_thumbnails" #if $cur_metadata_inst.episode_thumbnails then "checked=\"checked\"" else ""#/>&nbsp;Episode Thumbnails</label>
<label for="${cur_id}_season_posters" class="clearfix"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_season_posters" #if $cur_metadata_inst.season_posters then "checked=\"checked\"" else ""#/>&nbsp;Season Posters</label>
<label for="${cur_id}_season_banners" class="clearfix"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_season_banners" #if $cur_metadata_inst.season_banners then "checked=\"checked\"" else ""#/>&nbsp;Season Banners</label>
<label for="${cur_id}_season_all_poster" class="clearfix"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_season_all_poster" #if $cur_metadata_inst.season_all_poster then "checked=\"checked\"" else ""#/>&nbsp;Season All Poster</label>
<label for="${cur_id}_season_all_banner" class="clearfix"><input type="checkbox" class="float-left metadata_checkbox" id="${cur_id}_season_all_banner" #if $cur_metadata_inst.season_all_banner then "checked=\"checked\"" else ""#/>&nbsp;Season All Banner</label>
</div>
</div>
<div class="metadata-example-wrapper">
@@ -486,23 +490,20 @@
<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}_banner"><span id="${cur_id}_eg_banner">$cur_metadata_inst.eg_banner</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>
<label for="${cur_id}_season_posters"><span id="${cur_id}_eg_season_posters">$cur_metadata_inst.eg_season_posters</span></label>
<label for="${cur_id}_season_banners"><span id="${cur_id}_eg_season_banners">$cur_metadata_inst.eg_season_banners</span></label>
<label for="${cur_id}_season_all_poster"><span id="${cur_id}_eg_season_all_poster">$cur_metadata_inst.eg_season_all_poster</span></label>
<label for="${cur_id}_season_all_banner"><span id="${cur_id}_eg_season_all_banner">$cur_metadata_inst.eg_season_all_banner</span></label>
</div>
</div>
<input type="hidden" name="${cur_id}_data" id="${cur_id}_data" value="$cur_metadata_inst.get_config()" />
</div>
#end for
<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 'Show Folder Image'</span>
</label>
</div>
<div class="clearfix"></div><br/>
<input type="submit" class="btn config_submitter" value="Save Changes" /><br/>
</fieldset>
@@ -208,36 +208,49 @@ $(document).ready(function () {
var episode_metadata = $("#" + generator_name + "_episode_metadata").prop('checked');
var fanart = $("#" + generator_name + "_fanart").prop('checked');
var poster = $("#" + generator_name + "_poster").prop('checked');
var banner = $("#" + generator_name + "_banner").prop('checked');
var episode_thumbnails = $("#" + generator_name + "_episode_thumbnails").prop('checked');
var season_thumbnails = $("#" + generator_name + "_season_thumbnails").prop('checked');
var season_posters = $("#" + generator_name + "_season_posters").prop('checked');
var season_banners = $("#" + generator_name + "_season_banners").prop('checked');
var season_all_poster = $("#" + generator_name + "_season_all_poster").prop('checked');
var season_all_banner = $("#" + generator_name + "_season_all_banner").prop('checked');
config_arr.push(show_metadata ? '1' : '0');
config_arr.push(episode_metadata ? '1' : '0');
config_arr.push(poster ? '1' : '0');
config_arr.push(fanart ? '1' : '0');
config_arr.push(poster ? '1' : '0');
config_arr.push(banner ? '1' : '0');
config_arr.push(episode_thumbnails ? '1' : '0');
config_arr.push(season_thumbnails ? '1' : '0');
config_arr.push(season_posters ? '1' : '0');
config_arr.push(season_banners ? '1' : '0');
config_arr.push(season_all_poster ? '1' : '0');
config_arr.push(season_all_banner ? '1' : '0');
var cur_num = 0;
for (var i = 0; i < config_arr.length; i++)
for (var i = 0; i < config_arr.length; i++) {
cur_num += parseInt(config_arr[i]);
}
if (cur_num > cur_most) {
cur_most = cur_num;
cur_most_provider = generator_name;
}
$("#" + generator_name + "_eg_show_metadata").attr('class', show_metadata ? 'enabled' : 'disabled');
$("#" + generator_name + "_eg_episode_metadata").attr('class', episode_metadata ? 'enabled' : 'disabled');
$("#" + generator_name + "_eg_poster").attr('class', poster ? 'enabled' : 'disabled');
$("#" + generator_name + "_eg_fanart").attr('class', fanart ? 'enabled' : 'disabled');
$("#" + generator_name + "_eg_poster").attr('class', poster ? 'enabled' : 'disabled');
$("#" + generator_name + "_eg_banner").attr('class', banner ? 'enabled' : 'disabled');
$("#" + generator_name + "_eg_episode_thumbnails").attr('class', episode_thumbnails ? 'enabled' : 'disabled');
$("#" + generator_name + "_eg_season_thumbnails").attr('class', season_thumbnails ? 'enabled' : 'disabled');
$("#" + generator_name + "_data").val(config_arr.join('|'))
$("#" + generator_name + "_eg_season_posters").attr('class', season_posters ? 'enabled' : 'disabled');
$("#" + generator_name + "_eg_season_banners").attr('class', season_banners ? 'enabled' : 'disabled');
$("#" + generator_name + "_eg_season_all_poster").attr('class', season_all_poster ? 'enabled' : 'disabled');
$("#" + generator_name + "_eg_season_all_banner").attr('class', season_all_banner ? 'enabled' : 'disabled');
$("#" + generator_name + "_data").val(config_arr.join('|'));
});
if (cur_most_provider != '' && first) {
$('#metadataType option[value=' + cur_most_provider + ']').attr('selected', 'selected')
$('#metadataType option[value=' + cur_most_provider + ']').attr('selected', 'selected');
$(this).showHideMetadata();
}
@@ -262,7 +275,7 @@ $(document).ready(function () {
position: {
viewport: $(window),
at: 'top center',
my: 'bottom center',
my: 'bottom center'
},
style: {
tip: {
@@ -282,7 +295,7 @@ $(document).ready(function () {
position: {
viewport: $(window),
at: 'center left',
my: 'center right',
my: 'center right'
},
style: {
tip: {
Oops, something went wrong.

0 comments on commit f2962c0

Please sign in to comment.