mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Import Plexivity database
This commit is contained in:
parent
6aa786698e
commit
4311d12603
8 changed files with 536 additions and 55 deletions
|
@ -2,11 +2,18 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
||||
<h4 class="modal-title">Import PlexWatch Database</h4>
|
||||
<h4 class="modal-title">Import ${app} Database</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="modal-text">
|
||||
<p class="help-block">
|
||||
Please ensure your PlexWatch database is at version 0.3.2 or higher.
|
||||
<%
|
||||
v = ''
|
||||
if app == 'PlexWatch':
|
||||
v = '0.3.2'
|
||||
elif app == 'Plexivity':
|
||||
v = '0.9.8'
|
||||
%>
|
||||
<strong>Please ensure your ${app} database is at version ${v} or higher.</strong>
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<label for="db_location">Database Location</label>
|
||||
|
@ -15,7 +22,7 @@
|
|||
<input type="text" class="form-control" id="db_location" name="db_location" value="" required>
|
||||
</div>
|
||||
</div>
|
||||
<p class="help-block">Enter the path and file name for the PlexWatch database you wish to import.</p>
|
||||
<p class="help-block">Enter the path and file name for the ${app} database you wish to import.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="table_name">Table Name</label>
|
||||
|
@ -41,7 +48,7 @@
|
|||
</div>
|
||||
<div class="modal-footer">
|
||||
<div>
|
||||
<span id="status-message"></span>
|
||||
<span id="status-message" style="padding-right: 25px;"></span>
|
||||
<input type="button" id="import_db" class="btn btn-bright" value="Import">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -54,8 +61,13 @@
|
|||
var table_name = $("#table_name").val();
|
||||
var import_ignore_interval = $("#import_ignore_interval").val();
|
||||
$.ajax({
|
||||
url: 'get_plexwatch_export_data',
|
||||
data: {database_path: database_path, table_name:table_name, import_ignore_interval:import_ignore_interval},
|
||||
url: 'import_database',
|
||||
data: {
|
||||
app: "${app}",
|
||||
database_path: database_path,
|
||||
table_name: table_name,
|
||||
import_ignore_interval: import_ignore_interval
|
||||
},
|
||||
cache: false,
|
||||
async: true,
|
||||
success: function(data) {
|
|
@ -755,9 +755,13 @@
|
|||
</div>
|
||||
|
||||
<div class="padded-header">
|
||||
<h3>PlexWatch Import Tool</h3>
|
||||
<h3>Database Import Tool</h3>
|
||||
</div>
|
||||
<p class="help-block">Click a button below to import an exisiting database from another app.</p>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-form toggle-app-import-modal" type="button" data-target="#app-import-modal" data-toggle="modal" data-app="plexwatch">PlexWatch</button>
|
||||
<button class="btn btn-form toggle-app-import-modal" type="button" data-target="#app-import-modal" data-toggle="modal" data-app="plexivity">Plexivity</button>
|
||||
</div>
|
||||
<p class="help-block"><a href="javascript:void(0)" id="toggle-plexwatch-import-modal" data-target="#plexwatch-import-modal" data-toggle="modal">Click here to Import an existing Plexwatch database.</a></p>
|
||||
|
||||
<p><input type="button" class="btn btn-bright save-button" value="Save" data-success="Changes saved successfully"></p>
|
||||
</div>
|
||||
|
@ -1532,7 +1536,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="plexwatch-import-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="plexwatch-import-modal"></div>
|
||||
<div id="app-import-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="app-import-modal"></div>
|
||||
<div id="notification-config-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="notification-config-modal"></div>
|
||||
<div id="notification-triggers-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="notification-triggers-modal"></div>
|
||||
<div id="notify-text-sub-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="notify-text-sub-modal">
|
||||
|
@ -2305,14 +2309,15 @@ $(document).ready(function() {
|
|||
}
|
||||
});
|
||||
|
||||
// Load PlexWatch import modal
|
||||
$("#toggle-plexwatch-import-modal").click(function() {
|
||||
// Load database import modal
|
||||
$(".toggle-app-import-modal").click(function() {
|
||||
$.ajax({
|
||||
url: 'plexwatch_import',
|
||||
url: 'import_database_tool',
|
||||
data: { app: $(this).data('app') },
|
||||
cache: false,
|
||||
async: true,
|
||||
complete: function(xhr, status) {
|
||||
$("#plexwatch-import-modal").html(xhr.responseText);
|
||||
$("#app-import-modal").html(xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -141,11 +141,11 @@
|
|||
</div>
|
||||
|
||||
<div class="wizard-card" data-cardname="card6">
|
||||
<h3>PlexWatch Import</h3>
|
||||
<p class="help-block">If you have an existing PlexWatch database, you can import the data into PlexPy.</p>
|
||||
<h3>PlexWatch/Plexivity 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">
|
||||
When you complete this wizard navigate to the settings menu and to the Extra Settings tab. You will find an import tool there
|
||||
which will convert your plexWatch database into a format that PlexPy can read.
|
||||
which will convert your PlexWatch/Plexivity database into a format that PlexPy can read.
|
||||
</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>
|
||||
|
@ -468,25 +468,25 @@
|
|||
});
|
||||
|
||||
// Send database path to import script
|
||||
$("#plexwatch-import").click(function() {
|
||||
var database_path = $("#db_location").val();
|
||||
var table_name = 'processed';
|
||||
var import_ignore_interval = 0;
|
||||
$.ajax({
|
||||
url: 'get_plexwatch_export_data',
|
||||
data: {database_path: database_path, table_name:table_name, import_ignore_interval:import_ignore_interval},
|
||||
cache: false,
|
||||
async: true,
|
||||
success: function(data) {
|
||||
if (data === 'Import has started. Check the PlexPy logs to monitor any problems.') {
|
||||
$("#plexwatch-import-status").html('Started');
|
||||
} else {
|
||||
$("#plexwatch-import-status").html(data);
|
||||
}
|
||||
$("#db_location").val('')
|
||||
}
|
||||
});
|
||||
});
|
||||
//$("#plexwatch-import").click(function() {
|
||||
// var database_path = $("#db_location").val();
|
||||
// var table_name = 'processed';
|
||||
// var import_ignore_interval = 0;
|
||||
// $.ajax({
|
||||
// url: 'get_plexwatch_export_data',
|
||||
// data: {database_path: database_path, table_name:table_name, import_ignore_interval:import_ignore_interval},
|
||||
// cache: false,
|
||||
// async: true,
|
||||
// success: function(data) {
|
||||
// if (data === 'Import has started. Check the PlexPy logs to monitor any problems.') {
|
||||
// $("#plexwatch-import-status").html('Started');
|
||||
// } else {
|
||||
// $("#plexwatch-import-status").html(data);
|
||||
// }
|
||||
// $("#db_location").val('')
|
||||
// }
|
||||
// });
|
||||
//});
|
||||
|
||||
function getServerOptions(token) {
|
||||
/* Set token and returns server options */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue