Reactivate EventFile for video and audio events

Temporary solution until the media player is ready
This commit is contained in:
miruka 2019-12-16 18:19:06 -04:00
parent 45ff9bba99
commit ce23d2c992
2 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,7 @@
# TODO
- strip file:// from copy path
- some way to show name and date on EventFile
- sentinel func to report path if already cached without having to click
- verify eventfile height

View File

@ -10,7 +10,7 @@ HLoader {
if (type === EventDelegate.Media.Image) {
var file = "EventImage.qml"
} else if (type === EventDelegate.Media.File) {
} else if (type !== EventDelegate.Media.Page) {
var file = "EventFile.qml"
} else { return }
@ -71,6 +71,11 @@ HLoader {
function download(callback) {
if (! loader.mediaUrl.startsWith("mxc://")) {
downloadedPath = loader.mediaUrl
callback(loader.mediaUrl)
}
if (! downloadedPath) print("Downloading " + loader.mediaUrl + " ...")
const args = [loader.mediaUrl, loader.singleMediaInfo.media_crypt_dict]