trying to fix models

This commit is contained in:
Chris Cochrun 2024-09-12 15:27:34 -05:00
parent a1f18f803d
commit b61e05a423
6 changed files with 20 additions and 28 deletions

View file

@ -206,7 +206,7 @@ Item {
}
function addVideo(url) {
videoProxyModel.videoModel.newItem(url);
videoModel.newItem(url);
selectedLibrary = "video";
videoLibrary.libraryList.currentIndex = videoProxyModel.videoModel.count - 1;
if (!editMode)
@ -215,7 +215,7 @@ Item {
}
function addImg(url) {
imageProxyModel.newItem(url);
imageModel.newItem(url);
selectedLibrary = "image";
imageLibrary.libraryList.currentIndex = imageProxyModel.imageModel.count - 1;
if (!editMode)
@ -249,7 +249,8 @@ Item {
}
function isDragFile(item) {
var extension = item.split('.').pop();
console.log(item.toString());
var extension = item.toString().split('.').pop();
var valid = false;
if(extension) {
@ -261,7 +262,7 @@ Item {
}
function addFile(file) {
let extension = file.split('.').pop();
let extension = file.toString().split('.').pop();
if (videoexts.includes(extension))
{
addVideo(file);
@ -281,7 +282,7 @@ Item {
showPassiveNotification("More than one file");
for (let i = 0; i < files.length; i++) {
let file = files[i];
let ext = file.split('.').pop()
let ext = file.toString().split('.').pop()
if (videoexts.includes(ext))
{
addVideo(file);