minor cleanup

archive-videos
Moe 2022-08-17 21:15:22 -07:00
parent 170075568d
commit 0cecfbe643
2 changed files with 17 additions and 10 deletions

View File

@ -498,10 +498,10 @@
"Compress Videos": "Compress Videos",
"FixVideoMsg": "Do you want to fix this video? This will create a new file and overwrite the old one. You cannot undo this action.",
"DeleteVideoMsg": "Do you want to delete this video? You cannot recover it.",
"CompressVideoMsg": "Do you want to compress this video? The original will be moved to your FileBin.",
"CompressVideoMsg": "Do you want to compress this video? The original will be moved to your FileBin. Videos that are already completed compressing will be skipped if already queued.",
"DeleteThisMsg": "Do you want to delete this? You cannot recover it.",
"DeleteTheseMsg": "Do you want to delete these? You cannot recover them.",
"CompressTheseMsg": "Do you want to compress these? The originals will be moved to your FileBin. Videos that are already WebM will be skipped.",
"CompressTheseMsg": "Do you want to compress these? The originals will be moved to your FileBin. Videos that are already WebM will be skipped. Videos that are already completed compressing will be skipped if ordered to compress again.",
"dropBoxSuccess": "Success! Files saved to your Dropbox.",
"API Key Deleted": "API Key Deleted",
"APIKeyDeletedText": "Key has been deleted. It will no longer work.",

View File

@ -212,6 +212,9 @@ $(document).ready(function(e){
<div class="progress-bar progress-bar-warning" role="progressbar" style="width: ${data.percent}%;">${data.percent}%</div>
</div>
</div>
<div style="display:none;" class="download-button pr-2">
<a class="badge badge-sm badge-default open-video" href="${videoUrl}"><i class="fa fa-play"></i></a>
</div>
<div style="display:none;" class="download-button pr-2">
<a class="badge badge-sm badge-success" download href="${videoUrl}"><i class="fa fa-download"></i></a>
</div>
@ -344,24 +347,28 @@ $(document).ready(function(e){
break;
case'video_compress_completed':
if(data.success){
var saveBuiltVideo = dashboardOptions().switches.saveCompressedVideo
if(data.timelapseVideo && saveBuiltVideo === 1){
downloadCompressedVideo(data)
}
var progressItem = sideLinkListBox.find(`[data-mid="${data.mid}"][data-ke="${data.mid}"][data-name="${data.name}"]`)
progressItem.find('.row-status').text(`${lang.Done}!`)
progressItem.find('.dot').removeClass('dot-orange').addClass('dot-green')
progressItem.find('.download-button').show()
var saveBuiltVideo = dashboardOptions().switches.saveCompressedVideo
if(saveBuiltVideo === 1){
downloadCompressedVideo(data)
progressItem.remove()
console.log(`Downloaded!`,data)
}else{
progressItem.find('.row-status').text(`${lang.Done}!`)
progressItem.find('.dot').removeClass('dot-orange').addClass('dot-green')
progressItem.find('.download-button').show()
progressItem.find('.progress-bar').css('width',`100%`).text(`100%`)
}
}
break;
case'video_compress_percent':
var progressItem = sideLinkListBox.find(`[data-mid="${data.mid}"][data-ke="${data.mid}"][data-name="${data.name}"]`)
data.percent = data.percent > 100 ? 100 : data.percent
if(progressItem.length === 0){
drawCompressedVideoProgressBar(data)
}else{
progressItem = sideLinkListBox.find(`[data-mid="${data.mid}"][data-ke="${data.mid}"][data-name="${data.name}"]`)
progressItem.find('.progress-bar').css('width',`${data.percent}%`).text(`${data.percent}%`)
progressItem.find('.percent').text(data.percent)
}
console.log(data)
break;