Video-Hub-App
Video-Hub-App copied to clipboard
Drag and drop native directory adds folder to hub.
Dragging a directory from windows explorer onto one of the views doesn't seem to trigger any action.
It would be nice if this added the directory to the current hub.
Hi, can i work on this?
Hello @Asfanalu - thank you for the offer 🙇♂️
Please let me know if you'd like a hand with any part of the task. I can be broad or specific in suggestions - just let me know 🤝
I have a little question: my original idea was to add a dedicated directive to catch and manage the DnD events and send the file/s with new ipc.on method. For update automatically the view to see the new file/s i need to set, in the SettingComponent, the rescan flag for the specifc folder. Is there another method to force the new manual rescan , after DnD of new files?
There already is a drag-and-drop event available for handling dropping a .vha2
file - making the app open the hub:
https://github.com/whyboris/Video-Hub-App/blob/main/src/app/components/home.component.ts#L856
There is already ability to drag an image file over a thumbnail to replace the default thumbnail: https://github.com/whyboris/Video-Hub-App/blob/main/src/app/components/home.component.ts#L943
I hope it's possible to detect if a folder is dropped over the app window. Whatever you do, I hope it doesn't prevent these two pieces of functionality from working as before.
Once a folder is dropped over the app, we just need the path (string). And this method is basically all that's needed: https://github.com/whyboris/Video-Hub-App/blob/main/src/app/components/statistics/statistics.component.ts#L189
Since the statistics.component.ts
isn't usually instantiated (unless the user has opened the setting menu / component), this method isn't available to use 🤔 something will need to be done to make things work - hopefully not too tedious 🤞
Let me know if you have any questions (especially if I didn't address your previous question). Cheers! 😁