1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update camera upload

This commit is contained in:
Luke Pulverenti 2015-09-10 14:28:22 -04:00
parent 50dc5c4d1b
commit a2d603a31e
19 changed files with 404 additions and 141 deletions

View file

@ -4,8 +4,42 @@
return null;
}
function saveOfflineUser(user) {
var deferred = DeferredBuilder.Deferred();
deferred.resolve();
return deferred.promise();
}
function getCameraPhotos() {
var deferred = DeferredBuilder.Deferred();
if (window.CameraRoll) {
var photos = [];
CameraRoll.getPhotos(function (result) {
photos.push(result);
});
setTimeout(function () {
// clone the array in case the callback is still getting called
Logger.log('Found ' + photos.length + ' in camera roll');
deferred.resolveWith(null, [photos]);
}, 2000);
} else {
deferred.resolveWith(null, [[]]);
}
return deferred.promise();
}
window.LocalAssetManager = {
getLocalMediaSource: getLocalMediaSource
getLocalMediaSource: getLocalMediaSource,
saveOfflineUser: saveOfflineUser,
getCameraPhotos: getCameraPhotos
};
})();