@ -318,6 +318,45 @@
< label > Tries to make subtitles that are completely uppercase readable.< / label >
< / div >
< / div >
< div class = "row" >
< div class = "col-sm-3 text-right" >
< b > Color< / b >
< / div >
< div class = "form-group col-sm-8" >
< label class = "custom-control custom-checkbox" >
< input type = "checkbox" class = "custom-control-input subzero_mods" id = "subzero_color" >
< span class = "custom-control-label" > < / span >
< / label >
< label > Adds color to your subtitles (for playback devices/software that don't ship their own color modes; only works for players that support color tags).< / label >
< / div >
< / div >
< div id = "subzero_color_div" >
< div class = "row" >
< div class = "col-sm-4 text-right" >
< b > Color Name< / b >
< / div >
< div class = "form-group col-sm-5" >
< select class = "form-control selectpicker" id = "subzero_color_name" >
< option value = "white" > White< / option >
< option value = "light-grey" > Light Grey< / option >
< option value = "red" > Red< / option >
< option value = "green" > Green< / option >
< option value = "yellow" > Yellow< / option >
< option value = "blue" > Blue< / option >
< option value = "magenta" > Magenta< / option >
< option value = "cyan" > Cyan< / option >
< option value = "black" > Black< / option >
< option value = "dark-red" > Dark Red< / option >
< option value = "dark-green" > Dark Green< / option >
< option value = "dark-yellow" > Dark Yellow< / option >
< option value = "dark-blue" > Dark Blue< / option >
< option value = "dark-magenta" > Dark Magenta< / option >
< option value = "dark-cyan" > Dark Cyan< / option >
< option value = "dark-grey" > Dark Grey< / option >
< / select >
< / div >
< / div >
< / div >
< div class = "row" >
< div class = "col-sm-3 text-right" >
< b > Reverse RTL< / b >
@ -577,6 +616,14 @@
}
});
$('#subzero_color').on('change', function () {
if ($(this).prop('checked')) {
$('#subzero_color_div').show();
} else {
$('#subzero_color_div').hide();
}
});
$('#settings-general-chmod_enabled').on('change', function () {
if ($(this).prop('checked')) {
$('#chmod_div').show();
@ -626,6 +673,14 @@
$('.subzero_mods').prop('checked', false).trigger('change');
{% if settings.general.subzero_mods %}
$('{{settings.general.subzero_mods}}'.split(',')).each( function(i, item) {
if (item.startsWith('color'))
{
var color_name = 'white';
var m = item.match(/color\(name=(.*)\)/);
if (m != null & & m.length > 1) color_name = m[1];
$('#subzero_color_name').val(color_name).trigger('change');
item = 'subzero_color';
}
$("[id=" + item + "]").prop('checked', true).trigger('change');
})
{% endif %}
@ -635,7 +690,11 @@
var enabled_subzero_mods = $(".subzero_mods").map(function () {
if ($(this).prop('checked')) {
return $(this).attr('id');
if ($(this).attr('id') == 'subzero_color')
{
return 'color(name=' + $('#subzero_color_name').val() + ')';
}
else return $(this).attr('id');
}
}).get().join(',');
formdata.append('settings-general-subzero_mods', enabled_subzero_mods)