mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
some initial work on cloud sync
This commit is contained in:
parent
9c599a3c5c
commit
855e683137
3 changed files with 22 additions and 23 deletions
|
@ -52,7 +52,6 @@
|
||||||
<a href="http://mediabrowser.tv/download" target="_blank">${PleaseUpdateManually}</a>
|
<a href="http://mediabrowser.tv/download" target="_blank">${PleaseUpdateManually}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="updateFail" style="color: #cc0000; display: none;">${ErrorConnectingToMediaBrowserRepository}</div>
|
|
||||||
<p id="ports"></p>
|
<p id="ports"></p>
|
||||||
<div id="pPluginUpdates"></div>
|
<div id="pPluginUpdates"></div>
|
||||||
|
|
||||||
|
|
|
@ -809,8 +809,6 @@
|
||||||
|
|
||||||
renderHasPendingRestart: function (page, hasPendingRestart) {
|
renderHasPendingRestart: function (page, hasPendingRestart) {
|
||||||
|
|
||||||
$('#updateFail', page).hide();
|
|
||||||
|
|
||||||
if (!hasPendingRestart) {
|
if (!hasPendingRestart) {
|
||||||
|
|
||||||
// Only check once every 30 mins
|
// Only check once every 30 mins
|
||||||
|
@ -835,10 +833,6 @@
|
||||||
$('#newVersionNumber', page).html(Globalize.translate('VersionXIsAvailableForDownload').replace('{0}', version.versionStr));
|
$('#newVersionNumber', page).html(Globalize.translate('VersionXIsAvailableForDownload').replace('{0}', version.versionStr));
|
||||||
}
|
}
|
||||||
|
|
||||||
}).fail(function () {
|
|
||||||
|
|
||||||
$('#updateFail', page).show();
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -908,10 +902,6 @@
|
||||||
|
|
||||||
elem.html(html).trigger('create');
|
elem.html(html).trigger('create');
|
||||||
|
|
||||||
}).fail(function () {
|
|
||||||
|
|
||||||
$('#updateFail', page).show();
|
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,24 @@
|
||||||
return 'playlists' + (query.ParentId || '');
|
return 'playlists' + (query.ParentId || '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getItemsFunction(itemsQuery) {
|
||||||
|
|
||||||
|
itemsQuery = $.extend({}, itemsQuery);
|
||||||
|
|
||||||
|
return function (index, limit, fields) {
|
||||||
|
|
||||||
|
itemsQuery.StartIndex = index;
|
||||||
|
itemsQuery.Limit = limit;
|
||||||
|
itemsQuery.Fields = fields;
|
||||||
|
|
||||||
|
return ApiClient.getItems(Dashboard.getCurrentUserId(), itemsQuery);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var _childrenItemsFunction = null;
|
||||||
|
|
||||||
function reloadItems(page) {
|
function reloadItems(page) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
@ -34,6 +52,8 @@
|
||||||
var user = response2[0];
|
var user = response2[0];
|
||||||
var item = response3[0];
|
var item = response3[0];
|
||||||
|
|
||||||
|
_childrenItemsFunction = getItemsFunction(query);
|
||||||
|
|
||||||
currentItem = item;
|
currentItem = item;
|
||||||
|
|
||||||
if (MediaController.canPlay(item)) {
|
if (MediaController.canPlay(item)) {
|
||||||
|
@ -184,21 +204,11 @@
|
||||||
|
|
||||||
}).on('playallfromhere', function (e, index) {
|
}).on('playallfromhere', function (e, index) {
|
||||||
|
|
||||||
LibraryBrowser.playAllFromHere({
|
LibraryBrowser.playAllFromHere(_childrenItemsFunction, index);
|
||||||
|
|
||||||
Recursive: true,
|
|
||||||
ParentId: query.ParentId
|
|
||||||
|
|
||||||
}, index);
|
|
||||||
|
|
||||||
}).on('queueallfromhere', function (e, index) {
|
}).on('queueallfromhere', function (e, index) {
|
||||||
|
|
||||||
LibraryBrowser.queueAllFromHere({
|
LibraryBrowser.queueAllFromHere(_childrenItemsFunction, index);
|
||||||
|
|
||||||
Recursive: true,
|
|
||||||
ParentId: query.ParentId
|
|
||||||
|
|
||||||
}, index);
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue