Add title property for EventMediaLoader
This commit is contained in:
parent
2a2b3df845
commit
bd7b45cc7a
|
@ -28,6 +28,9 @@ HLoader {
|
|||
|
||||
property string downloadedPath: ""
|
||||
|
||||
readonly property string title:
|
||||
singleMediaInfo.media_title || utils.urlFileName(mediaUrl)
|
||||
|
||||
readonly property var imageExtensions: [
|
||||
"bmp", "gif", "jpg", "jpeg", "png", "pbm", "pgm", "ppm", "xbm", "xpm",
|
||||
"tiff", "webp", "svg",
|
||||
|
|
|
@ -298,9 +298,13 @@ QtObject {
|
|||
}
|
||||
|
||||
|
||||
function urlFileName(url) {
|
||||
return url.toString().split("/").slice(-1)[0].split("?")[0]
|
||||
}
|
||||
|
||||
|
||||
function urlExtension(url) {
|
||||
return url.toString().split("/").slice(-1)[0].split("?")[0].split(".")
|
||||
.slice(-1)[0].toLowerCase()
|
||||
return urlFileName(url).split(".").slice(-1)[0]
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user