|
|
@ -2610,7 +2610,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.service('AppVideoManager', function ($sce, $rootScope, $modal, $window, MtpApiFileManager, AppUsersManager, FileManager) { |
|
|
|
.service('AppVideoManager', function ($sce, $rootScope, $modal, $window, MtpApiFileManager, AppUsersManager, FileManager, qSync) { |
|
|
|
var videos = {}, |
|
|
|
var videos = {}, |
|
|
|
videosForHistory = {}, |
|
|
|
videosForHistory = {}, |
|
|
|
windowW = $(window).width(), |
|
|
|
windowW = $(window).width(), |
|
|
@ -2736,6 +2736,13 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) |
|
|
|
access_hash: video.access_hash |
|
|
|
access_hash: video.access_hash |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (historyVideo.downloaded && !toFileEntry) { |
|
|
|
|
|
|
|
var cachedBlob = MtpApiFileManager.getCachedFile(inputFileLocation); |
|
|
|
|
|
|
|
if (cachedBlob) { |
|
|
|
|
|
|
|
return qSync.when(cachedBlob); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
historyVideo.progress = {enabled: !historyVideo.downloaded, percent: 1, total: video.size}; |
|
|
|
historyVideo.progress = {enabled: !historyVideo.downloaded, percent: 1, total: video.size}; |
|
|
|
|
|
|
|
|
|
|
|
var downloadPromise = MtpApiFileManager.downloadFile(video.dc_id, inputFileLocation, video.size, { |
|
|
|
var downloadPromise = MtpApiFileManager.downloadFile(video.dc_id, inputFileLocation, video.size, { |
|
|
|