diff --git a/gui/slick/js/core.js b/gui/slick/js/core.js index d11143cd3b3356917d41dd3840f86962ea2fd8b9..63a2a53c5d84fb6c9af01b58780ccb8aba837982 100644 --- a/gui/slick/js/core.js +++ b/gui/slick/js/core.js @@ -388,27 +388,27 @@ var SICKRAGE = { }); }); - $('#testPMC').on('click', function () { + $('#testPHT').on('click', function () { var plex = {}; plex.client = {}; - plex.client.host = $.trim($('#plex_host').val()); + plex.client.host = $.trim($('#plex_client_host').val()); plex.client.username = $.trim($('#plex_client_username').val()); plex.client.password = $.trim($('#plex_client_password').val()); if (!plex.client.host) { - $('#testPMC-result').html('Please fill out the necessary fields above.'); - $('#plex_host').addClass('warning'); + $('#testPHT-result').html('Please fill out the necessary fields above.'); + $('#plex_client_host').addClass('warning'); return; } - $('#plex_host').removeClass('warning'); + $('#plex_client_host').removeClass('warning'); $(this).prop('disabled', true); - $('#testPMC-result').html(loading); - $.get(srRoot + '/home/testPMC', { + $('#testPHT-result').html(loading); + $.get(srRoot + '/home/testPHT', { 'host': plex.client.host, 'username': plex.client.username, 'password': plex.client.password }).done(function (data) { - $('#testPMC-result').html(data); - $('#testPMC').prop('disabled', false); + $('#testPHT-result').html(data); + $('#testPHT').prop('disabled', false); }); }); @@ -416,8 +416,8 @@ var SICKRAGE = { var plex = {}; plex.server = {}; plex.server.host = $.trim($('#plex_server_host').val()); - plex.username = $.trim($('#plex_username').val()); - plex.password = $.trim($('#plex_password').val()); + plex.server.username = $.trim($('#plex_server_username').val()); + plex.server.password = $.trim($('#plex_server_password').val()); plex.server.token = $.trim($('#plex_server_token').val()); if (!plex.server.host) { $('#testPMS-result').html('Please fill out the necessary fields above.'); @@ -429,8 +429,8 @@ var SICKRAGE = { $('#testPMS-result').html(loading); $.get(srRoot + '/home/testPMS', { 'host': plex.server.host, - 'username': plex.username, - 'password': plex.password, + 'username': plex.server.username, + 'password': plex.server.password, 'plex_server_token': plex.server.token }).done(function (data) { $('#testPMS-result').html(data); @@ -990,7 +990,7 @@ var SICKRAGE = { }); // show instructions for plex when enabled - $('#use_plex').on('click', function() { + $('#use_plex_server').on('click', function() { if ($(this).is(':checked')) { $('.plexinfo').removeClass('hide'); } else { diff --git a/gui/slick/js/core.min.js b/gui/slick/js/core.min.js index 36c27618963d1bd9fbc4c6a202f4bc17150ce1a8..98337456ec2605e5f2ee671b6fc41e02297cb43c 100644 Binary files a/gui/slick/js/core.min.js and b/gui/slick/js/core.min.js differ diff --git a/gui/slick/views/config_notifications.mako b/gui/slick/views/config_notifications.mako index 98953e2c31c6b8b46a51c2eec0dc53a8f644fbb4..ac84c8e66d8d1bcbdfc9221543b7605f294b9c42 100644 --- a/gui/slick/views/config_notifications.mako +++ b/gui/slick/views/config_notifications.mako @@ -37,7 +37,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_kodi" id="use_kodi" ${('', 'checked="checked"')[bool(sickbeard.USE_KODI)]}/> - <p>should SickRage send KODI commands ?<p> + <p>Send KODI commands?<p> </span> </label> </div> @@ -48,7 +48,7 @@ <span class="component-title">Always on</span> <span class="component-desc"> <input type="checkbox" name="kodi_always_on" id="kodi_always_on" ${('', 'checked="checked"')[bool(sickbeard.KODI_ALWAYS_ON)]}/> - <p>log errors when unreachable ?</p> + <p>log errors when unreachable?</p> </span> </label> </div> @@ -57,7 +57,7 @@ <span class="component-title">Notify on snatch</span> <span class="component-desc"> <input type="checkbox" name="kodi_notify_onsnatch" id="kodi_notify_onsnatch" ${('', 'checked="checked"')[bool(sickbeard.KODI_NOTIFY_ONSNATCH)]}/> - <p>send a notification when a download starts ?</p> + <p>send a notification when a download starts?</p> </span> </label> </div> @@ -66,7 +66,7 @@ <span class="component-title">Notify on download</span> <span class="component-desc"> <input type="checkbox" name="kodi_notify_ondownload" id="kodi_notify_ondownload" ${('', 'checked="checked"')[bool(sickbeard.KODI_NOTIFY_ONDOWNLOAD)]}/> - <p>send a notification when a download finishes ?</p> + <p>send a notification when a download finishes?</p> </span> </label> </div> @@ -75,7 +75,7 @@ <span class="component-title">Notify on subtitle download</span> <span class="component-desc"> <input type="checkbox" name="kodi_notify_onsubtitledownload" id="kodi_notify_onsubtitledownload" ${('', 'checked="checked"')[bool(sickbeard.KODI_NOTIFY_ONSUBTITLEDOWNLOAD)]}/> - <p>send a notification when subtitles are downloaded ?</p> + <p>send a notification when subtitles are downloaded?</p> </span> </label> </div> @@ -84,7 +84,7 @@ <span class="component-title">Update library</span> <span class="component-desc"> <input type="checkbox" name="kodi_update_library" id="kodi_update_library" ${('', 'checked="checked"')[bool(sickbeard.KODI_UPDATE_LIBRARY)]}/> - <p>update KODI library when a download finishes ?</p> + <p>update KODI library when a download finishes?</p> </span> </label> </div> @@ -93,7 +93,7 @@ <span class="component-title">Full library update</span> <span class="component-desc"> <input type="checkbox" name="kodi_update_full" id="kodi_update_full" ${('', 'checked="checked"')[bool(sickbeard.KODI_UPDATE_FULL)]}/> - <p>perform a full library update if update per-show fails ?</p> + <p>perform a full library update if update per-show fails?</p> </span> </label> </div> @@ -102,7 +102,7 @@ <span class="component-title">Only update first host</span> <span class="component-desc"> <input type="checkbox" name="kodi_update_onlyfirst" id="kodi_update_onlyfirst" ${('', 'checked="checked"')[bool(sickbeard.KODI_UPDATE_ONLYFIRST)]}/> - <p>only send library updates to the first active host ?</p> + <p>only send library updates to the first active host?</p> </span> </label> </div> @@ -122,7 +122,7 @@ </div> <div class="field-pair"> <label for="kodi_username"> - <span class="component-title">KODI username</span> + <span class="component-title">Username</span> <input type="text" name="kodi_username" id="kodi_username" value="${sickbeard.KODI_USERNAME}" class="form-control input-sm input250" autocapitalize="off" autocomplete="no" /> </label> <label> @@ -132,7 +132,7 @@ </div> <div class="field-pair"> <label for="kodi_password"> - <span class="component-title">KODI password</span> + <span class="component-title">Password</span> <input type="password" name="kodi_password" id="kodi_password" value="${sickbeard.KODI_PASSWORD}" class="form-control input-sm input250" autocomplete="no" autocapitalize="off" /> </label> <label> @@ -149,7 +149,6 @@ </div><!-- /kodi component-group //--> - <div class="component-group"> <div class="component-group-desc"> <img class="notifier-icon" src="${srRoot}/images/notifiers/plex.png" alt="" title="Plex Media Server" /> @@ -159,16 +158,16 @@ </div> <fieldset class="component-group-list"> <div class="field-pair"> - <label for="use_plex"> + <label for="use_plex_server"> <span class="component-title">Enable</span> <span class="component-desc"> - <input type="checkbox" class="enabler" name="use_plex" id="use_plex" ${('', 'checked="checked"')[bool(sickbeard.USE_PLEX)]}/> - <p>should SickRage send Plex commands ?</p> + <input type="checkbox" class="enabler" name="use_plex_server" id="use_plex_server" ${('', 'checked="checked"')[bool(sickbeard.USE_PLEX_SERVER)]}/> + <p>Send Plex Media Server library updates?</p> </span> </label> </div> - <div id="content_use_plex"> + <div id="content_use_plex_server"> <div class="field-pair"> <label for="plex_server_token"> <span class="component-title">Plex Media Server Auth Token</span> @@ -185,29 +184,28 @@ </div> <div class="component-group" style="padding: 0; min-height: 130px"> <div class="field-pair"> - <label for="plex_username"> - <span class="component-title">Server Username</span> + <label for="plex_server_username"> + <span class="component-title">Username</span> <span class="component-desc"> - <input type="text" name="plex_username" id="plex_username" value="${sickbeard.PLEX_USERNAME}" class="form-control input-sm input250" autocapitalize="off" autocomplete="no" /> + <input type="text" name="plex_server_username" id="plex_server_username" value="${sickbeard.PLEX_SERVER_USERNAME}" class="form-control input-sm input250" autocapitalize="off" autocomplete="no" /> <p>blank = no authentication</p> </span> </label> </div> <div class="field-pair"> - <label for="plex_password"> - <span class="component-title">Server/client password</span> + <label for="plex_server_password"> + <span class="component-title">Password</span> <span class="component-desc"> - <input type="password" name="plex_password" id="plex_password" value="${'*' * len(sickbeard.PLEX_PASSWORD)}" class="form-control input-sm input250" autocomplete="no" autocapitalize="off" /> + <input type="password" name="plex_server_password" id="plex_server_password" value="${'*' * len(sickbeard.PLEX_SERVER_PASSWORD)}" class="form-control input-sm input250" autocomplete="no" autocapitalize="off" /> <p>blank = no authentication</p> </span> </label> </div> </div> - <div class="component-group" style="padding: 0; min-height: 50px"> <div class="field-pair"> <label for="plex_update_library"> - <span class="component-title">Update server library</span> + <span class="component-title">Update Library</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="plex_update_library" id="plex_update_library" ${('', 'checked="checked"')[bool(sickbeard.PLEX_UPDATE_LIBRARY)]}/> <p>update Plex Media Server library when a download finishes</p> @@ -226,31 +224,39 @@ </span> </label> </div> - <div class="field-pair"> - <div class="testNotification" id="testPMS-result">Click below to test Plex server(s)</div> - <input class="btn" type="button" value="Test Plex Server" id="testPMS" /> + <label for="plex_server_https"> + <span class="component-title">HTTPS</span> + <span class="component-desc"> + <input type="checkbox" name="plex_server_https" id="plex_server_https" ${('', 'checked="checked"')[bool(sickbeard.PLEX_SERVER_HTTPS)]}/> + <p>use https for plex media server requests?</p> + </span> + </label> + </div> + <div class="field-pair"> + <div class="testNotification" id="testPMS-result">Click below to test Plex Media Server(s)</div> + <input class="btn" type="button" value="Test Plex Media Server" id="testPMS" /> <input type="submit" class="config_submitter btn" value="Save Changes" /> <div class="clear-left"> </div> </div> </div> </div> - </div><!-- /content_use_plex --> + </div><!-- /content_use_plex_server --> </fieldset> </div><!-- /plex media server component-group --> <div class="component-group"> <div class="component-group-desc"> - <img class="notifier-icon" src="${srRoot}/images/notifiers/plex.png" alt="" title="Plex Media Client" /> - <h3><a href="${anon_url('http://www.plexapp.com/')}" rel="noreferrer" onclick="window.open(this.href, '_blank'); return false;">Plex Media Client</a></h3> + <img class="notifier-icon" src="${srRoot}/images/notifiers/plex.png" alt="" title="Plex Home Theater" /> + <h3><a href="${anon_url('http://www.plexapp.com/')}" rel="noreferrer" onclick="window.open(this.href, '_blank'); return false;">Plex Home Theater</a></h3> </div> <fieldset class="component-group-list"> <div class="field-pair"> <label for="use_plex_client"> <span class="component-title">Enable</span> <span class="component-desc"> - <input type="checkbox" class="enabler" name="use_plex" id="use_plex_client" ${('', 'checked="checked"')[bool(sickbeard.USE_PLEX_CLIENT)]}/> - <p>should SickRage send Plex commands ?</p> + <input type="checkbox" class="enabler" name="use_plex_client" id="use_plex_client" ${('', 'checked="checked"')[bool(sickbeard.USE_PLEX_CLIENT)]}/> + <p>Send Plex Home Theater notifications?</p> </span> </label> </div> @@ -261,7 +267,7 @@ <span class="component-title">Notify on snatch</span> <span class="component-desc"> <input type="checkbox" name="plex_notify_onsnatch" id="plex_notify_onsnatch" ${('', 'checked="checked"')[bool(sickbeard.PLEX_NOTIFY_ONSNATCH)]}/> - <p>send a notification when a download starts ?</p> + <p>send a notification when a download starts?</p> </span> </label> </div> @@ -270,7 +276,7 @@ <span class="component-title">Notify on download</span> <span class="component-desc"> <input type="checkbox" name="plex_notify_ondownload" id="plex_notify_ondownload" ${('', 'checked="checked"')[bool(sickbeard.PLEX_NOTIFY_ONDOWNLOAD)]}/> - <p>send a notification when a download finishes ?</p> + <p>send a notification when a download finishes?</p> </span> </label> </div> @@ -279,25 +285,25 @@ <span class="component-title">Notify on subtitle download</span> <span class="component-desc"> <input type="checkbox" name="plex_notify_onsubtitledownload" id="plex_notify_onsubtitledownload" ${('', 'checked="checked"')[bool(sickbeard.PLEX_NOTIFY_ONSUBTITLEDOWNLOAD)]}/> - <p>send a notification when subtitles are downloaded ?</p> + <p>send a notification when subtitles are downloaded?</p> </span> </label> </div> <div class="field-pair"> - <label for="plex_host"> - <span class="component-title">Plex Client IP:Port</span> + <label for="plex_client_host"> + <span class="component-title">Plex Home Theater IP:Port</span> <span class="component-desc"> - <input type="text" name="plex_host" id="plex_host" value="${sickbeard.PLEX_HOST}" class="form-control input-sm input350" autocapitalize="off" /> + <input type="text" name="plex_client_host" id="plex_client_host" value="${sickbeard.PLEX_CLIENT_HOST}" class="form-control input-sm input350" autocapitalize="off" /> <div class="clear-left"> - <p>one or more hosts running Plex client<br>(eg. 192.168.1.100:3000, 192.168.1.101:3000)</p> + <p>one or more hosts running Plex Home Theater<br>(eg. 192.168.1.100:3000, 192.168.1.101:3000)</p> </div> </span> </label> </div> <div class="component-group" style="padding: 0; min-height: 130px"> <div class="field-pair"> - <label for="plex_username"> - <span class="component-title">Server Username</span> + <label for="plex_server_username"> + <span class="component-title">Username</span> <span class="component-desc"> <input type="text" name="plex_client_username" id="plex_client_username" value="${sickbeard.PLEX_CLIENT_USERNAME}" class="form-control input-sm input250" autocapitalize="off" autocomplete="no" /> <p>blank = no authentication</p> @@ -306,7 +312,7 @@ </div> <div class="field-pair"> <label for="plex_client_password"> - <span class="component-title">Client Password</span> + <span class="component-title">Password</span> <span class="component-desc"> <input type="password" name="plex_client_password" id="plex_client_password" value="${'*' * len(sickbeard.PLEX_CLIENT_PASSWORD)}" class="form-control input-sm input250" autocomplete="no" autocapitalize="off" /> <p>blank = no authentication</p> @@ -316,14 +322,14 @@ </div> <div class="field-pair"> - <div class="testNotification" id="testPMC-result">Click below to test Plex client(s)</div> - <input class="btn" type="button" value="Test Plex Client" id="testPMC" /> + <div class="testNotification" id="testPHT-result">Click below to test Plex Home Theater(s)</div> + <input class="btn" type="button" value="Test Plex Home Theater" id="testPHT" /> <input type="submit" class="config_submitter btn" value="Save Changes" /> - <div class=clear-left><p>Note: some Plex clients <b class="boldest">do not</b> support notifications e.g. Plexapp for Samsung TVs</p></div> + <div class=clear-left><p>Note: some Plex Home Theaters <b class="boldest">do not</b> support notifications e.g. Plexapp for Samsung TVs</p></div> </div> </div><!-- /content_use_plex_client --> </fieldset> - </div><!-- /plex client component-group --> + </div><!-- /Plex Home Theater component-group --> <div class="component-group"> @@ -338,7 +344,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_emby" id="use_emby" ${('', 'checked="checked"')[bool(sickbeard.USE_EMBY)]} /> - <p>should SickRage send update commands to Emby?<p> + <p>Send update commands to Emby?<p> </span> </label> </div> @@ -380,7 +386,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_nmj" id="use_nmj" ${('', 'checked="checked"')[bool(sickbeard.USE_NMJ)]}/> - <p>should SickRage send update commands to NMJ ?</p> + <p>Send update commands to NMJ?</p> </span> </label> </div> @@ -446,7 +452,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_nmjv2" id="use_nmjv2" ${('', 'checked="checked"')[bool(sickbeard.USE_NMJv2)]}/> - <p>should SickRage send update commands to NMJv2 ?</p> + <p>Send update commands to NMJv2?</p> </span> </label> </div> @@ -536,7 +542,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_synoindex" id="use_synoindex" ${('', 'checked="checked"')[bool(sickbeard.USE_SYNOINDEX)]}/> - <p>should SickRage send Synology notifications ?</p> + <p>Send Synology notifications?</p> </span> </label> <label> @@ -566,7 +572,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_synologynotifier" id="use_synologynotifier" ${('', 'checked="checked"')[bool(sickbeard.USE_SYNOLOGYNOTIFIER)]}/> - <p>should SickRage send notifications to the Synology Notifier ?</p> + <p>Send notifications to the Synology Notifier?</p> </span> </label> <label> @@ -580,7 +586,7 @@ <span class="component-title">Notify on snatch</span> <span class="component-desc"> <input type="checkbox" name="synologynotifier_notify_onsnatch" id="synologynotifier_notify_onsnatch" ${('', 'checked="checked"')[bool(sickbeard.SYNOLOGYNOTIFIER_NOTIFY_ONSNATCH)]}/> - <p>send a notification when a download starts ?</p> + <p>send a notification when a download starts?</p> </span> </label> </div> @@ -589,7 +595,7 @@ <span class="component-title">Notify on download</span> <span class="component-desc"> <input type="checkbox" name="synologynotifier_notify_ondownload" id="synologynotifier_notify_ondownload" ${('', 'checked="checked"')[bool(sickbeard.SYNOLOGYNOTIFIER_NOTIFY_ONDOWNLOAD)]}/> - <p>send a notification when a download finishes ?</p> + <p>send a notification when a download finishes?</p> </span> </label> </div> @@ -598,7 +604,7 @@ <span class="component-title">Notify on subtitle download</span> <span class="component-desc"> <input type="checkbox" name="synologynotifier_notify_onsubtitledownload" id="synologynotifier_notify_onsubtitledownload" ${('', 'checked="checked"')[bool(sickbeard.SYNOLOGYNOTIFIER_NOTIFY_ONSUBTITLEDOWNLOAD)]}/> - <p>send a notification when subtitles are downloaded ?</p> + <p>send a notification when subtitles are downloaded?</p> </span> </label> </div> @@ -620,7 +626,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_pytivo" id="use_pytivo" ${('', 'checked="checked"')[bool(sickbeard.USE_PYTIVO)]}/> - <p>should SickRage send notifications to pyTivo ?</p> + <p>Send notifications to pyTivo?</p> </span> </label> <label> @@ -682,7 +688,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_growl" id="use_growl" ${('', 'checked="checked"')[bool(sickbeard.USE_GROWL)]}/> - <p>should SickRage send Growl notifications ?</p> + <p>Send Growl notifications?</p> </span> </label> </div> @@ -693,7 +699,7 @@ <span class="component-title">Notify on snatch</span> <span class="component-desc"> <input type="checkbox" name="growl_notify_onsnatch" id="growl_notify_onsnatch" ${('', 'checked="checked"')[bool(sickbeard.GROWL_NOTIFY_ONSNATCH)]}/> - <p>send a notification when a download starts ?</p> + <p>send a notification when a download starts?</p> </span> </label> </div> @@ -702,7 +708,7 @@ <span class="component-title">Notify on download</span> <span class="component-desc"> <input type="checkbox" name="growl_notify_ondownload" id="growl_notify_ondownload" ${('', 'checked="checked"')[bool(sickbeard.GROWL_NOTIFY_ONDOWNLOAD)]}/> - <p>send a notification when a download finishes ?</p> + <p>send a notification when a download finishes?</p> </span> </label> </div> @@ -711,7 +717,7 @@ <span class="component-title">Notify on subtitle download</span> <span class="component-desc"> <input type="checkbox" name="growl_notify_onsubtitledownload" id="growl_notify_onsubtitledownload" ${('', 'checked="checked"')[bool(sickbeard.GROWL_NOTIFY_ONSUBTITLEDOWNLOAD)]}/> - <p>send a notification when subtitles are downloaded ?</p> + <p>send a notification when subtitles are downloaded?</p> </span> </label> </div> @@ -727,7 +733,7 @@ </div> <div class="field-pair"> <label for="growl_password"> - <span class="component-title">Growl password</span> + <span class="component-title">Password</span> <input type="password" name="growl_password" id="growl_password" value="${sickbeard.GROWL_PASSWORD}" class="form-control input-sm input250" autocomplete="no" autocapitalize="off" /> </label> <label> @@ -760,7 +766,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_prowl" id="use_prowl" ${('', 'checked="checked"')[bool(sickbeard.USE_PROWL)]}/> - <p>should SickRage send Prowl notifications ?</p> + <p>Send Prowl notifications?</p> </span> </label> </div> @@ -771,7 +777,7 @@ <span class="component-title">Notify on snatch</span> <span class="component-desc"> <input type="checkbox" name="prowl_notify_onsnatch" id="prowl_notify_onsnatch" ${('', 'checked="checked"')[bool(sickbeard.PROWL_NOTIFY_ONSNATCH)]}/> - <p>send a notification when a download starts ?</p> + <p>send a notification when a download starts?</p> </span> </label> </div> @@ -780,7 +786,7 @@ <span class="component-title">Notify on download</span> <span class="component-desc"> <input type="checkbox" name="prowl_notify_ondownload" id="prowl_notify_ondownload" ${('', 'checked="checked"')[bool(sickbeard.PROWL_NOTIFY_ONDOWNLOAD)]}/> - <p>send a notification when a download finishes ?</p> + <p>send a notification when a download finishes?</p> </span> </label> </div> @@ -789,7 +795,7 @@ <span class="component-title">Notify on subtitle download</span> <span class="component-desc"> <input type="checkbox" name="prowl_notify_onsubtitledownload" id="prowl_notify_onsubtitledownload" ${('', 'checked="checked"')[bool(sickbeard.PROWL_NOTIFY_ONSUBTITLEDOWNLOAD)]}/> - <p>send a notification when subtitles are downloaded ?</p> + <p>send a notification when subtitles are downloaded?</p> </span> </label> </div> @@ -872,7 +878,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_libnotify" id="use_libnotify" ${('', 'checked="checked"')[bool(sickbeard.USE_LIBNOTIFY)]}/> - <p>should SickRage send Libnotify notifications ?</p> + <p>Send Libnotify notifications?</p> </span> </label> </div> @@ -883,7 +889,7 @@ <span class="component-title">Notify on snatch</span> <span class="component-desc"> <input type="checkbox" name="libnotify_notify_onsnatch" id="libnotify_notify_onsnatch" ${('', 'checked="checked"')[bool(sickbeard.LIBNOTIFY_NOTIFY_ONSNATCH)]}/> - <p>send a notification when a download starts ?</p> + <p>send a notification when a download starts?</p> </span> </label> </div> @@ -892,7 +898,7 @@ <span class="component-title">Notify on download</span> <span class="component-desc"> <input type="checkbox" name="libnotify_notify_ondownload" id="libnotify_notify_ondownload" ${('', 'checked="checked"')[bool(sickbeard.LIBNOTIFY_NOTIFY_ONDOWNLOAD)]}/> - <p>send a notification when a download finishes ?</p> + <p>send a notification when a download finishes?</p> </span> </label> </div> @@ -901,7 +907,7 @@ <span class="component-title">Notify on subtitle download</span> <span class="component-desc"> <input type="checkbox" name="libnotify_notify_onsubtitledownload" id="libnotify_notify_onsubtitledownload" ${('', 'checked="checked"')[bool(sickbeard.LIBNOTIFY_NOTIFY_ONSUBTITLEDOWNLOAD)]}/> - <p>send a notification when subtitles are downloaded ?</p> + <p>send a notification when subtitles are downloaded?</p> </span> </label> </div> @@ -926,7 +932,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_pushover" id="use_pushover" ${('', 'checked="checked"')[bool(sickbeard.USE_PUSHOVER)]}/> - <p>should SickRage send Pushover notifications ?</p> + <p>Send Pushover notifications?</p> </span> </label> </div> @@ -937,7 +943,7 @@ <span class="component-title">Notify on snatch</span> <span class="component-desc"> <input type="checkbox" name="pushover_notify_onsnatch" id="pushover_notify_onsnatch" ${('', 'checked="checked"')[bool(sickbeard.PUSHOVER_NOTIFY_ONSNATCH)]}/> - <p>send a notification when a download starts ?</p> + <p>send a notification when a download starts?</p> </span> </label> </div> @@ -946,7 +952,7 @@ <span class="component-title">Notify on download</span> <span class="component-desc"> <input type="checkbox" name="pushover_notify_ondownload" id="pushover_notify_ondownload" ${('', 'checked="checked"')[bool(sickbeard.PUSHOVER_NOTIFY_ONDOWNLOAD)]}/> - <p>send a notification when a download finishes ?</p> + <p>send a notification when a download finishes?</p> </span> </label> </div> @@ -955,7 +961,7 @@ <span class="component-title">Notify on subtitle download</span> <span class="component-desc"> <input type="checkbox" name="pushover_notify_onsubtitledownload" id="pushover_notify_onsubtitledownload" ${('', 'checked="checked"')[bool(sickbeard.PUSHOVER_NOTIFY_ONSUBTITLEDOWNLOAD)]}/> - <p>send a notification when subtitles are downloaded ?</p> + <p>send a notification when subtitles are downloaded?</p> </span> </label> </div> @@ -1043,7 +1049,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_boxcar2" id="use_boxcar2" ${('', 'checked="checked"')[bool(sickbeard.USE_BOXCAR2)]}/> - <p>should SickRage send Boxcar notifications ?</p> + <p>Send Boxcar notifications?</p> </span> </label> </div> @@ -1054,7 +1060,7 @@ <span class="component-title">Notify on snatch</span> <span class="component-desc"> <input type="checkbox" name="boxcar2_notify_onsnatch" id="boxcar2_notify_onsnatch" ${('', 'checked="checked"')[bool(sickbeard.BOXCAR2_NOTIFY_ONSNATCH)]}/> - <p>send a notification when a download starts ?</p> + <p>send a notification when a download starts?</p> </span> </label> </div> @@ -1063,7 +1069,7 @@ <span class="component-title">Notify on download</span> <span class="component-desc"> <input type="checkbox" name="boxcar2_notify_ondownload" id="boxcar2_notify_ondownload" ${('', 'checked="checked"')[bool(sickbeard.BOXCAR2_NOTIFY_ONDOWNLOAD)]}/> - <p>send a notification when a download finishes ?</p> + <p>send a notification when a download finishes?</p> </span> </label> </div> @@ -1072,7 +1078,7 @@ <span class="component-title">Notify on subtitle download</span> <span class="component-desc"> <input type="checkbox" name="boxcar2_notify_onsubtitledownload" id="boxcar2_notify_onsubtitledownload" ${('', 'checked="checked"')[bool(sickbeard.BOXCAR2_NOTIFY_ONSUBTITLEDOWNLOAD)]}/> - <p>send a notification when subtitles are downloaded ?</p> + <p>send a notification when subtitles are downloaded?</p> </span> </label> </div> @@ -1106,7 +1112,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_nma" id="use_nma" ${('', 'checked="checked"')[bool(sickbeard.USE_NMA)]}/> - <p>should SickRage send NMA notifications ?</p> + <p>Send NMA notifications?</p> </span> </label> </div> @@ -1117,7 +1123,7 @@ <span class="component-title">Notify on snatch</span> <span class="component-desc"> <input type="checkbox" name="nma_notify_onsnatch" id="nma_notify_onsnatch" ${('', 'checked="checked"')[bool(sickbeard.NMA_NOTIFY_ONSNATCH)]}/> - <p>send a notification when a download starts ?</p> + <p>send a notification when a download starts?</p> </span> </label> </div> @@ -1126,7 +1132,7 @@ <span class="component-title">Notify on download</span> <span class="component-desc"> <input type="checkbox" name="nma_notify_ondownload" id="nma_notify_ondownload" ${('', 'checked="checked"')[bool(sickbeard.NMA_NOTIFY_ONDOWNLOAD)]}/> - <p>send a notification when a download finishes ?</p> + <p>send a notification when a download finishes?</p> </span> </label> </div> @@ -1135,7 +1141,7 @@ <span class="component-title">Notify on subtitle download</span> <span class="component-desc"> <input type="checkbox" name="nma_notify_onsubtitledownload" id="nma_notify_onsubtitledownload" ${('', 'checked="checked"')[bool(sickbeard.NMA_NOTIFY_ONSUBTITLEDOWNLOAD)]}/> - <p>send a notification when subtitles are downloaded ?</p> + <p>send a notification when subtitles are downloaded?</p> </span> </label> </div> @@ -1185,7 +1191,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_pushalot" id="use_pushalot" ${('', 'checked="checked"')[bool(sickbeard.USE_PUSHALOT)]}/> - <p>should SickRage send Pushalot notifications ? + <p>Send Pushalot notifications ? </span> </label> </div> @@ -1196,7 +1202,7 @@ <span class="component-title">Notify on snatch</span> <span class="component-desc"> <input type="checkbox" name="pushalot_notify_onsnatch" id="pushalot_notify_onsnatch" ${('', 'checked="checked"')[bool(sickbeard.PUSHALOT_NOTIFY_ONSNATCH)]}/> - <p>send a notification when a download starts ?</p> + <p>send a notification when a download starts?</p> </span> </label> </div> @@ -1205,7 +1211,7 @@ <span class="component-title">Notify on download</span> <span class="component-desc"> <input type="checkbox" name="pushalot_notify_ondownload" id="pushalot_notify_ondownload" ${('', 'checked="checked"')[bool(sickbeard.PUSHALOT_NOTIFY_ONDOWNLOAD)]}/> - <p>send a notification when a download finishes ?</p> + <p>send a notification when a download finishes?</p> </span> </label> </div> @@ -1214,7 +1220,7 @@ <span class="component-title">Notify on subtitle download</span> <span class="component-desc"> <input type="checkbox" name="pushalot_notify_onsubtitledownload" id="pushalot_notify_onsubtitledownload" ${('', 'checked="checked"')[bool(sickbeard.PUSHALOT_NOTIFY_ONSUBTITLEDOWNLOAD)]}/> - <p>send a notification when subtitles are downloaded ?</p> + <p>send a notification when subtitles are downloaded?</p> </span> </label> </div> @@ -1248,7 +1254,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_pushbullet" id="use_pushbullet" ${('', 'checked="checked"')[bool(sickbeard.USE_PUSHBULLET)]}/> - <p>should SickRage send Pushbullet notifications ?</p> + <p>Send Pushbullet notifications?</p> </span> </label> </div> @@ -1259,7 +1265,7 @@ <span class="component-title">Notify on snatch</span> <span class="component-desc"> <input type="checkbox" name="pushbullet_notify_onsnatch" id="pushbullet_notify_onsnatch" ${('', 'checked="checked"')[bool(sickbeard.PUSHBULLET_NOTIFY_ONSNATCH)]}/> - <p>send a notification when a download starts ?</p> + <p>send a notification when a download starts?</p> </span> </label> </div> @@ -1268,7 +1274,7 @@ <span class="component-title">Notify on download</span> <span class="component-desc"> <input type="checkbox" name="pushbullet_notify_ondownload" id="pushbullet_notify_ondownload" ${('', 'checked="checked"')[bool(sickbeard.PUSHBULLET_NOTIFY_ONDOWNLOAD)]}/> - <p>send a notification when a download finishes ?</p> + <p>send a notification when a download finishes?</p> </span> </label> </div> @@ -1277,7 +1283,7 @@ <span class="component-title">Notify on subtitle download</span> <span class="component-desc"> <input type="checkbox" name="pushbullet_notify_onsubtitledownload" id="pushbullet_notify_onsubtitledownload" ${('', 'checked="checked"')[bool(sickbeard.PUSHBULLET_NOTIFY_ONSUBTITLEDOWNLOAD)]}/> - <p>send a notification when subtitles are downloaded ?</p> + <p>send a notification when subtitles are downloaded?</p> </span> </label> </div> @@ -1322,7 +1328,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_freemobile" id="use_freemobile" ${('', 'checked="checked"')[bool(sickbeard.USE_FREEMOBILE)]}/> - <p>should SickRage send SMS notifications ?</p> + <p>Send SMS notifications?</p> </span> </label> </div> @@ -1333,7 +1339,7 @@ <span class="component-title">Notify on snatch</span> <span class="component-desc"> <input type="checkbox" name="freemobile_notify_onsnatch" id="freemobile_notify_onsnatch" ${('', 'checked="checked"')[bool(sickbeard.FREEMOBILE_NOTIFY_ONSNATCH)]}/> - <p>send a SMS when a download starts ?</p> + <p>send a SMS when a download starts?</p> </span> </label> </div> @@ -1342,7 +1348,7 @@ <span class="component-title">Notify on download</span> <span class="component-desc"> <input type="checkbox" name="freemobile_notify_ondownload" id="freemobile_notify_ondownload" ${('', 'checked="checked"')[bool(sickbeard.FREEMOBILE_NOTIFY_ONDOWNLOAD)]}/> - <p>send a SMS when a download finishes ?</p> + <p>send a SMS when a download finishes?</p> </span> </label> </div> @@ -1351,7 +1357,7 @@ <span class="component-title">Notify on subtitle download</span> <span class="component-desc"> <input type="checkbox" name="freemobile_notify_onsubtitledownload" id="freemobile_notify_onsubtitledownload" ${('', 'checked="checked"')[bool(sickbeard.FREEMOBILE_NOTIFY_ONSUBTITLEDOWNLOAD)]}/> - <p>send a SMS when subtitles are downloaded ?</p> + <p>send a SMS when subtitles are downloaded?</p> </span> </label> </div> @@ -1398,7 +1404,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_twitter" id="use_twitter" ${('', 'checked="checked"')[bool(sickbeard.USE_TWITTER)]}/> - <p>should SickRage post tweets on Twitter ?</p> + <p>should SickRage post tweets on Twitter?</p> </span> </label> <label> @@ -1413,7 +1419,7 @@ <span class="component-title">Notify on snatch</span> <span class="component-desc"> <input type="checkbox" name="twitter_notify_onsnatch" id="twitter_notify_onsnatch" ${('', 'checked="checked"')[bool(sickbeard.TWITTER_NOTIFY_ONSNATCH)]}/> - <p>send a notification when a download starts ?</p> + <p>send a notification when a download starts?</p> </span> </label> </div> @@ -1422,7 +1428,7 @@ <span class="component-title">Notify on download</span> <span class="component-desc"> <input type="checkbox" name="twitter_notify_ondownload" id="twitter_notify_ondownload" ${('', 'checked="checked"')[bool(sickbeard.TWITTER_NOTIFY_ONDOWNLOAD)]}/> - <p>send a notification when a download finishes ?</p> + <p>send a notification when a download finishes?</p> </span> </label> </div> @@ -1431,7 +1437,7 @@ <span class="component-title">Notify on subtitle download</span> <span class="component-desc"> <input type="checkbox" name="twitter_notify_onsubtitledownload" id="twitter_notify_onsubtitledownload" ${('', 'checked="checked"')[bool(sickbeard.TWITTER_NOTIFY_ONSUBTITLEDOWNLOAD)]}/> - <p>send a notification when subtitles are downloaded ?</p> + <p>send a notification when subtitles are downloaded?</p> </span> </label> </div> @@ -1500,7 +1506,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_trakt" id="use_trakt" ${('', 'checked="checked"')[bool(sickbeard.USE_TRAKT)]}/> - <p>should SickRage send Trakt.tv notifications ?</p> + <p>Send Trakt.tv notifications?</p> </span> </label> </div> @@ -1508,7 +1514,7 @@ <div id="content_use_trakt"> <div class="field-pair"> <label for="trakt_username"> - <span class="component-title">Trakt username</span> + <span class="component-title">Username</span> <input type="text" name="trakt_username" id="trakt_username" value="${sickbeard.TRAKT_USERNAME}" class="form-control input-sm input250" autocapitalize="off" autocomplete="no" /> </label> <p> @@ -1661,7 +1667,7 @@ <span class="component-title">Enable</span> <span class="component-desc"> <input type="checkbox" class="enabler" name="use_email" id="use_email" ${('', 'checked="checked"')[bool(sickbeard.USE_EMAIL)]}/> - <p>should SickRage send email notifications ?</p> + <p>Send email notifications?</p> </span> </label> </div> @@ -1672,7 +1678,7 @@ <span class="component-title">Notify on snatch</span> <span class="component-desc"> <input type="checkbox" name="email_notify_onsnatch" id="email_notify_onsnatch" ${('', 'checked="checked"')[bool(sickbeard.EMAIL_NOTIFY_ONSNATCH)]}/> - <p>send a notification when a download starts ?</p> + <p>send a notification when a download starts?</p> </span> </label> </div> @@ -1681,7 +1687,7 @@ <span class="component-title">Notify on download</span> <span class="component-desc"> <input type="checkbox" name="email_notify_ondownload" id="email_notify_ondownload" ${('', 'checked="checked"')[bool(sickbeard.EMAIL_NOTIFY_ONDOWNLOAD)]}/> - <p>send a notification when a download finishes ?</p> + <p>send a notification when a download finishes?</p> </span> </label> </div> @@ -1690,7 +1696,7 @@ <span class="component-title">Notify on subtitle download</span> <span class="component-desc"> <input type="checkbox" name="email_notify_onsubtitledownload" id="email_notify_onsubtitledownload" ${('', 'checked="checked"')[bool(sickbeard.EMAIL_NOTIFY_ONSUBTITLEDOWNLOAD)]}/> - <p>send a notification when subtitles are downloaded ?</p> + <p>send a notification when subtitles are downloaded?</p> </span> </label> </div> diff --git a/gui/slick/views/layouts/main.mako b/gui/slick/views/layouts/main.mako index fda12eb262d2cf65d166987b6720b9d7ced94e81..41f3702157c6cce92f5e20b01898109604545f7c 100644 --- a/gui/slick/views/layouts/main.mako +++ b/gui/slick/views/layouts/main.mako @@ -141,7 +141,7 @@ <li><a href="${srRoot}/manage/backlogOverview/"><i class="menu-icon-backlog-view"></i> Backlog Overview</a></li> <li><a href="${srRoot}/manage/manageSearches/"><i class="menu-icon-manage-searches"></i> Manage Searches</a></li> <li><a href="${srRoot}/manage/episodeStatuses/"><i class="menu-icon-backlog"></i> Episode Status Management</a></li> - % if sickbeard.USE_PLEX and sickbeard.PLEX_SERVER_HOST != "": + % if sickbeard.USE_PLEX_SERVER and sickbeard.PLEX_SERVER_HOST != "": <li><a href="${srRoot}/home/updatePLEX/"><i class="menu-icon-backlog-view"></i> Update PLEX</a></li> % endif % if sickbeard.USE_KODI and sickbeard.KODI_HOST != "": diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py index 6e6edb08b40d70adebd0da02c7da196b5246ea1e..904c818b9adec751b983044e6a5504824be579c7 100644 --- a/sickbeard/__init__.py +++ b/sickbeard/__init__.py @@ -76,7 +76,7 @@ CFG = None CONFIG_FILE = None # This is the version of the config we EXPECT to find -CONFIG_VERSION = 7 +CONFIG_VERSION = 8 # Default encryption version (0 for None) ENCRYPTION_VERSION = 0 @@ -342,19 +342,20 @@ KODI_HOST = '' KODI_USERNAME = None KODI_PASSWORD = None -USE_PLEX = False +USE_PLEX_SERVER = False PLEX_NOTIFY_ONSNATCH = False PLEX_NOTIFY_ONDOWNLOAD = False PLEX_NOTIFY_ONSUBTITLEDOWNLOAD = False PLEX_UPDATE_LIBRARY = False PLEX_SERVER_HOST = None PLEX_SERVER_TOKEN = None -PLEX_HOST = None -PLEX_USERNAME = None -PLEX_PASSWORD = None +PLEX_CLIENT_HOST = None +PLEX_SERVER_USERNAME = None +PLEX_SERVER_PASSWORD = None USE_PLEX_CLIENT = False PLEX_CLIENT_USERNAME = None PLEX_CLIENT_PASSWORD = None +PLEX_SERVER_HTTPS = None USE_EMBY = False EMBY_HOST = None @@ -586,8 +587,8 @@ def initialize(consoleLogging=True): USE_KODI, KODI_ALWAYS_ON, KODI_NOTIFY_ONSNATCH, KODI_NOTIFY_ONDOWNLOAD, KODI_NOTIFY_ONSUBTITLEDOWNLOAD, KODI_UPDATE_FULL, KODI_UPDATE_ONLYFIRST, \ KODI_UPDATE_LIBRARY, KODI_HOST, KODI_USERNAME, KODI_PASSWORD, BACKLOG_FREQUENCY, \ USE_TRAKT, TRAKT_USERNAME, TRAKT_ACCESS_TOKEN, TRAKT_REFRESH_TOKEN, TRAKT_REMOVE_WATCHLIST, TRAKT_SYNC_WATCHLIST, TRAKT_REMOVE_SHOW_FROM_SICKRAGE, TRAKT_METHOD_ADD, TRAKT_START_PAUSED, traktCheckerScheduler, TRAKT_USE_RECOMMENDED, TRAKT_SYNC, TRAKT_SYNC_REMOVE, TRAKT_DEFAULT_INDEXER, TRAKT_REMOVE_SERIESLIST, TRAKT_TIMEOUT, TRAKT_BLACKLIST_NAME, \ - USE_PLEX, PLEX_NOTIFY_ONSNATCH, PLEX_NOTIFY_ONDOWNLOAD, PLEX_NOTIFY_ONSUBTITLEDOWNLOAD, PLEX_UPDATE_LIBRARY, USE_PLEX_CLIENT, PLEX_CLIENT_USERNAME, PLEX_CLIENT_PASSWORD, \ - PLEX_SERVER_HOST, PLEX_SERVER_TOKEN, PLEX_HOST, PLEX_USERNAME, PLEX_PASSWORD, MIN_BACKLOG_FREQUENCY, SKIP_REMOVED_FILES, ALLOWED_EXTENSIONS, \ + USE_PLEX_SERVER, PLEX_NOTIFY_ONSNATCH, PLEX_NOTIFY_ONDOWNLOAD, PLEX_NOTIFY_ONSUBTITLEDOWNLOAD, PLEX_UPDATE_LIBRARY, USE_PLEX_CLIENT, PLEX_CLIENT_USERNAME, PLEX_CLIENT_PASSWORD, \ + PLEX_SERVER_HOST, PLEX_SERVER_TOKEN, PLEX_CLIENT_HOST, PLEX_SERVER_USERNAME, PLEX_SERVER_PASSWORD, PLEX_SERVER_HTTPS, MIN_BACKLOG_FREQUENCY, SKIP_REMOVED_FILES, ALLOWED_EXTENSIONS, \ USE_EMBY, EMBY_HOST, EMBY_APIKEY, \ showUpdateScheduler, __INITIALIZED__, INDEXER_DEFAULT_LANGUAGE, EP_DEFAULT_DELETED_STATUS, LAUNCH_BROWSER, TRASH_REMOVE_SHOW, TRASH_ROTATE_LOGS, SORT_ARTICLE, showList, loadingShowList, \ NEWZNAB_DATA, NZBS, NZBS_UID, NZBS_HASH, INDEXER_DEFAULT, INDEXER_TIMEOUT, USENET_RETENTION, TORRENT_DIR, \ @@ -987,19 +988,20 @@ def initialize(consoleLogging=True): KODI_USERNAME = check_setting_str(CFG, 'KODI', 'kodi_username', '', censor_log=True) KODI_PASSWORD = check_setting_str(CFG, 'KODI', 'kodi_password', '', censor_log=True) - USE_PLEX = bool(check_setting_int(CFG, 'Plex', 'use_plex', 0)) + USE_PLEX_SERVER = bool(check_setting_int(CFG, 'Plex', 'use_plex_server', 0)) PLEX_NOTIFY_ONSNATCH = bool(check_setting_int(CFG, 'Plex', 'plex_notify_onsnatch', 0)) PLEX_NOTIFY_ONDOWNLOAD = bool(check_setting_int(CFG, 'Plex', 'plex_notify_ondownload', 0)) PLEX_NOTIFY_ONSUBTITLEDOWNLOAD = bool(check_setting_int(CFG, 'Plex', 'plex_notify_onsubtitledownload', 0)) PLEX_UPDATE_LIBRARY = bool(check_setting_int(CFG, 'Plex', 'plex_update_library', 0)) PLEX_SERVER_HOST = check_setting_str(CFG, 'Plex', 'plex_server_host', '') PLEX_SERVER_TOKEN = check_setting_str(CFG, 'Plex', 'plex_server_token', '') - PLEX_HOST = check_setting_str(CFG, 'Plex', 'plex_host', '') - PLEX_USERNAME = check_setting_str(CFG, 'Plex', 'plex_username', '', censor_log=True) - PLEX_PASSWORD = check_setting_str(CFG, 'Plex', 'plex_password', '', censor_log=True) + PLEX_CLIENT_HOST = check_setting_str(CFG, 'Plex', 'plex_client_host', '') + PLEX_SERVER_USERNAME = check_setting_str(CFG, 'Plex', 'plex_server_username', '', censor_log=True) + PLEX_SERVER_PASSWORD = check_setting_str(CFG, 'Plex', 'plex_server_password', '', censor_log=True) USE_PLEX_CLIENT = bool(check_setting_int(CFG, 'Plex', 'use_plex_client', 0)) PLEX_CLIENT_USERNAME = check_setting_str(CFG, 'Plex', 'plex_client_username', '', censor_log=True) PLEX_CLIENT_PASSWORD = check_setting_str(CFG, 'Plex', 'plex_client_password', '', censor_log=True) + PLEX_SERVER_HTTPS = bool(check_setting_int(CFG, 'Plex', 'plex_server_https', 0)) USE_EMBY = bool(check_setting_int(CFG, 'Emby', 'use_emby', 0)) EMBY_HOST = check_setting_str(CFG, 'Emby', 'emby_host', '') @@ -1894,16 +1896,21 @@ def save_config(): new_config['KODI']['kodi_password'] = helpers.encrypt(KODI_PASSWORD, ENCRYPTION_VERSION) new_config['Plex'] = {} - new_config['Plex']['use_plex'] = int(USE_PLEX) + new_config['Plex']['use_plex_server'] = int(USE_PLEX_SERVER) new_config['Plex']['plex_notify_onsnatch'] = int(PLEX_NOTIFY_ONSNATCH) new_config['Plex']['plex_notify_ondownload'] = int(PLEX_NOTIFY_ONDOWNLOAD) new_config['Plex']['plex_notify_onsubtitledownload'] = int(PLEX_NOTIFY_ONSUBTITLEDOWNLOAD) new_config['Plex']['plex_update_library'] = int(PLEX_UPDATE_LIBRARY) new_config['Plex']['plex_server_host'] = PLEX_SERVER_HOST new_config['Plex']['plex_server_token'] = PLEX_SERVER_TOKEN - new_config['Plex']['plex_host'] = PLEX_HOST - new_config['Plex']['plex_username'] = PLEX_USERNAME - new_config['Plex']['plex_password'] = helpers.encrypt(PLEX_PASSWORD, ENCRYPTION_VERSION) + new_config['Plex']['plex_client_host'] = PLEX_CLIENT_HOST + new_config['Plex']['plex_server_username'] = PLEX_SERVER_USERNAME + new_config['Plex']['plex_server_password'] = helpers.encrypt(PLEX_SERVER_PASSWORD, ENCRYPTION_VERSION) + + new_config['Plex']['use_plex_client'] = int(USE_PLEX_CLIENT) + new_config['Plex']['plex_client_username'] = PLEX_CLIENT_USERNAME + new_config['Plex']['plex_client_password'] = helpers.encrypt(PLEX_CLIENT_PASSWORD, ENCRYPTION_VERSION) + new_config['Plex']['plex_server_https'] = int(PLEX_SERVER_HTTPS) new_config['Emby'] = {} new_config['Emby']['use_emby'] = int(USE_EMBY) diff --git a/sickbeard/config.py b/sickbeard/config.py index 1c12d9ef855f7ddc2178a1adb3162580d7423a94..5b6ce6acf6eabcd7e8d0cf44aa2d1f81917f33df 100644 --- a/sickbeard/config.py +++ b/sickbeard/config.py @@ -467,17 +467,12 @@ def clean_hosts(hosts, default_port=None): """ cleaned_hosts = [] - for cur_host in [x.strip() for x in hosts.split(",")]: - if cur_host: - cleaned_host = clean_host(cur_host, default_port) - if cleaned_host: - cleaned_hosts.append(cleaned_host) - - if cleaned_hosts: - cleaned_hosts = ",".join(cleaned_hosts) + for cur_host in [host.strip() for host in hosts.split(",") if host.strip()]: + cleaned_host = clean_host(cur_host, default_port) + if cleaned_host: + cleaned_hosts.append(cleaned_host) - else: - cleaned_hosts = '' + cleaned_hosts = ",".join(cleaned_hosts) if cleaned_hosts else '' return cleaned_hosts @@ -626,7 +621,8 @@ class ConfigMigrator(object): 4: 'Add newznab catIDs', 5: 'Metadata update', 6: 'Convert from XBMC to new KODI variables', - 7: 'Use version 2 for password encryption' + 7: 'Use version 2 for password encryption', + 8: 'Convert Plex setting keys' } def migrate_config(self): @@ -734,7 +730,6 @@ class ConfigMigrator(object): "s%0Se%0E", "S%0SE%0E", "%0Sx%0E") - naming_sep_type = (" - ", " ") # set up our data to use if use_periods: @@ -914,3 +909,9 @@ class ConfigMigrator(object): # Migration v6: Use version 2 for password encryption def _migrate_v7(self): sickbeard.ENCRYPTION_VERSION = 2 + + def _migrate_v8(self): + sickbeard.PLEX_CLIENT_HOST = check_setting_str(self.config_obj, 'Plex', 'plex_host', '') + sickbeard.PLEX_SERVER_USERNAME = check_setting_str(self.config_obj, 'Plex', 'plex_username', '', censor_log=True) + sickbeard.PLEX_SERVER_PASSWORD = check_setting_str(self.config_obj, 'Plex', 'plex_password', '', censor_log=True) + sickbeard.USE_PLEX_SERVER = bool(check_setting_int(self.config_obj, 'Plex', 'use_plex', 0)) diff --git a/sickbeard/notifiers/kodi.py b/sickbeard/notifiers/kodi.py index f46d41baa1d52eb479443b39eb1c25ca301bf78f..9ff6c6dbc1c17ca2704a86ee9e47463bc93338bb 100644 --- a/sickbeard/notifiers/kodi.py +++ b/sickbeard/notifiers/kodi.py @@ -45,7 +45,7 @@ except ImportError: class KODINotifier(object): sr_logo_url = 'https://raw.githubusercontent.com/SickRage/SickRage/master/gui/slick/images/sickrage-shark-mascot.png' - def _get_kodi_version(self, host, username, password): + def _get_kodi_version(self, host, username, password, dest_app="KODI"): """Returns KODI JSON-RPC API version (odd # = dev, even # = stable) Sends a request to the KODI host using the JSON-RPC to determine if @@ -77,7 +77,7 @@ class KODINotifier(object): socket.setdefaulttimeout(10) checkCommand = '{"jsonrpc":"2.0","method":"JSONRPC.Version","id":1}' - result = self._send_to_kodi_json(checkCommand, host, username, password) + result = self._send_to_kodi_json(checkCommand, host, username, password, dest_app) # revert back to default socket timeout socket.setdefaulttimeout(sickbeard.SOCKET_TIMEOUT) @@ -87,14 +87,14 @@ class KODINotifier(object): else: # fallback to legacy HTTPAPI method testCommand = {'command': 'Help'} - request = self._send_to_kodi(testCommand, host, username, password) + request = self._send_to_kodi(testCommand, host, username, password, dest_app) if request: # return a fake version number, so it uses the legacy method return 1 else: return False - def _notify_kodi(self, message, title="SickRage", host=None, username=None, password=None, force=False): + def _notify_kodi(self, message, title="SickRage", host=None, username=None, password=None, force=False, dest_app="KODI"): # pylint: disable=too-many-arguments """Internal wrapper for the notify_snatch and notify_download functions Detects JSON-RPC version then branches the logic for either the JSON-RPC or legacy HTTP API methods. @@ -123,17 +123,17 @@ class KODINotifier(object): # suppress notifications if the notifier is disabled but the notify options are checked if not sickbeard.USE_KODI and not force: - logger.log(u"Notification for KODI not enabled, skipping this notification", logger.DEBUG) + logger.log(u"Notification for %s not enabled, skipping this notification" % dest_app, logger.DEBUG) return False result = '' - for curHost in [x.strip() for x in host.split(",")]: - logger.log(u"Sending KODI notification to '" + curHost + "' - " + message, logger.DEBUG) + for curHost in [x.strip() for x in host.split(",") if x.strip()]: + logger.log(u"Sending %s notification to '%s' - %s" % (dest_app, curHost, message), logger.DEBUG) - kodiapi = self._get_kodi_version(curHost, username, password) + kodiapi = self._get_kodi_version(curHost, username, password, dest_app) if kodiapi: if kodiapi <= 4: - logger.log(u"Detected KODI version <= 11, using KODI HTTP API", logger.DEBUG) + logger.log(u"Detected %s version <= 11, using %s HTTP API" % (dest_app, dest_app), logger.DEBUG) command = {'command': 'ExecBuiltIn', 'parameter': 'Notification(' + title.encode("utf-8") + ',' + message.encode( "utf-8") + ')'} @@ -141,15 +141,15 @@ class KODINotifier(object): if notifyResult: result += curHost + ':' + str(notifyResult) else: - logger.log(u"Detected KODI version >= 12, using KODI JSON API", logger.DEBUG) + logger.log(u"Detected %s version >= 12, using %s JSON API" % (dest_app, dest_app), logger.DEBUG) command = '{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"%s","message":"%s", "image": "%s"},"id":1}' % ( title.encode("utf-8"), message.encode("utf-8"), self.sr_logo_url) - notifyResult = self._send_to_kodi_json(command, curHost, username, password) - if notifyResult and notifyResult.get('result'): + notifyResult = self._send_to_kodi_json(command, curHost, username, password, dest_app) + if notifyResult and notifyResult.get('result'): # pylint: disable=no-member result += curHost + ':' + notifyResult["result"].decode(sickbeard.SYS_ENCODING) else: if sickbeard.KODI_ALWAYS_ON or force: - logger.log(u"Failed to detect KODI version for '" + curHost + "', check configuration and try again.", logger.WARNING) + logger.log(u"Failed to detect %s version for '%s', check configuration and try again." % (dest_app, curHost), logger.WARNING) result += curHost + ':False' return result @@ -168,7 +168,7 @@ class KODINotifier(object): """ - logger.log(u"Sending request to update library for KODI host: '" + host + "'", logger.DEBUG) + logger.log(u"Sending request to update library for KODI host: '%s'" % host, logger.DEBUG) kodiapi = self._get_kodi_version(host, sickbeard.KODI_USERNAME, sickbeard.KODI_PASSWORD) if kodiapi: @@ -195,7 +195,8 @@ class KODINotifier(object): # Legacy HTTP API (pre KODI 12) methods ############################################################################## - def _send_to_kodi(self, command, host=None, username=None, password=None): + @staticmethod + def _send_to_kodi(command, host=None, username=None, password=None, dest_app="KODI"): # pylint: disable=too-many-arguments """Handles communication to KODI servers via HTTP API Args: @@ -216,7 +217,7 @@ class KODINotifier(object): password = sickbeard.KODI_PASSWORD if not host: - logger.log(u'No KODI host passed, aborting update', logger.WARNING) + logger.log(u'No %s host passed, aborting update' % dest_app, logger.WARNING) return False for key in command: @@ -224,8 +225,9 @@ class KODINotifier(object): command[key] = command[key].encode('utf-8') enc_command = urllib.urlencode(command) - logger.log(u"KODI encoded API command: " + enc_command, logger.DEBUG) + logger.log(u"%s encoded API command: %r" % (dest_app, enc_command), logger.DEBUG) + # url = 'http://%s/xbmcCmds/xbmcHttp/?%s' % (host, enc_command) # maybe need for old plex? url = 'http://%s/kodiCmds/kodiHttp/?%s' % (host, enc_command) try: req = urllib2.Request(url) @@ -234,27 +236,27 @@ class KODINotifier(object): base64string = base64.encodestring('%s:%s' % (username, password))[:-1] authheader = "Basic %s" % base64string req.add_header("Authorization", authheader) - logger.log(u"Contacting KODI (with auth header) via url: " + ss(url), logger.DEBUG) + logger.log(u"Contacting %s (with auth header) via url: %s" % (dest_app, ss(url)), logger.DEBUG) else: - logger.log(u"Contacting KODI via url: " + ss(url), logger.DEBUG) + logger.log(u"Contacting %s via url: %s" % (dest_app, ss(url)), logger.DEBUG) try: response = urllib2.urlopen(req) except (httplib.BadStatusLine, urllib2.URLError) as e: - logger.log(u"Couldn't contact KODI HTTP at %r : %r" % (url, ex(e)), logger.DEBUG) + logger.log(u"Couldn't contact %s HTTP at %r : %r" % (dest_app, url, ex(e)), logger.DEBUG) return False result = response.read().decode(sickbeard.SYS_ENCODING) response.close() - logger.log(u"KODI HTTP response: " + result.replace('\n', ''), logger.DEBUG) + logger.log(u"%s HTTP response: %s" % (dest_app, result.replace('\n', '')), logger.DEBUG) return result except Exception as e: - logger.log(u"Couldn't contact KODI HTTP at %r : %r" % (url, ex(e)), logger.DEBUG) + logger.log(u"Couldn't contact %s HTTP at %r : %r" % (dest_app, url, ex(e)), logger.DEBUG) return False - def _update_library(self, host=None, showName=None): + def _update_library(self, host=None, showName=None): # pylint: disable=too-many-locals, too-many-return-statements """Handles updating KODI host via HTTP API Attempts to update the KODI video library for a specific tv show if passed, @@ -344,7 +346,8 @@ class KODINotifier(object): # JSON-RPC API (KODI 12+) methods ############################################################################## - def _send_to_kodi_json(self, command, host=None, username=None, password=None): + @staticmethod + def _send_to_kodi_json(command, host=None, username=None, password=None, dest_app="KODI"): """Handles communication to KODI servers via JSONRPC Args: @@ -365,11 +368,11 @@ class KODINotifier(object): password = sickbeard.KODI_PASSWORD if not host: - logger.log(u'No KODI host passed, aborting update', logger.WARNING) + logger.log(u'No %s host passed, aborting update' % dest_app, logger.WARNING) return False command = command.encode('utf-8') - logger.log(u"KODI JSON command: " + command, logger.DEBUG) + logger.log(u"%s JSON command: %s" % (dest_app, command), logger.DEBUG) url = 'http://%s/jsonrpc' % host try: @@ -380,22 +383,22 @@ class KODINotifier(object): base64string = base64.encodestring('%s:%s' % (username, password))[:-1] authheader = "Basic %s" % base64string req.add_header("Authorization", authheader) - logger.log(u"Contacting KODI (with auth header) via url: " + ss(url), logger.DEBUG) + logger.log(u"Contacting %s (with auth header) via url: %s" % (dest_app, ss(url)), logger.DEBUG) else: - logger.log(u"Contacting KODI via url: " + ss(url), logger.DEBUG) + logger.log(u"Contacting %s via url: %s" % (dest_app, ss(url)), logger.DEBUG) try: response = urllib2.urlopen(req) except (httplib.BadStatusLine, urllib2.URLError) as e: if sickbeard.KODI_ALWAYS_ON: - logger.log(u"Error while trying to retrieve KODI API version for " + host + ": " + ex(e), logger.WARNING) + logger.log(u"Error while trying to retrieve %s API version for %s: %r" % (dest_app, host, ex(e)), logger.WARNING) return False # parse the json result try: result = json.load(response) response.close() - logger.log(u"KODI JSON response: " + str(result), logger.DEBUG) + logger.log(u"%s JSON response: %s" % (dest_app, result), logger.DEBUG) return result # need to return response for parsing except ValueError as e: logger.log(u"Unable to decode JSON: " + str(response.read()), logger.WARNING) @@ -403,10 +406,10 @@ class KODINotifier(object): except IOError as e: if sickbeard.KODI_ALWAYS_ON: - logger.log(u"Warning: Couldn't contact KODI JSON API at " + ss(url) + " " + ex(e), logger.WARNING) + logger.log(u"Warning: Couldn't contact %s JSON API at %s: %r" % (dest_app, ss(url), ex(e)), logger.WARNING) return False - def _update_library_json(self, host=None, showName=None): + def _update_library_json(self, host=None, showName=None): # pylint: disable=too-many-return-statements, too-many-branches """Handles updating KODI host via HTTP JSON-RPC Attempts to update the KODI video library for a specific tv show if passed, diff --git a/sickbeard/notifiers/plex.py b/sickbeard/notifiers/plex.py index c3c2e125bdf49cea0bc400fc9a73c4e74701a754..217485ad7a921c8f5ba35a23d15c786949566654 100644 --- a/sickbeard/notifiers/plex.py +++ b/sickbeard/notifiers/plex.py @@ -37,69 +37,14 @@ except ImportError: class PLEXNotifier(object): - def _send_to_plex(self, command, host, username=None, password=None): - """Handles communication to Plex hosts via HTTP API - - Args: - command: Dictionary of field/data pairs, encoded via urllib and passed to the legacy xbmcCmds HTTP API - host: Plex host:port - username: Plex API username - password: Plex API password - - Returns: - Returns 'OK' for successful commands or False if there was an error - - """ - - # fill in omitted parameters - if not username: - username = sickbeard.PLEX_CLIENT_USERNAME - if not password: - password = sickbeard.PLEX_CLIENT_PASSWORD - - if not host: - logger.log(u'PLEX: No host specified, check your settings', logger.WARNING) - return False - - for key in command: - if type(command[key]) == unicode: - command[key] = command[key].encode('utf-8') - - enc_command = urllib.urlencode(command) - logger.log(u'PLEX: Encoded API command: ' + enc_command, logger.DEBUG) - - url = u'http://%s/xbmcCmds/xbmcHttp/?%s' % (host, enc_command) - try: - req = urllib2.Request(url) - # if we have a password, use authentication - if password: - base64string = base64.encodestring('%s:%s' % (username, password))[:-1] - authheader = 'Basic %s' % base64string - req.add_header('Authorization', authheader) - logger.log(u'PLEX: Contacting (with auth header) via url: ' + url, logger.DEBUG) - else: - logger.log(u'PLEX: Contacting via url: ' + url, logger.DEBUG) - - response = urllib2.urlopen(req) - - result = response.read().decode(sickbeard.SYS_ENCODING) - response.close() - - logger.log(u'PLEX: HTTP response: ' + result.replace('\n', ''), logger.DEBUG) - # could return result response = re.compile('<html><li>(.+\w)</html>').findall(result) - return 'OK' - - except (urllib2.URLError, IOError) as e: - logger.log(u'PLEX: Warning: Couldn\'t contact Plex at ' + url + ' ' + ex(e), logger.WARNING) - return False - - def _notify_pmc(self, message, title='SickRage', host=None, username=None, password=None, force=False): + @staticmethod + def _notify_pht(message, title='SickRage', host=None, username=None, password=None, force=False): # pylint: disable=too-many-arguments """Internal wrapper for the notify_snatch and notify_download functions Args: message: Message body of the notice to send title: Title of the notice to send - host: Plex Media Client(s) host:port + host: Plex Home Theater(s) host:port username: Plex username password: Plex password force: Used for the Test method to override config safety checks @@ -116,22 +61,13 @@ class PLEXNotifier(object): # fill in omitted parameters if not host: - host = sickbeard.PLEX_HOST + host = sickbeard.PLEX_CLIENT_HOST if not username: username = sickbeard.PLEX_CLIENT_USERNAME if not password: password = sickbeard.PLEX_CLIENT_PASSWORD - result = '' - for curHost in [x.strip() for x in host.split(',')]: - logger.log(u'PLEX: Sending notification to \'%s\' - %s' % (curHost, message), logger.DEBUG) - - command = {'command': 'ExecBuiltIn', 'parameter': 'Notification(%s,%s)' % (title.encode('utf-8'), message.encode('utf-8'))} - notify_result = self._send_to_plex(command, curHost, username, password) - if notify_result: - result += '%s:%s' % (curHost, str(notify_result)) - - return result + return sickbeard.notifiers.kodi_notifier._notify_kodi(message, title=title, host=host, username=username, password=password, force=force, dest_app="PLEX") # pylint: disable=protected-access ############################################################################## # Public functions @@ -139,36 +75,37 @@ class PLEXNotifier(object): def notify_snatch(self, ep_name): if sickbeard.PLEX_NOTIFY_ONSNATCH: - self._notify_pmc(ep_name, common.notifyStrings[common.NOTIFY_SNATCH]) + self._notify_pht(ep_name, common.notifyStrings[common.NOTIFY_SNATCH]) def notify_download(self, ep_name): if sickbeard.PLEX_NOTIFY_ONDOWNLOAD: - self._notify_pmc(ep_name, common.notifyStrings[common.NOTIFY_DOWNLOAD]) + self._notify_pht(ep_name, common.notifyStrings[common.NOTIFY_DOWNLOAD]) def notify_subtitle_download(self, ep_name, lang): if sickbeard.PLEX_NOTIFY_ONSUBTITLEDOWNLOAD: - self._notify_pmc(ep_name + ': ' + lang, common.notifyStrings[common.NOTIFY_SUBTITLE_DOWNLOAD]) + self._notify_pht(ep_name + ': ' + lang, common.notifyStrings[common.NOTIFY_SUBTITLE_DOWNLOAD]) def notify_git_update(self, new_version='??'): - if sickbeard.USE_PLEX: + if sickbeard.USE_PLEX_SERVER: update_text = common.notifyStrings[common.NOTIFY_GIT_UPDATE_TEXT] title = common.notifyStrings[common.NOTIFY_GIT_UPDATE] if update_text and title and new_version: - self._notify_pmc(update_text + new_version, title) + self._notify_pht(update_text + new_version, title) def notify_login(self, ipaddress=""): - if sickbeard.USE_PLEX: + if sickbeard.USE_PLEX_SERVER: update_text = common.notifyStrings[common.NOTIFY_LOGIN_TEXT] title = common.notifyStrings[common.NOTIFY_LOGIN] - self._notify_pmc(update_text.format(ipaddress), title) + self._notify_pht(update_text.format(ipaddress), title) - def test_notify_pmc(self, host, username, password): - return self._notify_pmc('This is a test notification from SickRage', 'Test Notification', host, username, password, force=True) + def test_notify_pht(self, host, username, password): + return self._notify_pht('This is a test notification from SickRage', 'Test Notification', host, username, password, force=True) def test_notify_pms(self, host, username, password, plex_server_token): return self.update_library(host=host, username=username, password=password, plex_server_token=plex_server_token, force=False) - def update_library(self, ep_obj=None, host=None, username=None, password=None, plex_server_token=None, force=True): + @staticmethod + def update_library(ep_obj=None, host=None, username=None, password=None, plex_server_token=None, force=True): # pylint: disable=too-many-arguments, too-many-locals, too-many-statements, too-many-branches """Handles updating the Plex Media Server host via HTTP API Plex Media Server currently only supports updating the whole video library and not a specific path. @@ -178,18 +115,19 @@ class PLEXNotifier(object): """ - if sickbeard.USE_PLEX and sickbeard.PLEX_UPDATE_LIBRARY: - - if not sickbeard.PLEX_SERVER_HOST: - logger.log(u'PLEX: No Plex Media Server host specified, check your settings', logger.DEBUG) - return False + if sickbeard.USE_PLEX_SERVER and sickbeard.PLEX_UPDATE_LIBRARY: if not host: + if not sickbeard.PLEX_SERVER_HOST: + logger.log(u'PLEX: No Plex Media Server host specified, check your settings', logger.DEBUG) + return False host = sickbeard.PLEX_SERVER_HOST + if not username: - username = sickbeard.PLEX_USERNAME + username = sickbeard.PLEX_SERVER_USERNAME + if not password: - password = sickbeard.PLEX_PASSWORD + password = sickbeard.PLEX_SERVER_PASSWORD if not plex_server_token: plex_server_token = sickbeard.PLEX_SERVER_TOKEN @@ -221,13 +159,13 @@ class PLEXNotifier(object): logger.log(u'PLEX: Error parsing plex.tv response: ' + ex(e), logger.DEBUG) file_location = '' if None is ep_obj else ep_obj.location - host_list = [x.strip() for x in host.split(',')] + host_list = [x.strip() for x in host.split(',') if x.strip()] hosts_all = {} hosts_match = {} hosts_failed = [] for cur_host in host_list: - url = 'http://%s/library/sections%s' % (cur_host, token_arg) + url = 'http%s://%s/library/sections%s' % (('', 's')[sickbeard.PLEX_SERVER_HTTPS], cur_host, token_arg) try: xml_tree = etree.parse(urllib.urlopen(url)) media_container = xml_tree.getroot() @@ -269,9 +207,10 @@ class PLEXNotifier(object): host_list = [] for section_key, cur_host in hosts_try.iteritems(): - url = 'http://%s/library/sections/%s/refresh%s' % (cur_host, section_key, token_arg) + url = 'http%s://%s/library/sections/%s/refresh%s' % (('', 's')[sickbeard.PLEX_SERVER_HTTPS], cur_host, section_key, token_arg) try: - force and urllib.urlopen(url) + if force: + urllib.urlopen(url) host_list.append(cur_host) except Exception as e: logger.log(u'PLEX: Error updating library section for Plex Media Server: ' + ex(e), logger.WARNING) diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index e8ec5adb2d8215fb10942a90387d7680507a84f7..fd4f08c47685fd1906dfdf8813777fb82efa25f0 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -751,7 +751,7 @@ class Home(WebRoot): @staticmethod def havePLEX(): - return sickbeard.USE_PLEX and sickbeard.PLEX_UPDATE_LIBRARY + return sickbeard.USE_PLEX_SERVER and sickbeard.PLEX_UPDATE_LIBRARY @staticmethod def haveEMBY(): @@ -884,7 +884,7 @@ class Home(WebRoot): return finalResult - def testPMC(self, host=None, username=None, password=None): + def testPHT(self, host=None, username=None, password=None): self.set_header('Cache-Control', 'max-age=0,no-cache,no-store') if None is not password and set('*') == set(password): @@ -892,14 +892,14 @@ class Home(WebRoot): finalResult = '' for curHost in [x.strip() for x in host.split(',')]: - curResult = notifiers.plex_notifier.test_notify_pmc(urllib.unquote_plus(curHost), username, password) + curResult = notifiers.plex_notifier.test_notify_pht(urllib.unquote_plus(curHost), username, password) if len(curResult.split(':')) > 2 and 'OK' in curResult.split(':')[2]: - finalResult += 'Successful test notice sent to Plex client ... ' + urllib.unquote_plus(curHost) + finalResult += 'Successful test notice sent to Plex Home Theater ... ' + urllib.unquote_plus(curHost) else: - finalResult += 'Test failed for Plex client ... ' + urllib.unquote_plus(curHost) + finalResult += 'Test failed for Plex Home Theater ... ' + urllib.unquote_plus(curHost) finalResult += '<br>' + '\n' - ui.notifications.message('Tested Plex client(s): ', urllib.unquote_plus(host.replace(',', ', '))) + ui.notifications.message('Tested Plex Home Theater(s): ', urllib.unquote_plus(host.replace(',', ', '))) return finalResult @@ -907,17 +907,17 @@ class Home(WebRoot): self.set_header('Cache-Control', 'max-age=0,no-cache,no-store') if password is not None and set('*') == set(password): - password = sickbeard.PLEX_PASSWORD + password = sickbeard.PLEX_SERVER_PASSWORD finalResult = '' curResult = notifiers.plex_notifier.test_notify_pms(urllib.unquote_plus(host), username, password, plex_server_token) if curResult is None: - finalResult += 'Successful test of Plex server(s) ... ' + urllib.unquote_plus(host.replace(',', ', ')) + finalResult += 'Successful test of Plex Media Server(s) ... ' + urllib.unquote_plus(host.replace(',', ', ')) elif curResult is False: finalResult += 'Test failed, No Plex Media Server host specified' else: - finalResult += 'Test failed for Plex server(s) ... ' + urllib.unquote_plus(str(curResult).replace(',', ', ')) + finalResult += 'Test failed for Plex Media Server(s) ... ' + urllib.unquote_plus(str(curResult).replace(',', ', ')) finalResult += '<br>' + '\n' ui.notifications.message('Tested Plex Media Server host(s): ', urllib.unquote_plus(host.replace(',', ', '))) @@ -4741,11 +4741,11 @@ class ConfigNotifications(Config): kodi_notify_onsubtitledownload=None, kodi_update_onlyfirst=None, kodi_update_library=None, kodi_update_full=None, kodi_host=None, kodi_username=None, kodi_password=None, - use_plex=None, plex_notify_onsnatch=None, plex_notify_ondownload=None, + use_plex_server=None, plex_notify_onsnatch=None, plex_notify_ondownload=None, plex_notify_onsubtitledownload=None, plex_update_library=None, - plex_server_host=None, plex_server_token=None, plex_host=None, plex_username=None, plex_password=None, + plex_server_host=None, plex_server_token=None, plex_client_host=None, plex_server_username=None, plex_server_password=None, use_plex_client=None, plex_client_username=None, plex_client_password=None, - use_emby=None, emby_host=None, emby_apikey=None, + plex_server_https=None, use_emby=None, emby_host=None, emby_apikey=None, use_growl=None, growl_notify_onsnatch=None, growl_notify_ondownload=None, growl_notify_onsubtitledownload=None, growl_host=None, growl_password=None, use_freemobile=None, freemobile_notify_onsnatch=None, freemobile_notify_ondownload=None, @@ -4798,19 +4798,20 @@ class ConfigNotifications(Config): sickbeard.KODI_USERNAME = kodi_username sickbeard.KODI_PASSWORD = kodi_password - sickbeard.USE_PLEX = config.checkbox_to_value(use_plex) + sickbeard.USE_PLEX_SERVER = config.checkbox_to_value(use_plex_server) sickbeard.PLEX_NOTIFY_ONSNATCH = config.checkbox_to_value(plex_notify_onsnatch) sickbeard.PLEX_NOTIFY_ONDOWNLOAD = config.checkbox_to_value(plex_notify_ondownload) sickbeard.PLEX_NOTIFY_ONSUBTITLEDOWNLOAD = config.checkbox_to_value(plex_notify_onsubtitledownload) sickbeard.PLEX_UPDATE_LIBRARY = config.checkbox_to_value(plex_update_library) - sickbeard.PLEX_HOST = config.clean_hosts(plex_host) + sickbeard.PLEX_CLIENT_HOST = config.clean_hosts(plex_client_host) sickbeard.PLEX_SERVER_HOST = config.clean_hosts(plex_server_host) sickbeard.PLEX_SERVER_TOKEN = config.clean_host(plex_server_token) - sickbeard.PLEX_USERNAME = plex_username - sickbeard.PLEX_PASSWORD = plex_password - sickbeard.USE_PLEX_CLIENT = config.checkbox_to_value(use_plex) - sickbeard.PLEX_CLIENT_USERNAME = plex_username - sickbeard.PLEX_CLIENT_PASSWORD = plex_password + sickbeard.PLEX_SERVER_USERNAME = plex_server_username + sickbeard.PLEX_SERVER_PASSWORD = plex_server_password + sickbeard.USE_PLEX_CLIENT = config.checkbox_to_value(use_plex_server) + sickbeard.PLEX_CLIENT_USERNAME = plex_client_username + sickbeard.PLEX_CLIENT_PASSWORD = plex_client_password + sickbeard.PLEX_SERVER_HTTPS = config.checkbox_to_value(plex_server_https) sickbeard.USE_EMBY = config.checkbox_to_value(use_emby) sickbeard.EMBY_HOST = config.clean_host(emby_host)