2015-06-02 22:30:14 -07:00
|
|
|
|
(function () {
|
|
|
|
|
|
|
|
|
|
function getLocalMediaSource(serverId, itemId) {
|
2015-09-15 11:09:44 -07:00
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolveWith(null, [null]);
|
|
|
|
|
return deferred.promise();
|
2015-06-02 22:30:14 -07:00
|
|
|
|
}
|
|
|
|
|
|
2015-09-10 11:28:22 -07:00
|
|
|
|
function saveOfflineUser(user) {
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolve();
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-15 20:55:26 -07:00
|
|
|
|
function deleteOfflineUser(id) {
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolve();
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-10 11:28:22 -07:00
|
|
|
|
function getCameraPhotos() {
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolveWith(null, [[]]);
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-14 12:47:03 -07:00
|
|
|
|
function getOfflineActions(serverId) {
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolveWith(null, [[]]);
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-15 20:55:26 -07:00
|
|
|
|
function deleteOfflineActions(actions) {
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolveWith(null, [[]]);
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-14 12:47:03 -07:00
|
|
|
|
function getServerItemIds(serverId) {
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolveWith(null, [[]]);
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function removeLocalItem(itemId, serverId) {
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolveWith(null, []);
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getLocalItem(itemId, serverId) {
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolveWith(null, []);
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function addOrUpdateLocalItem(localItem) {
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolveWith(null, []);
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-14 21:31:12 -07:00
|
|
|
|
function createLocalItem(libraryItem, serverInfo, originalFileName) {
|
2015-09-14 14:24:54 -07:00
|
|
|
|
|
|
|
|
|
var item = {};
|
|
|
|
|
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolveWith(null, [item]);
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function downloadFile(url, localPath) {
|
|
|
|
|
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolveWith(null, []);
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function downloadSubtitles(url, localItem, subtitleStreamh) {
|
|
|
|
|
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolveWith(null, [""]);
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-14 18:16:31 -07:00
|
|
|
|
function hasImage(serverId, itemId, imageTag) {
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolveWith(null, [false]);
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function downloadImage(url, serverId, itemId, imageTag) {
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolveWith(null, [false]);
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-20 09:16:06 -07:00
|
|
|
|
function fileExists(path) {
|
|
|
|
|
|
|
|
|
|
var deferred = DeferredBuilder.Deferred();
|
|
|
|
|
deferred.resolveWith(null, [false]);
|
|
|
|
|
return deferred.promise();
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-02 22:30:14 -07:00
|
|
|
|
window.LocalAssetManager = {
|
2015-09-10 11:28:22 -07:00
|
|
|
|
getLocalMediaSource: getLocalMediaSource,
|
|
|
|
|
saveOfflineUser: saveOfflineUser,
|
2015-09-15 20:55:26 -07:00
|
|
|
|
deleteOfflineUser: deleteOfflineUser,
|
2015-09-14 12:47:03 -07:00
|
|
|
|
getCameraPhotos: getCameraPhotos,
|
|
|
|
|
getOfflineActions: getOfflineActions,
|
2015-09-15 20:55:26 -07:00
|
|
|
|
deleteOfflineActions: deleteOfflineActions,
|
2015-09-14 12:47:03 -07:00
|
|
|
|
getServerItemIds: getServerItemIds,
|
|
|
|
|
removeLocalItem: removeLocalItem,
|
|
|
|
|
getLocalItem: getLocalItem,
|
2015-09-14 14:24:54 -07:00
|
|
|
|
addOrUpdateLocalItem: addOrUpdateLocalItem,
|
|
|
|
|
createLocalItem: createLocalItem,
|
|
|
|
|
downloadFile: downloadFile,
|
2015-09-14 18:16:31 -07:00
|
|
|
|
downloadSubtitles: downloadSubtitles,
|
|
|
|
|
hasImage: hasImage,
|
2015-09-20 09:16:06 -07:00
|
|
|
|
downloadImage: downloadImage,
|
|
|
|
|
fileExists: fileExists
|
2015-06-02 22:30:14 -07:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
})();
|