mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
update sync objects
This commit is contained in:
parent
f603085007
commit
ebe849f9b0
@ -12,7 +12,7 @@
|
||||
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
|
||||
<a href="#" data-role="button" class="ui-btn-active">${TabDevices}</a>
|
||||
<a href="devicesupload.html" data-role="button">${TabCameraUpload}</a>
|
||||
<!--<a href="dashboardsync.html" data-role="button">${TabSync}</a>-->
|
||||
<a href="dashboardsync.html" data-role="button">${TabSync}</a>
|
||||
</div>
|
||||
|
||||
<div class="readOnlyContent">
|
||||
|
@ -27,6 +27,7 @@
|
||||
<div class="selectionCommandsControlGroup">
|
||||
<button class="btnAddToPlaylist" data-mini="true" data-icon="plus" data-inline="true" title="${ButtonAddToPlaylist}">${ButtonAddToPlaylist}</button>
|
||||
<button class="btnMergeVersions" data-mini="true" data-icon="recycle" data-inline="true" title="${ButtonGroupVersions}">${ButtonGroupVersions}</button>
|
||||
<button class="btnSyncItems" data-mini="true" data-icon="refresh" data-inline="true" title="${ButtonSync}">${ButtonSync}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -29,6 +29,7 @@
|
||||
<button class="btnAddToPlaylist" data-mini="true" data-icon="plus" data-inline="true" title="${ButtonAddToPlaylist}">${ButtonAddToPlaylist}</button>
|
||||
<button class="btnMergeVersions" data-mini="true" data-icon="recycle" data-inline="true" title="${ButtonGroupVersions}">${ButtonGroupVersions}</button>
|
||||
<button class="btnAddToCollection" data-mini="true" data-icon="plus" data-inline="true" title="${ButtonAddToCollection}">${ButtonAddToCollection}</button>
|
||||
<button class="btnSyncItems" data-mini="true" data-icon="refresh" data-inline="true" title="${ButtonSync}">${ButtonSync}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -22,8 +22,9 @@
|
||||
<div class="listTopPaging">
|
||||
</div>
|
||||
<div class="selectionCommands" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="selectionCommandsControlGroup">
|
||||
<div class="selectionCommandsControlGroup">
|
||||
<button class="btnAddToPlaylist" data-mini="true" data-icon="plus" data-inline="true" title="${ButtonAddToPlaylist}">${ButtonAddToPlaylist}</button>
|
||||
<button class="btnSyncItems" data-mini="true" data-icon="refresh" data-inline="true" title="${ButtonSync}">${ButtonSync}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -21,8 +21,9 @@
|
||||
<div class="listTopPaging">
|
||||
</div>
|
||||
<div class="selectionCommands" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="selectionCommandsControlGroup">
|
||||
<div class="selectionCommandsControlGroup">
|
||||
<button class="btnAddToPlaylist" data-mini="true" data-icon="plus" data-inline="true" title="${ButtonAddToPlaylist}">${ButtonAddToPlaylist}</button>
|
||||
<button class="btnSyncItems" data-mini="true" data-icon="refresh" data-inline="true" title="${ButtonSync}">${ButtonSync}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -22,8 +22,9 @@
|
||||
<div class="listTopPaging">
|
||||
</div>
|
||||
<div class="selectionCommands" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="selectionCommandsControlGroup">
|
||||
<div class="selectionCommandsControlGroup">
|
||||
<button class="btnAddToPlaylist" data-mini="true" data-icon="plus" data-inline="true" title="${ButtonAddToPlaylist}">${ButtonAddToPlaylist}</button>
|
||||
<button class="btnSyncItems" data-mini="true" data-icon="refresh" data-inline="true" title="${ButtonSync}">${ButtonSync}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -19,8 +19,9 @@
|
||||
<div class="listTopPaging">
|
||||
</div>
|
||||
<div class="selectionCommands" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="selectionCommandsControlGroup">
|
||||
<div class="selectionCommandsControlGroup">
|
||||
<button class="btnAddToPlaylist" data-mini="true" data-icon="plus" data-inline="true" title="${ButtonAddToPlaylist}">${ButtonAddToPlaylist}</button>
|
||||
<button class="btnSyncItems" data-mini="true" data-icon="refresh" data-inline="true" title="${ButtonSync}">${ButtonSync}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
SortBy: "",
|
||||
SortOrder: "Ascending",
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||
StartIndex: 0
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,33 @@
|
||||
(function () {
|
||||
|
||||
function cancelJob(page, id) {
|
||||
|
||||
$('.jobMenu', page).on("popupafterclose.deleteuser", function () {
|
||||
|
||||
$(this).off('popupafterclose.deleteuser');
|
||||
|
||||
var msg = Globalize.translate('CancelSyncJobConfirmation');
|
||||
|
||||
Dashboard.confirm(msg, Globalize.translate('HeaderCancelSyncJob'), function (result) {
|
||||
|
||||
if (result) {
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.ajax({
|
||||
|
||||
url: ApiClient.getUrl('Sync/Jobs/' + id),
|
||||
type: 'DELETE'
|
||||
|
||||
}).done(function () {
|
||||
|
||||
reloadData(page);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}).popup('close');
|
||||
}
|
||||
|
||||
function getSyncTargetName(targets, id) {
|
||||
|
||||
var target = targets.filter(function (t) {
|
||||
@ -14,7 +42,7 @@
|
||||
|
||||
var html = '';
|
||||
|
||||
html += "<div class='card squareCard'>";
|
||||
html += "<div class='card homePageSquareCard' data-id='" + job.Id + "'>";
|
||||
|
||||
html += '<div class="cardBox visualCardBox">';
|
||||
html += '<div class="cardScalable">';
|
||||
@ -24,6 +52,7 @@
|
||||
html += '<div class="cardContent">';
|
||||
|
||||
var imgUrl;
|
||||
var style = '';
|
||||
|
||||
if (job.PrimaryImageItemId) {
|
||||
imgUrl = ApiClient.getScaledImageUrl(job.PrimaryImageItemId, {
|
||||
@ -31,18 +60,27 @@
|
||||
width: 400,
|
||||
tag: job.PrimaryImageTag
|
||||
});
|
||||
} else {
|
||||
style = "background-color:#38c;background-position:center center;";
|
||||
imgUrl = "css/images/items/detail/video.png";
|
||||
}
|
||||
|
||||
if (imgUrl) {
|
||||
html += '<div class="cardImage coveredCardImage lazy" data-src="' + imgUrl + '">';
|
||||
html += '<div class="cardImage coveredCardImage lazy" data-src="' + imgUrl + '" style="' + style + '">';
|
||||
|
||||
if (job.Progress) {
|
||||
html += '<div class="cardFooter">';
|
||||
html += "<div class='cardText cardProgress'>";
|
||||
html += '<progress class="itemProgressBar" min="0" max="100" value="' + job.Progress + '"></progress>';
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
html += "</div>";
|
||||
|
||||
if (job.Status == 'Completed') {
|
||||
html += '<div class="playedIndicator"><div class="ui-icon-check ui-btn-icon-notext"></div></div>';
|
||||
}
|
||||
else if (job.Status == 'Queued') {
|
||||
html += '<div class="playedIndicator" style="background-color:#38c;"><div class="ui-icon-clock ui-btn-icon-notext"></div></div>';
|
||||
}
|
||||
else if (job.Status == 'Transcoding' || job.Status == 'Transferring') {
|
||||
html += '<div class="playedIndicator"><div class="ui-icon-refresh ui-btn-icon-notext"></div></div>';
|
||||
@ -51,7 +89,7 @@
|
||||
html += '<div class="playedIndicator" style="background-color:#FF6A00;"><div class="ui-icon-minus ui-btn-icon-notext"></div></div>';
|
||||
}
|
||||
else if (job.Status == 'TranscodingFailed') {
|
||||
html += '<div class="playedIndicator" style="background-color:#cc0000;"><div class="ui-icon-delete ui-btn-icon-notext"></div></div>';
|
||||
html += '<div class="playedIndicator" style="background-color:#cc0000;"><div class="ui-icon-alert ui-btn-icon-notext"></div></div>';
|
||||
}
|
||||
|
||||
// cardContent
|
||||
@ -80,37 +118,16 @@
|
||||
textLines.push(' ');
|
||||
}
|
||||
|
||||
html += '<div class="cardText" style="text-align:right; position:absolute; bottom:5px; right: 5px;">';
|
||||
html += '<button class="btnJobMenu" type="button" data-inline="true" data-iconpos="notext" data-icon="ellipsis-v" style="margin: 0 0 0;"></button>';
|
||||
html += "</div>";
|
||||
|
||||
for (var i = 0, length = textLines.length; i < length; i++) {
|
||||
html += "<div class='cardText'>";
|
||||
html += "<div class='cardText' style='margin-right:30px;'>";
|
||||
html += textLines[i];
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
//if (!plugin.isExternal) {
|
||||
// html += "<div class='cardText packageReviewText'>";
|
||||
// html += plugin.price > 0 ? "$" + plugin.price.toFixed(2) : Globalize.translate('LabelFree');
|
||||
// html += RatingHelpers.getStoreRatingHtml(plugin.avgRating, plugin.id, plugin.name);
|
||||
|
||||
// html += "<span class='storeReviewCount'>";
|
||||
// html += " " + Globalize.translate('LabelNumberReviews').replace("{0}", plugin.totalRatings);
|
||||
// html += "</span>";
|
||||
|
||||
// html += "</div>";
|
||||
//}
|
||||
|
||||
//var installedPlugin = plugin.isApp ? null : installedPlugins.filter(function (ip) {
|
||||
// return ip.Name == plugin.name;
|
||||
//})[0];
|
||||
|
||||
//html += "<div class='cardText'>";
|
||||
|
||||
//if (installedPlugin) {
|
||||
// html += Globalize.translate('LabelVersionInstalled').replace("{0}", installedPlugin.Version);
|
||||
//} else {
|
||||
// html += ' ';
|
||||
//}
|
||||
//html += "</div>";
|
||||
|
||||
// cardFooter
|
||||
html += "</div>";
|
||||
|
||||
@ -142,15 +159,49 @@
|
||||
html += getSyncJobHtml(job);
|
||||
}
|
||||
|
||||
$('.syncActivity', page).html(html).trigger('create');
|
||||
var elem = $('.syncActivity', page).html(html).trigger('create');
|
||||
|
||||
$('.btnJobMenu', elem).on('click', function () {
|
||||
showJobMenu(this);
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pageshow', "#dashboardSyncPage", function () {
|
||||
function showJobMenu(elem) {
|
||||
|
||||
var card = $(elem).parents('.card');
|
||||
var page = $(elem).parents('.page');
|
||||
var id = card.attr('data-id');
|
||||
|
||||
$('.jobMenu', page).popup("close").remove();
|
||||
|
||||
var html = '<div data-role="popup" class="jobMenu tapHoldMenu" data-theme="a">';
|
||||
|
||||
html += '<ul data-role="listview" style="min-width: 180px;">';
|
||||
html += '<li data-role="list-divider">' + Globalize.translate('HeaderMenu') + '</li>';
|
||||
|
||||
html += '<li data-icon="delete"><a href="#" class="btnCancelJob" data-id="' + id + '">' + Globalize.translate('ButtonCancel') + '</a></li>';
|
||||
|
||||
html += '</ul>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
page.append(html);
|
||||
|
||||
var flyout = $('.jobMenu', page).popup({ positionTo: elem || "window" }).trigger('create').popup("open").on("popupafterclose", function () {
|
||||
|
||||
$(this).off("popupafterclose").remove();
|
||||
|
||||
});
|
||||
|
||||
$('.btnCancelJob', flyout).on('click', function () {
|
||||
cancelJob(page, this.getAttribute('data-id'));
|
||||
});
|
||||
}
|
||||
|
||||
function reloadData(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var page = this;
|
||||
|
||||
var promise1 = ApiClient.getJSON(ApiClient.getUrl('Sync/Jobs'));
|
||||
|
||||
var promise2 = ApiClient.getJSON(ApiClient.getUrl('Sync/Targets'));
|
||||
@ -162,6 +213,13 @@
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pageshow', "#dashboardSyncPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
reloadData(page);
|
||||
|
||||
}).on('pageinit', "#dashboardSyncPage", function () {
|
||||
|
||||
|
@ -77,7 +77,11 @@
|
||||
function loadData(page) {
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.getJSON(ApiClient.getUrl('Devices')).done(function (devices) {
|
||||
ApiClient.getJSON(ApiClient.getUrl('Devices', {
|
||||
|
||||
SupportsDeviceId: true
|
||||
|
||||
})).done(function (devices) {
|
||||
|
||||
load(page, devices);
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "Episode",
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,MediaSourceCount,IsUnidentified,UserData",
|
||||
Fields: "PrimaryImageAspectRatio,MediaSourceCount,IsUnidentified,UserData,SyncInfo",
|
||||
StartIndex: 0,
|
||||
IsMissing: false,
|
||||
IsVirtualUnaired: false,
|
||||
|
@ -24,7 +24,7 @@
|
||||
Filters: "IsFavorite",
|
||||
Limit: screenWidth >= 1920 ? 10 : (screenWidth >= 1440 ? 8 : 6),
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||
CollapseBoxSetItems: false,
|
||||
ExcludeLocationTypes: "Virtual"
|
||||
};
|
||||
|
@ -126,7 +126,7 @@
|
||||
var options = {
|
||||
|
||||
Limit: 24,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||
IsPlayed: false
|
||||
};
|
||||
|
||||
@ -163,7 +163,7 @@
|
||||
var options = {
|
||||
|
||||
Limit: screenWidth >= 2400 ? 10 : (screenWidth >= 1600 ? 10 : (screenWidth >= 1440 ? 8 : (screenWidth >= 800 ? 7 : 6))),
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||
Filters: "IsUnplayed",
|
||||
UserId: userId
|
||||
};
|
||||
@ -279,7 +279,7 @@
|
||||
Filters: "IsResumable",
|
||||
Limit: screenWidth >= 1920 ? 10 : (screenWidth >= 1600 ? 8 : (screenWidth >= 1200 ? 9 : 6)),
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||
CollapseBoxSetItems: false,
|
||||
ExcludeLocationTypes: "Virtual"
|
||||
};
|
||||
@ -355,7 +355,7 @@
|
||||
var options = {
|
||||
|
||||
Limit: screenWidth >= 1600 ? 6 : (screenWidth >= 1440 ? 5 : (screenWidth >= 800 ? 6 : 6)),
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||
Filters: "IsUnplayed",
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
ChannelIds: channel.Id
|
||||
|
@ -596,7 +596,7 @@
|
||||
var options = {
|
||||
userId: Dashboard.getCurrentUserId(),
|
||||
limit: 5,
|
||||
fields: "PrimaryImageAspectRatio,UserData"
|
||||
fields: "PrimaryImageAspectRatio,UserData,SyncInfo"
|
||||
};
|
||||
|
||||
if (item.Type == "Movie") {
|
||||
@ -722,7 +722,7 @@
|
||||
|
||||
_childrenItemsQuery = null;
|
||||
|
||||
var fields = "ItemCounts,AudioInfo,PrimaryImageAspectRatio";
|
||||
var fields = "ItemCounts,AudioInfo,PrimaryImageAspectRatio,SyncInfo";
|
||||
|
||||
var query = {
|
||||
ParentId: item.Id,
|
||||
@ -1069,7 +1069,7 @@
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "MusicVideo",
|
||||
Recursive: true,
|
||||
Fields: "DateCreated",
|
||||
Fields: "DateCreated,SyncInfo",
|
||||
Albums: item.Name
|
||||
|
||||
}).done(function (result) {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
SortBy: "SortName",
|
||||
SortOrder: "Ascending",
|
||||
Fields: "DateCreated,PrimaryImageAspectRatio,MediaSourceCount",
|
||||
Fields: "DateCreated,PrimaryImageAspectRatio,MediaSourceCount,SyncInfo",
|
||||
StartIndex: 0,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
|
@ -26,11 +26,7 @@
|
||||
// Chrome seems to have virtualization built-in and can handle large lists easily
|
||||
var isChrome = $.browser.chrome;
|
||||
|
||||
if (getWindowUrl().toString().toLowerCase().indexOf('localhost') != -1) {
|
||||
return isChrome ? 200 : 100;
|
||||
}
|
||||
|
||||
return isChrome ? 100 : 50;
|
||||
return isChrome ? 200 : 100;
|
||||
},
|
||||
|
||||
getDefaultItemsView: function (view, mobileView) {
|
||||
@ -345,6 +341,10 @@
|
||||
|
||||
commands.push('refresh');
|
||||
|
||||
if (SyncManager.isAvailable(item)) {
|
||||
commands.push('sync');
|
||||
}
|
||||
|
||||
return commands;
|
||||
},
|
||||
|
||||
@ -924,6 +924,10 @@
|
||||
itemCommands.push('delete');
|
||||
}
|
||||
|
||||
if (SyncManager.isAvailable(item)) {
|
||||
itemCommands.push('sync');
|
||||
}
|
||||
|
||||
return itemCommands;
|
||||
},
|
||||
|
||||
|
@ -245,6 +245,20 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
function onSyncButtonClick() {
|
||||
|
||||
var id = this.getAttribute('data-itemid');
|
||||
|
||||
closeContextMenu();
|
||||
|
||||
ApiClient.getItem(Dashboard.getCurrentUserId(), id).done(function (item) {
|
||||
|
||||
SyncManager.showMenu([item]);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onExternalPlayerButtonClick() {
|
||||
|
||||
closeContextMenu();
|
||||
@ -409,6 +423,10 @@
|
||||
html += '<li data-icon="delete"><a href="#" class="btnRemoveFromPlaylist" data-playlistitemid="' + playlistItemId + '">' + Globalize.translate('ButtonRemoveFromPlaylist') + '</a></li>';
|
||||
}
|
||||
|
||||
if (commands.indexOf('sync') != -1) {
|
||||
html += '<li data-icon="refresh"><a href="#" class="btnSync" data-itemId="' + itemId + '">' + Globalize.translate('ButtonSync') + '</a></li>';
|
||||
}
|
||||
|
||||
if (commands.indexOf('delete') != -1) {
|
||||
html += '<li data-icon="delete"><a href="#" class="btnDelete" data-itemId="' + itemId + '">' + Globalize.translate('ButtonDelete') + '</a></li>';
|
||||
}
|
||||
@ -437,6 +455,7 @@
|
||||
$('.btnQueueAllFromHere', elem).on('click', onQueueAllFromHereButtonClick);
|
||||
$('.btnExternalPlayer', elem).on('click', onExternalPlayerButtonClick);
|
||||
$('.btnDelete', elem).on('click', onDeleteButtonClick);
|
||||
$('.btnSync', elem).on('click', onSyncButtonClick);
|
||||
});
|
||||
}
|
||||
|
||||
@ -710,6 +729,38 @@
|
||||
}).get();
|
||||
}
|
||||
|
||||
function sync(page) {
|
||||
|
||||
var selection = getSelectedItems(page);
|
||||
|
||||
if (selection.length < 1) {
|
||||
|
||||
Dashboard.alert({
|
||||
message: Globalize.translate('MessagePleaseSelectOneItem'),
|
||||
title: Globalize.translate('HeaderError')
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
ApiClient.getItems({
|
||||
|
||||
ids: selection.join(','),
|
||||
fields: 'SyncInfo',
|
||||
userId: Dashboard.getCurrentUserId()
|
||||
|
||||
}).done(function (result) {
|
||||
|
||||
SyncManager.showMenu(result.Items);
|
||||
|
||||
$(SyncManager).off('jobsubmit.librarylist').on('jobsubmit.librarylist', function () {
|
||||
|
||||
hideSelections(page);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function combineVersions(page) {
|
||||
|
||||
var selection = getSelectedItems(page);
|
||||
@ -850,6 +901,10 @@
|
||||
combineVersions(page);
|
||||
});
|
||||
|
||||
$('.btnSyncItems', page).on('click', function () {
|
||||
sync(page);
|
||||
});
|
||||
|
||||
$('.btnAddToCollection', page).on('click', function () {
|
||||
addToCollection(page);
|
||||
});
|
||||
|
@ -9,7 +9,7 @@
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "BoxSet",
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SortName",
|
||||
Fields: "PrimaryImageAspectRatio,SortName,SyncInfo",
|
||||
StartIndex: 0,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
|
@ -9,7 +9,7 @@
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "Movie",
|
||||
Recursive: true,
|
||||
Fields: "DateCreated",
|
||||
Fields: "DateCreated,SyncInfo",
|
||||
StartIndex: 0
|
||||
};
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "Movie",
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SortName,MediaSourceCount,IsUnidentified",
|
||||
Fields: "PrimaryImageAspectRatio,SortName,MediaSourceCount,IsUnidentified,SyncInfo",
|
||||
StartIndex: 0,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
IncludeItemTypes: "Movie",
|
||||
Limit: 30,
|
||||
Fields: "PrimaryImageAspectRatio,MediaSourceCount",
|
||||
Fields: "PrimaryImageAspectRatio,MediaSourceCount,SyncInfo",
|
||||
ParentId: parentId,
|
||||
IsPlayed: false,
|
||||
ImageTypeLimit: 1,
|
||||
|
@ -54,7 +54,7 @@
|
||||
Filters: "IsResumable",
|
||||
Limit: screenWidth >= 1920 ? 12 : (screenWidth >= 1600 ? 8 : (screenWidth >= 1200 ? 6 : 3)),
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,MediaSourceCount",
|
||||
Fields: "PrimaryImageAspectRatio,MediaSourceCount,SyncInfo",
|
||||
CollapseBoxSetItems: false,
|
||||
ParentId: parentId,
|
||||
ImageTypeLimit: 1,
|
||||
@ -86,7 +86,7 @@
|
||||
userId: Dashboard.getCurrentUserId(),
|
||||
categoryLimit: screenWidth >= 1200 ? 4 : 3,
|
||||
ItemLimit: screenWidth >= 1920 ? 10 : (screenWidth >= 1600 ? 7 : (screenWidth >= 1200 ? 7 : 7)),
|
||||
Fields: "PrimaryImageAspectRatio,MediaSourceCount",
|
||||
Fields: "PrimaryImageAspectRatio,MediaSourceCount,SyncInfo",
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
});
|
||||
|
@ -8,7 +8,7 @@
|
||||
SortBy: "SortName",
|
||||
SortOrder: "Ascending",
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SortName",
|
||||
Fields: "PrimaryImageAspectRatio,SortName,SyncInfo",
|
||||
StartIndex: 0,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
|
@ -10,7 +10,7 @@
|
||||
SortBy: "SortName",
|
||||
SortOrder: "Ascending",
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SortName,DateCreated",
|
||||
Fields: "PrimaryImageAspectRatio,SortName,DateCreated,SyncInfo",
|
||||
StartIndex: 0,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
|
@ -9,7 +9,7 @@
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "MusicAlbum",
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SortName",
|
||||
Fields: "PrimaryImageAspectRatio,SortName,SyncInfo",
|
||||
StartIndex: 0,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
|
@ -10,7 +10,7 @@
|
||||
SortBy: "SortName",
|
||||
SortOrder: "Ascending",
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SortName,DateCreated",
|
||||
Fields: "PrimaryImageAspectRatio,SortName,DateCreated,SyncInfo",
|
||||
StartIndex: 0,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
|
@ -7,7 +7,7 @@
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "Audio,MusicVideo",
|
||||
Recursive: true,
|
||||
Fields: "DateCreated",
|
||||
Fields: "DateCreated,SyncInfo",
|
||||
StartIndex: 0
|
||||
};
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
var options = {
|
||||
IncludeItemTypes: "Audio",
|
||||
Limit: screenWidth >= 1920 ? 24 : (screenWidth >= 1600 ? 21 : (screenWidth >= 1200 ? 21 : 12)),
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||
ParentId: parentId,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
@ -38,7 +38,7 @@
|
||||
IncludeItemTypes: "Audio",
|
||||
Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1600 ? 7 : (screenWidth >= 1200 ? 7 : 6)),
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,AudioInfo",
|
||||
Fields: "PrimaryImageAspectRatio,AudioInfo,SyncInfo",
|
||||
Filters: "IsPlayed",
|
||||
ParentId: parentId,
|
||||
ImageTypeLimit: 1,
|
||||
@ -72,7 +72,7 @@
|
||||
IncludeItemTypes: "Audio",
|
||||
Limit: screenWidth >= 1920 ? 16 : (screenWidth >= 1600 ? 14 : (screenWidth >= 1200 ? 14 : 12)),
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,AudioInfo",
|
||||
Fields: "PrimaryImageAspectRatio,AudioInfo,SyncInfo",
|
||||
Filters: "IsPlayed",
|
||||
ParentId: parentId,
|
||||
ImageTypeLimit: 1,
|
||||
|
@ -7,7 +7,7 @@
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "MusicVideo",
|
||||
Recursive: true,
|
||||
Fields: "DateCreated",
|
||||
Fields: "DateCreated,SyncInfo",
|
||||
StartIndex: 0
|
||||
};
|
||||
|
||||
|
@ -1257,7 +1257,8 @@ var Dashboard = {
|
||||
var capabilities = {
|
||||
PlayableMediaTypes: "Audio,Video",
|
||||
|
||||
SupportedCommands: Dashboard.getSupportedRemoteCommands().join(',')
|
||||
SupportedCommands: Dashboard.getSupportedRemoteCommands().join(','),
|
||||
SupportsDeviceId: false
|
||||
};
|
||||
|
||||
window.ConnectionManager = new MediaBrowser.ConnectionManager(credentialProvider, appName, appVersion, deviceName, deviceId, capabilities);
|
||||
|
@ -9,7 +9,7 @@
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "Audio",
|
||||
Recursive: true,
|
||||
Fields: "AudioInfo,ParentId",
|
||||
Fields: "AudioInfo,ParentId,SyncInfo",
|
||||
Limit: 200,
|
||||
StartIndex: 0,
|
||||
ImageTypeLimit: 1,
|
||||
|
@ -23,7 +23,9 @@
|
||||
return i.Id;
|
||||
}).join(','),
|
||||
|
||||
Quality: $('.radioSyncQuality', form)[0].getAttribute('data-value')
|
||||
Quality: $('.radioSyncQuality', form)[0].getAttribute('data-value'),
|
||||
|
||||
Name: $('#txtSyncJobName', form).val()
|
||||
};
|
||||
|
||||
ApiClient.ajax({
|
||||
@ -35,6 +37,8 @@
|
||||
|
||||
}).done(function () {
|
||||
|
||||
$('.syncPanel').panel('close');
|
||||
$(window.SyncManager).trigger('jobsubmit');
|
||||
});
|
||||
}
|
||||
|
||||
@ -51,19 +55,32 @@
|
||||
var html = '<div data-role="panel" data-position="right" data-display="overlay" class="syncPanel" data-position-fixed="true" data-theme="a">';
|
||||
|
||||
html += '<div>';
|
||||
html += '<h1 style="margin-top:.5em;">Sync Media</h1>';
|
||||
html += '<h1 style="margin-top:.5em;">' + Globalize.translate('SyncMedia') + '</h1>';
|
||||
|
||||
html += '<form class="formSubmitSyncRequest">';
|
||||
|
||||
if (items.length > 1) {
|
||||
|
||||
html += '<p>';
|
||||
html += '<label for="txtSyncJobName">Sync job name:</label>';
|
||||
html += '<input type="text" id="txtSyncJobName" class="txtSyncJobName" required="required" />';
|
||||
html += '</p>';
|
||||
}
|
||||
|
||||
html += '<div>';
|
||||
html += '<fieldset data-role="controlgroup">';
|
||||
html += '<legend>Sync to:</legend>';
|
||||
|
||||
var index = 0;
|
||||
|
||||
html += targets.map(function (t) {
|
||||
|
||||
var targetHtml = '<label for="radioSync' + t.Id + '">' + t.Name + '</label>';
|
||||
targetHtml += '<input class="radioSync" data-targetid="' + t.Id + '" type="radio" id="radioSync' + t.Id + '" />';
|
||||
|
||||
var checkedHtml = index ? '' : ' checked="checked"';
|
||||
targetHtml += '<input class="radioSync" data-targetid="' + t.Id + '" type="radio" id="radioSync' + t.Id + '"' + checkedHtml + ' />';
|
||||
|
||||
index++;
|
||||
return targetHtml;
|
||||
|
||||
}).join('');
|
||||
@ -110,7 +127,7 @@
|
||||
|
||||
function isAvailable(item, user) {
|
||||
|
||||
return false;
|
||||
//return false;
|
||||
return item.SupportsSync;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
IncludeItemTypes: "Episode",
|
||||
Limit: 30,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||
ParentId: parentId,
|
||||
IsPlayed: false,
|
||||
ImageTypeLimit: 1,
|
||||
|
@ -5,7 +5,7 @@
|
||||
var query = {
|
||||
|
||||
Limit: 24,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated",
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated,SyncInfo",
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
ExcludeLocationTypes: "Virtual",
|
||||
ImageTypeLimit: 1,
|
||||
@ -40,7 +40,7 @@
|
||||
var query = {
|
||||
|
||||
Limit: 24,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated",
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated,SyncInfo",
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
ExcludeLocationTypes: "Virtual",
|
||||
ImageTypeLimit: 1,
|
||||
@ -101,7 +101,7 @@
|
||||
Filters: "IsResumable",
|
||||
Limit: screenWidth >= 1920 ? 6 : (screenWidth >= 1200 ? 6 : 4),
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData",
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData,SyncInfo",
|
||||
ExcludeLocationTypes: "Virtual",
|
||||
ParentId: parentId,
|
||||
ImageTypeLimit: 1,
|
||||
|
@ -9,7 +9,7 @@
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "Series",
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SortName",
|
||||
Fields: "PrimaryImageAspectRatio,SortName,SyncInfo",
|
||||
StartIndex: 0,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
|
@ -7,7 +7,7 @@
|
||||
var query = {
|
||||
|
||||
Limit: 40,
|
||||
Fields: "SeriesInfo,UserData,SeriesStudio",
|
||||
Fields: "SeriesInfo,UserData,SeriesStudio,SyncInfo",
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
|
@ -59,7 +59,7 @@
|
||||
|
||||
$('.userMenu', page).popup("close").remove();
|
||||
|
||||
var html = '<div data-role="popup" class="userMenu" data-theme="a">';
|
||||
var html = '<div data-role="popup" class="userMenu tapHoldMenu" data-theme="a">';
|
||||
|
||||
html += '<ul data-role="listview" style="min-width: 180px;">';
|
||||
html += '<li data-role="list-divider">' + Globalize.translate('HeaderMenu') + '</li>';
|
||||
@ -201,7 +201,7 @@
|
||||
|
||||
$('.userMenu', page).popup("close").remove();
|
||||
|
||||
var html = '<div data-role="popup" class="userMenu" data-theme="a">';
|
||||
var html = '<div data-role="popup" class="userMenu tapHoldMenu" data-theme="a">';
|
||||
|
||||
html += '<ul data-role="listview" style="min-width: 180px;">';
|
||||
html += '<li data-role="list-divider">' + Globalize.translate('HeaderMenu') + '</li>';
|
||||
|
Loading…
Reference in New Issue
Block a user