mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Update setup wizard
This commit is contained in:
parent
c586fe1d07
commit
abab2f3f6b
4 changed files with 136 additions and 157 deletions
|
@ -14,9 +14,9 @@
|
||||||
<meta name="author" content="">
|
<meta name="author" content="">
|
||||||
<link href="${http_root}css/bootstrap3/bootstrap.css" rel="stylesheet">
|
<link href="${http_root}css/bootstrap3/bootstrap.css" rel="stylesheet">
|
||||||
<link href="${http_root}css/bootstrap-wizard.css" rel="stylesheet">
|
<link href="${http_root}css/bootstrap-wizard.css" rel="stylesheet">
|
||||||
<link href="${http_root}css/plexpy.css" rel="stylesheet">
|
<link href="${http_root}css/plexpy.css${cache_param}" rel="stylesheet">
|
||||||
<link href="${http_root}css/selectize.bootstrap3.css" rel="stylesheet">
|
<link href="${http_root}css/selectize.bootstrap3.css" rel="stylesheet">
|
||||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">
|
<link href="${http_root}css/opensans.min.css" rel="stylesheet">
|
||||||
<link href="${http_root}css/font-awesome.min.css" rel="stylesheet">
|
<link href="${http_root}css/font-awesome.min.css" rel="stylesheet">
|
||||||
<link rel="icon" type="image/x-icon" href="${http_root}images/favicon.ico"/>
|
<link rel="icon" type="image/x-icon" href="${http_root}images/favicon.ico"/>
|
||||||
<link rel="shortcut icon" href="${http_root}images/favicon.ico">
|
<link rel="shortcut icon" href="${http_root}images/favicon.ico">
|
||||||
|
@ -26,17 +26,18 @@
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="wizard" id="some-wizard" data-title="PlexPy Setup Wizard">
|
<div class="wizard" id="some-wizard" data-title="PlexPy Setup Wizard">
|
||||||
|
<form>
|
||||||
<div class="wizard-card" data-cardname="card1">
|
<div class="wizard-card" data-cardname="card1">
|
||||||
<div style="float: right;">
|
<div style="float: right;">
|
||||||
<img src="${http_root}images/logo-plexpy.png"/>
|
<img src="${http_root}images/logo-plexpy.png" />
|
||||||
</div>
|
</div>
|
||||||
<h3 style="line-height: 50px;">Welcome!</h3>
|
<h3 style="line-height: 50px;">Welcome!</h3>
|
||||||
<br/>
|
<br />
|
||||||
<div>
|
<div>
|
||||||
Thanks for taking the time to try out PlexPy. Hope you find it useful.
|
Thanks for taking the time to try out PlexPy. Hope you find it useful.
|
||||||
<br/><br/>
|
<br /><br />
|
||||||
PlexPy requires a permanent internet connection to ensure a reliable experience.
|
PlexPy requires a permanent internet connection to ensure a reliable experience.
|
||||||
<br/><br/>
|
<br /><br />
|
||||||
This wizard will help you get set up, to continue press Next.
|
This wizard will help you get set up, to continue press Next.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -64,7 +65,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="wizard-card" data-cardname="card3">
|
<div class="wizard-card" data-cardname="card3">
|
||||||
<h3>Plex Media Server</h3>
|
<h3>Plex Media Server</h3>
|
||||||
<form>
|
|
||||||
<p class="help-block">Enter your Plex Server details and then click the Verify button to make sure PlexPy can reach the server.</p>
|
<p class="help-block">Enter your Plex Server details and then click the Verify button to make sure PlexPy can reach the server.</p>
|
||||||
<div class="wizard-input-section">
|
<div class="wizard-input-section">
|
||||||
<label for="pms_ip">Plex IP or Hostname</label>
|
<label for="pms_ip">Plex IP or Hostname</label>
|
||||||
|
@ -101,19 +101,10 @@
|
||||||
<a class="btn btn-dark" id="verify-plex-server" href="#" role="button">Verify</a><span style="margin-left: 10px; display: none;" id="pms-verify-status"></span>
|
<a class="btn btn-dark" id="verify-plex-server" href="#" role="button">Verify</a><span style="margin-left: 10px; display: none;" id="pms-verify-status"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="wizard-card" data-cardname="card4">
|
<div class="wizard-card" data-cardname="card4">
|
||||||
<h3>Monitoring</h3>
|
<h3>Activity Logging</h3>
|
||||||
<p class="help-block">Keep records of all movie, TV show, or music items played from your Plex Media Server.</p>
|
<p class="help-block">PlexPy will keep a history of all streaming activity on your Plex server.</p>
|
||||||
<div class="wizard-input-section">
|
|
||||||
<input type="checkbox" id="movie_logging_enable" name="movie_logging_enable" value="1" ${config['movie_logging_enable']}> Enable Movie Logging
|
|
||||||
</div>
|
|
||||||
<div class="wizard-input-section">
|
|
||||||
<input type="checkbox" id="tv_logging_enable" name="tv_logging_enable" value="1" ${config['tv_logging_enable']}> Enable TV Show Logging
|
|
||||||
</div>
|
|
||||||
<div class="wizard-input-section">
|
|
||||||
<input type="checkbox" id="music_logging_enable" name="music_logging_enable" value="1" ${config['music_logging_enable']}> Enable Music Logging
|
|
||||||
</div>
|
|
||||||
<div class="wizard-input-section">
|
<div class="wizard-input-section">
|
||||||
<label for="logging_ignore_interval">Ignore Interval</label>
|
<label for="logging_ignore_interval">Ignore Interval</label>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -122,49 +113,33 @@
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-left: 10px; line-height: 35px; display: none;" id="ignore-int-status"></span>
|
<span style="margin-left: 10px; line-height: 35px; display: none;" id="ignore-int-status"></span>
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block">The interval (in seconds) PlexPy will wait for a video item to be active before logging it. 0 to disable.</p>
|
<p class="help-block">The interval (in seconds) an item must be in a playing state before logging it. 0 to disable.</p>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="wizard-card" data-cardname="card5">
|
|
||||||
<h3>Notifications</h3>
|
|
||||||
<p class="help-block">PlexPy supports a wide variety of notification options. To set up a notification agent configure this in <strong>Settings -> Notification Agents</strong>
|
|
||||||
after you have completed this setup wizard.</p><br/>
|
|
||||||
<div class="wizard-input-section">
|
|
||||||
<input type="checkbox" name="movie_notify_enable" id="movie_notify_enable" value="1" ${config['movie_notify_enable']}> Enable notifications on Movie playback
|
|
||||||
</div>
|
|
||||||
<div class="wizard-input-section">
|
|
||||||
<input type="checkbox" name="tv_notify_enable" id="tv_notify_enable" value="1" ${config['tv_notify_enable']}> Enable notifications on TV Show playback
|
|
||||||
</div>
|
|
||||||
<div class="wizard-input-section">
|
|
||||||
<input type="checkbox" name="music_notify_enable" id="music_notify_enable" value="1" ${config['music_notify_enable']}> Enable notifications on Music playback
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wizard-card" data-cardname="card6">
|
<p class="help-block">
|
||||||
|
Additional options to disable history logging for certain libraries or users can be found by editing them
|
||||||
|
on the <strong>Libraries</strong> or <strong>Users</strong> pages.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wizard-card" data-cardname="card4">
|
||||||
|
<h3>Notifications</h3>
|
||||||
|
<p class="help-block">PlexPy can send a wide variety of notification to alert you of activity on your Plex server.</p>
|
||||||
|
<p class="help-block">
|
||||||
|
To set up a notification agent, navigate to the <strong>Settings</strong> page
|
||||||
|
and to the <strong>Notification Agents</strong> tab after you have completed this setup wizard.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wizard-card" data-cardname="card5">
|
||||||
<h3>Database Import</h3>
|
<h3>Database Import</h3>
|
||||||
<p class="help-block">If you have an existing PlexWatch/Plexivity database, you can import the data into PlexPy.</p>
|
<p class="help-block">If you have an existing PlexWatch/Plexivity database, you can import the data into PlexPy.</p>
|
||||||
<p class="help-block">
|
<p class="help-block">
|
||||||
When you complete this wizard navigate to the settings menu and to the Extra Settings tab. You will find an import tool there
|
To import a database, navigate to the <strong>Settings</strong> page
|
||||||
which will convert your PlexWatch/Plexivity database into a format that PlexPy can read.
|
and to the <strong>Import & Backups</strong> tab after you have completed this setup wizard.
|
||||||
</p>
|
</p>
|
||||||
<!-- Figure out best way to get friends list refreshed before adding this back
|
|
||||||
You can skip this and do it later if you wish.</p>
|
<!-- Required fields but hidden -->
|
||||||
<p class="help-block">Enter the path and file name where your
|
|
||||||
plexWatch database file is located and hit Import. The import will run in the background so you can safely finish the wizard when the
|
|
||||||
Import status below changes to "Started"</p>
|
|
||||||
<div class="wizard-input-section">
|
|
||||||
<label for="db_location">Database full Path and Filename</label>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-8">
|
|
||||||
<input type="text" class="form-control plexwatch-import" id="db_location" value="">
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-4">
|
|
||||||
<a class="btn btn-default btn-sm" id="plexwatch-import" style="margin-top: 4px;" href="#" role="button">Import</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<span>Import status: </span><strong><span id="plexwatch-import-status">Idle</span></strong>
|
|
||||||
-->
|
|
||||||
<div style="display: none;">
|
<div style="display: none;">
|
||||||
<input type="checkbox" name="launch_browser" id="launch_browser" value="1" ${config['launch_browser']}>
|
<input type="checkbox" name="launch_browser" id="launch_browser" value="1" ${config['launch_browser']}>
|
||||||
<input type="checkbox" name="refresh_users_on_startup" id="refresh_users_on_startup" value="1" ${config['refresh_users_on_startup']}>
|
<input type="checkbox" name="refresh_users_on_startup" id="refresh_users_on_startup" value="1" ${config['refresh_users_on_startup']}>
|
||||||
|
@ -177,8 +152,8 @@
|
||||||
<input type="text" name="home_stats_cards" id="home_stats_cards" value="first_run_wizard">
|
<input type="text" name="home_stats_cards" id="home_stats_cards" value="first_run_wizard">
|
||||||
<input type="text" name="home_library_cards" id="home_library_cards" value="first_run_wizard">
|
<input type="text" name="home_library_cards" id="home_library_cards" value="first_run_wizard">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- Required fields but hidden -->
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<div class="wizard-success">
|
<div class="wizard-success">
|
||||||
|
@ -186,7 +161,7 @@
|
||||||
<br/>
|
<br/>
|
||||||
<p>Setup is now complete. For more configuration options please visit the Settings menu on the home page.</p>
|
<p>Setup is now complete. For more configuration options please visit the Settings menu on the home page.</p>
|
||||||
<br/>
|
<br/>
|
||||||
<i class="fa fa-refresh fa-spin"></i> Waiting 5 seconds to ensure authentication token is registered...
|
<i class="fa fa-refresh fa-spin"></i> Waiting <span class="countdown">5</span> seconds to ensure authentication token is registered...
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -196,7 +171,7 @@
|
||||||
<script src="${http_root}js/jquery-2.1.4.min.js"></script>
|
<script src="${http_root}js/jquery-2.1.4.min.js"></script>
|
||||||
<script src="${http_root}js/bootstrap.min.js"></script>
|
<script src="${http_root}js/bootstrap.min.js"></script>
|
||||||
<script src="${http_root}js/selectize.min.js"></script>
|
<script src="${http_root}js/selectize.min.js"></script>
|
||||||
<script src="${http_root}js/script.js"></script>
|
<script src="${http_root}js/script.js${cache_param}"></script>
|
||||||
<script src="${http_root}js/bootstrap-wizard.min.js"></script>
|
<script src="${http_root}js/bootstrap-wizard.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
@ -224,9 +199,7 @@
|
||||||
data: wizard.serialize(),
|
data: wizard.serialize(),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
complete: function (data) {
|
complete: function (data) {
|
||||||
setTimeout(function(){
|
$(".countdown").countdown(function () { location.reload(); }, 5, "");
|
||||||
location.reload();
|
|
||||||
}, 5000);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
@ -470,7 +443,7 @@
|
||||||
function getServerOptions(token) {
|
function getServerOptions(token) {
|
||||||
/* Set token and returns server options */
|
/* Set token and returns server options */
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "discover/" + token,
|
url: "discover/" + token + '?include_cloud=false',
|
||||||
success: function (result) {
|
success: function (result) {
|
||||||
$('#pms_ip').html("")
|
$('#pms_ip').html("")
|
||||||
// Add all servers to the "combobox"
|
// Add all servers to the "combobox"
|
||||||
|
|
|
@ -638,7 +638,7 @@ class PlexTV(object):
|
||||||
|
|
||||||
return server_times
|
return server_times
|
||||||
|
|
||||||
def discover(self):
|
def discover(self, include_cloud=True):
|
||||||
""" Query plex for all servers online. Returns the ones you own in a selectize format """
|
""" Query plex for all servers online. Returns the ones you own in a selectize format """
|
||||||
servers = self.get_plextv_resources(include_https=True, output_format='xml')
|
servers = self.get_plextv_resources(include_https=True, output_format='xml')
|
||||||
clean_servers = []
|
clean_servers = []
|
||||||
|
@ -661,6 +661,10 @@ class PlexTV(object):
|
||||||
if helpers.get_xml_attr(d, 'presence') == '1' and \
|
if helpers.get_xml_attr(d, 'presence') == '1' and \
|
||||||
helpers.get_xml_attr(d, 'owned') == '1' and \
|
helpers.get_xml_attr(d, 'owned') == '1' and \
|
||||||
helpers.get_xml_attr(d, 'provides') == 'server':
|
helpers.get_xml_attr(d, 'provides') == 'server':
|
||||||
|
|
||||||
|
if not include_cloud and helpers.get_xml_attr(d, 'platform').lower() == 'cloud':
|
||||||
|
continue
|
||||||
|
|
||||||
connections = d.getElementsByTagName('Connection')
|
connections = d.getElementsByTagName('Connection')
|
||||||
|
|
||||||
for c in connections:
|
for c in connections:
|
||||||
|
|
|
@ -93,13 +93,13 @@ def refresh_libraries():
|
||||||
plexpy.CONFIG.__setattr__('HOME_LIBRARY_CARDS', new_keys)
|
plexpy.CONFIG.__setattr__('HOME_LIBRARY_CARDS', new_keys)
|
||||||
plexpy.CONFIG.write()
|
plexpy.CONFIG.write()
|
||||||
|
|
||||||
if plexpy.CONFIG.UPDATE_SECTION_IDS == 1 or plexpy.CONFIG.UPDATE_SECTION_IDS == -1:
|
#if plexpy.CONFIG.UPDATE_SECTION_IDS == 1 or plexpy.CONFIG.UPDATE_SECTION_IDS == -1:
|
||||||
# Start library section_id update on it's own thread
|
# # Start library section_id update on it's own thread
|
||||||
threading.Thread(target=libraries.update_section_ids).start()
|
# threading.Thread(target=libraries.update_section_ids).start()
|
||||||
|
|
||||||
if plexpy.CONFIG.UPDATE_LABELS == 1 or plexpy.CONFIG.UPDATE_LABELS == -1:
|
#if plexpy.CONFIG.UPDATE_LABELS == 1 or plexpy.CONFIG.UPDATE_LABELS == -1:
|
||||||
# Start library labels update on it's own thread
|
# # Start library labels update on it's own thread
|
||||||
threading.Thread(target=libraries.update_labels).start()
|
# threading.Thread(target=libraries.update_labels).start()
|
||||||
|
|
||||||
logger.info(u"PlexPy Pmsconnect :: Libraries list refreshed.")
|
logger.info(u"PlexPy Pmsconnect :: Libraries list refreshed.")
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -131,7 +131,7 @@ class WebInterface(object):
|
||||||
@cherrypy.tools.json_out()
|
@cherrypy.tools.json_out()
|
||||||
@requireAuth(member_of("admin"))
|
@requireAuth(member_of("admin"))
|
||||||
@addtoapi("get_server_list")
|
@addtoapi("get_server_list")
|
||||||
def discover(self, token=None, **kwargs):
|
def discover(self, token=None, include_cloud=True, **kwargs):
|
||||||
""" Get all your servers that are published to Plex.tv.
|
""" Get all your servers that are published to Plex.tv.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -161,8 +161,10 @@ class WebInterface(object):
|
||||||
plexpy.CONFIG.__setattr__('PMS_TOKEN', token)
|
plexpy.CONFIG.__setattr__('PMS_TOKEN', token)
|
||||||
plexpy.CONFIG.write()
|
plexpy.CONFIG.write()
|
||||||
|
|
||||||
|
include_cloud = not (include_cloud == 'false')
|
||||||
|
|
||||||
plex_tv = plextv.PlexTV()
|
plex_tv = plextv.PlexTV()
|
||||||
servers = plex_tv.discover()
|
servers = plex_tv.discover(include_cloud=include_cloud)
|
||||||
|
|
||||||
if servers:
|
if servers:
|
||||||
return servers
|
return servers
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue