Allow info pages to be pulled from the db instead of the Plex Server, useful for media that has been deleted.

Fix home stats user link if user has no id.
Fix bug in PlexWatch import script which switched around the episode and show titles.
This commit is contained in:
Tim 2015-07-25 12:40:38 +02:00
parent 187f9d7cd4
commit 7d9934e4b6
11 changed files with 137 additions and 64 deletions

View file

@ -87,11 +87,11 @@ history_table_options = {
if (rowData['video_decision'] === 'transcode') {
transcode_dec = '<i class="fa fa-server"></i>&nbsp';
}
$(td).html('<div><div style="float: left;"><a href="info?rating_key=' + rowData['rating_key'] + '">' + cellData + '</a></div><div style="float: right; text-align: right; padding-right: 5px;">' + transcode_dec + '<i class="fa fa-video-camera"></i></div></div>');
$(td).html('<div><div style="float: left;"><a href="info?source=history&item_id=' + rowData['id'] + '">' + cellData + '</a></div><div style="float: right; text-align: right; padding-right: 5px;">' + transcode_dec + '<i class="fa fa-video-camera"></i></div></div>');
} else if (rowData['media_type'] === 'track') {
$(td).html('<div><div style="float: left;">' + cellData + '</div><div style="float: right; text-align: right; padding-right: 5px;"><i class="fa fa-music"></i></div></div>');
} else {
$(td).html('<a href="info?rating_key=' + rowData['rating_key'] + '">' + cellData + '</a>');
$(td).html('<a href="info?item_id=' + rowData['id'] + '">' + cellData + '</a>');
}
}
}

View file

@ -44,7 +44,7 @@ sync_table_options = {
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData !== '') {
if (rowData['metadata_type'] !== 'track') {
$(td).html('<a href="info?rating_key=' + rowData['rating_key'] + '">' + cellData + '</a>');
$(td).html('<a href="info?item_id=' + rowData['rating_key'] + '">' + cellData + '</a>');
} else {
$(td).html(cellData);
}