Fix missing play button click handler and add debugging
This commit is contained in:
parent
af2814ce2f
commit
3794289de5
21
renderer.js
21
renderer.js
@ -146,6 +146,27 @@ function displayFiles(files) {
|
|||||||
openVideoPreview(filePath);
|
openVideoPreview(filePath);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Add click handler for play button
|
||||||
|
const playButton = fileItem.querySelector('.play-button');
|
||||||
|
playButton.addEventListener('click', function(e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
console.log('Play button clicked for file:', file.path);
|
||||||
|
// First open the video preview
|
||||||
|
openVideoPreview(file.path);
|
||||||
|
|
||||||
|
// Then move the file to the appropriate folder based on tag type
|
||||||
|
const fileItem = this.closest('.file-item');
|
||||||
|
const tagType = fileItem.hasAttribute('data-tagged-extra') ? 'extra' :
|
||||||
|
fileItem.hasAttribute('data-tagged-commentary') ? 'commentary' : null;
|
||||||
|
|
||||||
|
console.log('Tag type determined:', tagType);
|
||||||
|
if (tagType) {
|
||||||
|
moveTaggedFile(file.path, tagType);
|
||||||
|
} else {
|
||||||
|
console.log('No tag type found for file');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
fileListEl.appendChild(fileItem);
|
fileListEl.appendChild(fileItem);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user