@ -40,7 +40,7 @@
< / head >
< body >
< div id = ' loader ' class = " ui page dimmer " >
< div id = " loader_text " class = " ui indeterminate text loader " > Loading . . . < / div >
< div id = " loader_text " class = " ui indeterminate text loader " > Saving settings . . . < / div >
< / div >
% include ( ' menu.tpl ' )
@ -780,6 +780,26 @@
< / div >
< / div >
< / div >
< div class = " middle aligned row " >
< div class = " right aligned four wide column " >
< label > Download only monitored < / label >
< / div >
< div class = " one wide column " >
< div id = " settings_only_monitored_sonarr " class = " ui toggle checkbox " data - monitored = { { settings . sonarr . getboolean ( ' only_monitored ' ) } } >
< input name = " settings_sonarr_only_monitored " type = " checkbox " >
< label > < / label >
< / div >
< / div >
< div class = " collapsed column " >
< div class = " collapsed center aligned column " >
< div class = " ui basic icon " data - tooltip = " Automatic download of subtitles will happen only for monitored episodes in Sonarr. " data - inverted = " " >
< i class = " help circle large icon " > < / i >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
@ -906,6 +926,26 @@
< / div >
< / div >
< / div >
< div class = " middle aligned row " >
< div class = " right aligned four wide column " >
< label > Download only monitored < / label >
< / div >
< div class = " one wide column " >
< div id = " settings_only_monitored_radarr " class = " ui toggle checkbox " data - monitored = { { settings . radarr . getboolean ( ' only_monitored ' ) } } >
< input name = " settings_radarr_only_monitored " type = " checkbox " >
< label > < / label >
< / div >
< / div >
< div class = " collapsed column " >
< div class = " collapsed center aligned column " >
< div class = " ui basic icon " data - tooltip = " Automatic download of subtitles will happen only for monitored movies in Radarr. " data - inverted = " " >
< i class = " help circle large icon " > < / i >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
@ -1020,128 +1060,219 @@
< div class = " middle aligned row " >
< div class = " right aligned four wide column " >
< label > Download only monitored < / label >
< label > Adaptive searching < / label >
< / div >
< div class = " one wide column " >
< div id = " settings_ only_monitored " class = " ui toggle checkbox " data - monitored = { { settings . general . getboolean ( ' only_monitored ' ) } } >
< input name = " settings_general_ only_monitored " type = " checkbox " >
< div id = " settings_ adaptive_searching " class = " ui toggle checkbox " data - adaptive = { { settings . general . getboolean ( ' adaptive_searching ' ) } } >
< input name = " settings_general_ adaptive_searching " type = " checkbox " >
< label > < / label >
< / div >
< / div >
< div class = " collapsed column " >
< div class = " collapsed center aligned column " >
< div class = " ui basic icon " data - tooltip = " Automatic download of subtitles will happen only for monitored episodes/movies in Sonarr/Radarr ." data - inverted = " " >
< div class = " ui basic icon " data - tooltip = " When searching for subtitles, Bazarr will search less frequently after sometime to limit call to providers ." data - inverted = " " >
< i class = " help circle large icon " > < / i >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< div class = " ui dividing header " > Subtitles providers < / div >
< div class = " twelve wide column " >
< div class = " ui grid " >
< div class = " middle aligned row " >
< div class = " right aligned four wide column " >
< label > Adaptive searching < / label >
< label > Ad dic7ed < / label >
< / div >
< div class = " one wide column " >
< div id = " settings_adaptive_searching" class = " ui toggle checkbox " data - adaptive = { { settings . general . getboolean ( ' adaptive_searching ' ) } } >
< input name = " settings_general_adaptive_searching " type = " checkbox " >
< div id = " addic7ed" class = " ui toggle checkbox provider " >
< input type = " checkbox " >
< label > < / label >
< / div >
< / div >
< div class = " collapsed column " >
< div class = " collapsed center aligned column " >
< div class = " ui basic icon " data - tooltip = " When searching for subtitles, Bazarr will search less frequently after sometime to limit call to providers. " data - inverted = " " >
< i class = " help circle large icon " > < / i >
< / div >
< div id = " addic7ed_option " class = " ui grid container " >
< div class = " middle aligned row " >
< div class = " right aligned six wide column " >
< label > Username < / label >
< / div >
< div class = " six wide column " >
< div class = " ui fluid input " >
< input name = " settings_addic7ed_username " type = " text " value = " {{ settings.addic7ed.username if settings.addic7ed.username != None else ' ' }} " >
< / div >
< / div >
< / div >
< div class = " middle aligned row " >
< div class = " right aligned six wide column " >
< label > Password < / label >
< / div >
< div class = " ui dividing header " > Subtitles providers < / div >
< div class = " twelve wide column " >
< div class = " ui grid " >
< div class = " six wide column " >
< div class = " ui fluid input " >
< input name = " settings_addic7ed_password " type = " password " value = " {{ settings.addic7ed.password if settings.addic7ed.password != None else ' ' }} " >
< / div >
< / div >
< / div >
< / div >
< div class = " middle aligned row " >
< div class = " right aligned four wide column " >
< label > Enabled providers < / label >
< label > LegendasTV < / label >
< / div >
< div class = " eleven wide column " >
< div class = ' field ' >
< select name = " settings_subliminal_providers " id = " settings_providers " multiple = " " class = " ui fluid search selection dropdown " >
< option value = " " > Providers < / option >
% enabled_providers = [ ]
% providers = settings . general . enabled_providers . lower ( ) . split ( ' , ' )
% for provider in settings_providers :
< option value = " {{ provider}} " > { { provider } } < / option >
% end
% for provider in providers :
% enabled_providers . append ( str ( provider ) )
% end
< / select >
< div class = " one wide column " >
< div id = " legendastv " class = " ui toggle checkbox provider " >
< input type = " checkbox " >
< label > < / label >
< / div >
< / div >
< / div >
< div id = " legendastv_option " class = " ui grid container " >
< div class = " middle aligned row " >
< div class = " right aligned six wide column " >
< label > Username < / label >
< / div >
< div class = " six wide column " >
< div class = " ui fluid input " >
< input name = " settings_legendastv_username " type = " text " value = " {{ settings.legendastv.username if settings.legendastv.username != None else ' ' }} " >
< / div >
< / div >
< / div >
< div class = " ui dividing header " > Providers settings ( optional ) < / div >
< div class = " twelve wide column " >
< div class = " ui grid " >
< div class = " middle aligned row " >
< div class = " right aligned four wide column " >
< div class = " right aligned six wide column " >
< label > Password < / label >
< / div >
< div class = " six wide column " >
< div class = " ui fluid input " >
< input name = " settings_legendastv_password " type = " password " value = " {{ settings.legendastv.password if settings.legendastv.password != None else ' ' }} " >
< / div >
< / div >
< / div >
< / div >
< div class = " middle aligned row " >
< div class = " right aligned four wide column " >
< label > OpenSubtitles < / label >
< / div >
< div class = " five wide column " >
< div class = " one wide column " >
< div id = " opensubtitles " class = " ui toggle checkbox provider " >
< input type = " checkbox " >
< label > < / label >
< / div >
< / div >
< / div >
< div id = " opensubtitles_option " class = " ui grid container " >
< div class = " middle aligned row " >
< div class = " right aligned six wide column " >
< label > Username < / label >
< / div >
< div class = " six wide column " >
< div class = " ui fluid input " >
< h4 class = " ui header " > Username < / h4 >
< input name = " settings_opensubtitles_username " type = " text " value = " {{ settings.opensubtitles.username if settings.opensubtitles.username != None else ' ' }} " >
< / div >
< / div >
< div class = " five wide column " >
< / div >
< div class = " middle aligned row " >
< div class = " right aligned six wide column " >
< label > Password < / label >
< / div >
< div class = " six wide column " >
< div class = " ui fluid input " >
< h4 class = " ui header " > Password ( stored in clear text ) < / h4 >
< input name = " settings_opensubtitles_password " type = " password " value = " {{ settings.opensubtitles.password if settings.opensubtitles.password != None else ' ' }} " >
< / div >
< / div >
< / div >
< / div >
< div class = " middle aligned row " >
< div class = " right aligned four wide column " >
< label > addic7ed < / label >
< label > Podnapisi < / label >
< / div >
< div class = " five wide column " >
< div class = " ui fluid input " >
< input name = " settings_addic7ed_username " type = " text " value = " {{ settings.addic7ed.username if settings.addic7ed.username != None else ' ' }} " >
< div class = " one wide column " >
< div id = " podnapisi " class = " ui toggle checkbox provider " >
< input type = " checkbox " >
< label > < / label >
< / div >
< / div >
< div class = " five wide column " >
< div class = " ui fluid input " >
< input name = " settings_addic7ed_password " type = " password " value = " {{ settings.addic7ed.password if settings.addic7ed.password != None else ' ' }} " >
< / div >
< div id = " podnapisi_option " class = " ui grid container " >
< / div >
< div class = " middle aligned row " >
< div class = " right aligned four wide column " >
< label > Shooter < / label >
< / div >
< div class = " one wide column " >
< div id = " shooter " class = " ui toggle checkbox provider " >
< input type = " checkbox " >
< label > < / label >
< / div >
< / div >
< / div >
< div id = " shooter_option " class = " ui grid container " >
< / div >
< div class = " middle aligned row " >
< div class = " right aligned four wide column " >
< label > legendastv < / label >
< label > Subscenter < / label >
< / div >
< div class = " five wide column " >
< div class = " ui fluid input " >
< input name = " settings_legendastv_username " type = " text " value = " {{ settings.legendastv.username if settings.legendastv.username != None else ' ' }} " >
< div class = " one wide column " >
< div id = " subscenter " class = " ui toggle checkbox provider " >
< input type = " checkbox " >
< label > < / label >
< / div >
< / div >
< div class = " five wide column " >
< div class = " ui fluid input " >
< input name = " settings_legendastv_password " type = " password " value = " {{ settings.legendastv.password if settings.legendastv.password != None else ' ' }} " >
< / div >
< div id = " subcenter_option " class = " ui grid container " >
< / div >
< div class = " middle aligned row " >
< div class = " right aligned four wide column " >
< label > TheSubDB < / label >
< / div >
< div class = " one wide column " >
< div id = " thesubdb " class = " ui toggle checkbox provider " >
< input type = " checkbox " >
< label > < / label >
< / div >
< / div >
< / div >
< div id = " thesubdb_option " class = " ui grid container " >
< / div >
< div class = " middle aligned row " >
< div class = " right aligned four wide column " >
< label > opensubtitles < / label >
< label > TVS ubtitles< / label >
< / div >
< div class = " five wide column " >
< div class = " ui fluid input " >
< input name = " settings_opensubtitles_username " type = " text " value = " {{ settings.opensubtitles.username if settings.opensubtitles.username != None else ' ' }} " >
< div class = " one wide column " >
< div id = " tvsubtitles " class = " ui toggle checkbox provider " >
< input type = " checkbox " >
< label > < / label >
< / div >
< / div >
< div class = " five wide column " >
< div class = " ui fluid input " >
< input name = " settings_opensubtitles_password " type = " password " value = " {{ settings.opensubtitles.password if settings.opensubtitles.password != None else ' ' }} " >
< / div >
< div id = " tvsubtitles_option " class = " ui grid container " >
< / div >
< div class = " middle aligned row " >
< div class = " eleven wide column " >
< div class = ' field ' hidden >
< select name = " settings_subliminal_providers " id = " settings_providers " multiple = " " class = " ui fluid search selection dropdown " >
< option value = " " > Providers < / option >
% enabled_providers = [ ]
% providers = settings . general . enabled_providers . lower ( ) . split ( ' , ' )
% for provider in settings_providers :
< option value = " {{ provider}} " > { { provider } } < / option >
% end
% for provider in providers :
% enabled_providers . append ( str ( provider ) )
% end
< / select >
< / div >
< / div >
< / div >
@ -1348,6 +1479,33 @@
< script >
function getQueryVariable ( variable )
{
var query = window . location . search . substring ( 1 ) ;
var vars = query . split ( " & " ) ;
for ( var i = 0 ; i < vars . length ; i + + ) {
var pair = vars [ i ] . split ( " = " ) ;
if ( pair [ 0 ] == variable ) { return pair [ 1 ] ; }
}
return ( false ) ;
}
if ( getQueryVariable ( " saved " ) == ' true ' ) {
new Noty ( {
text : ' Settings saved. ' ,
timeout : 5000 ,
progressBar : false ,
animation : {
open : null ,
close : null
} ,
killer : true ,
type : ' info ' ,
layout : ' bottomRight ' ,
theme : ' semanticui '
} ) . show ( ) ;
}
$ ( ' .test_notification ' ) . on ( ' click ' , function ( ) {
const url_field = $ ( this ) . prev ( ) . val ( ) ;
const url_protocol = url_field . split ( ' : ' ) [ 0 ] ;
@ -1424,10 +1582,16 @@ $('.test_notification').on('click', function() {
$ ( " #settings_embedded " ) . checkbox ( ' uncheck ' ) ;
}
if ( $ ( ' #settings_only_monitored ' ) . data ( " monitored " ) == = " True " ) {
$ ( " #settings_only_monitored " ) . checkbox ( ' check ' ) ;
if ( $ ( ' #settings_only_monitored_sonarr ' ) . data ( " monitored " ) == = " True " ) {
$ ( " #settings_only_monitored_sonarr " ) . checkbox ( ' check ' ) ;
} else {
$ ( " #settings_only_monitored_sonarr " ) . checkbox ( ' uncheck ' ) ;
}
if ( $ ( ' #settings_only_monitored_radarr ' ) . data ( " monitored " ) == = " True " ) {
$ ( " #settings_only_monitored_radarr " ) . checkbox ( ' check ' ) ;
} else {
$ ( " #settings_only_monitored " ) . checkbox ( ' uncheck ' ) ;
$ ( " #settings_only_monitored _radarr " ) . checkbox ( ' uncheck ' ) ;
}
if ( $ ( ' #settings_adaptive_searching ' ) . data ( " adaptive " ) == = " True " ) {
@ -1860,12 +2024,29 @@ $('.test_notification').on('click', function() {
$ ( ' #settings_providers ' ) . dropdown ( ' setting ' , ' onChange ' , function ( ) {
$ ( ' .form ' ) . form ( ' validate field ' , ' settings_subliminal_providers ' ) ;
} ) ;
$ ( ' #settings_languages ' ) . dropdown ( ' setting ' , ' onChange ' , function ( ) {
$ ( ' .form ' ) . form ( ' validate field ' , ' settings_subliminal_languages ' ) ;
$ ( " #settings_providers > option " ) . each ( function ( ) {
$ ( ' # ' + $ ( this ) . val ( ) + ' _option ' ) . hide ( ) ;
} ) ;
$ ( ' .submit ' ) . on ( ' click ' , function ( ) {
alert ( ' Settings saved. ' ) ;
$ ( " #settings_providers > option:selected " ) . each ( function ( ) {
$ ( ' [id= ' + this . value + ' ] ' ) . checkbox ( ' check ' ) ;
$ ( ' # ' + $ ( this ) . val ( ) + ' _option ' ) . show ( ) ;
} ) ;
$ ( ' .provider ' ) . checkbox ( {
onChecked : function ( ) {
$ ( ' #settings_providers ' ) . dropdown ( ' set selected ' , $ ( this ) . parent ( ) . attr ( ' id ' ) ) ;
$ ( ' # ' + $ ( this ) . parent ( ) . attr ( ' id ' ) + ' _option ' ) . show ( ) ;
} ,
onUnchecked : function ( ) {
$ ( ' #settings_providers ' ) . dropdown ( ' remove selected ' , $ ( this ) . parent ( ) . attr ( ' id ' ) ) ;
$ ( ' # ' + $ ( this ) . parent ( ) . attr ( ' id ' ) + ' _option ' ) . hide ( ) ;
}
} ) ;
$ ( ' #settings_languages ' ) . dropdown ( ' setting ' , ' onChange ' , function ( ) {
$ ( ' .form ' ) . form ( ' validate field ' , ' settings_subliminal_languages ' ) ;
} ) ;
$ ( function ( ) {