hotkey delete file playing?

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
otreux
Blank Cone
Blank Cone
Posts: 23
Joined: 06 Nov 2008 00:03

hotkey delete file playing?

Postby otreux » 03 Nov 2021 15:16

Hi :)
Is it possible to assign a hotkey that deletes the video I am playing and that the next video in the folder is automatically played? Thanks

Lotesdelere
Cone Master
Cone Master
Posts: 10074
Joined: 08 Sep 2006 04:39
Location: Europe

Re: hotkey delete file playing?

Postby Lotesdelere » 04 Nov 2021 10:11

Not that I know.
I may add, fortunately.

otreux
Blank Cone
Blank Cone
Posts: 23
Joined: 06 Nov 2008 00:03

Re: hotkey delete file playing?

Postby otreux » 04 Nov 2021 12:49

nobody forces you to use a feature you don't like. This is instead a very useful function for many people who have to watch (and delete) a lot of videos

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

Re: hotkey delete file playing?

Postby Hitchhiker » 04 Nov 2021 16:36

As far as the Delete function is concerned you could use this script: https://gist.github.com/crmaxx/45fc0b22 ... 921449d5ba

Theoretically, you could subsequently use the 'N' and 'P' shortcut keys to go to the next video / previous video in your playlist, but I haven't tried the script myself and can't guarantee it will work.

otreux
Blank Cone
Blank Cone
Posts: 23
Joined: 06 Nov 2008 00:03

Re: hotkey delete file playing?

Postby otreux » 04 Nov 2021 20:47

Thanks Hitchhiker
Can you tell me how I must use this script?
Or is there any easy guide on how to use this script? I looked on the forum but I did not understand anything, also because my English is bad :(

I am familiar with the 'N' and 'P' hotkeys and it seems genius idea (ironic) that these hotkeys only work when the videos are in the playlist. It was obviously too easy to get them to work in normal view

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

Re: hotkey delete file playing?

Postby Hitchhiker » 05 Nov 2021 12:13

I found an easier solution which is this one: https://github.com/surrim/vlc-delete/

To use go to https://github.com/surrim/vlc-delete/bl ... delete.lua and copy all 116 lines of code. The easiest way to do that is to click the first dash (nothing will appear on screen) and then scroll down to the bottom of the code, hold down SHIFT and click after the last letter from the word "end". That will highlight everything in between. Right click anywhere in the highlighted text and click Copy.

Next, open Windows Notepad, right click and click Paste.

For clarity here's the full URL

Code: Select all

https://github.com/surrim/vlc-delete/blob/master/vlc-delete.lua

To create the file:
  1. Click File ---> Save As and where it reads "File name" type: vlc-delete.luac
  2. Directly below that in the field called "Save As Type" change it to All Files via the dropdown menu and then click Save.
  3. Place the file in this location: C:\Program Files\VideoLAN\VLC\lua\extensions

To use, play a video you want to delete and on the top toolbar click View ---> VLC Delete.
Last edited by Hitchhiker on 05 Nov 2021 18:47, edited 1 time in total.

otreux
Blank Cone
Blank Cone
Posts: 23
Joined: 06 Nov 2008 00:03

Re: hotkey delete file playing?

Postby otreux » 05 Nov 2021 14:59

thank you so much for the help but i thought it was possible to assign a hotkey :(
At this point I first open explorer and delete the video from there. But really thanks for the help!

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

Re: hotkey delete file playing?

Postby Hitchhiker » 05 Nov 2021 18:09

I just tried the script myself and note that it adds a description of the action performed rather than the name "VLC Delete". Here's a pix of it.

Image
(click to enlarge)

It's no big deal to change it to something else though merely by amending the sentence in the shortdesc line. Here's a pix of where that can be found.

Image
(click to enlarge)

But no hotkey I'm afraid.

I'll look into that aspect further and will post again if I find a solution.

EDIT: forgot to mention that according to the script author deleting the video using that option will play the next video automatically. So no need to hit "N'.

otreux
Blank Cone
Blank Cone
Posts: 23
Joined: 06 Nov 2008 00:03

Re: hotkey delete file playing?

Postby otreux » 06 Nov 2021 12:58

Thanks really for your help! We hope that the authors of VLC decide to insert this option for speed delete video.

As well as hotkeys that also work in normal view (I speak about N 'and' P 'shortcut). I don't understand why I have to put videos in the playlist in order to have working hotkeys. A normal person opens a folder, clicks on a video, watches it and must be able to scroll to the previous / next easily without having to insert the videos into the playlist. I find it really absurd

Anyway...I tried the script, it doesn't work with VLC portable

sean_incali
Blank Cone
Blank Cone
Posts: 13
Joined: 28 May 2010 09:06

Re: hotkey delete file playing?

Postby sean_incali » 10 Nov 2021 08:41

I found an easier solution which is this one: https://github.com/surrim/vlc-delete/

To use go to https://github.com/surrim/vlc-delete/bl ... delete.lua and copy all 116 lines of code. The easiest way to do that is to click the first dash (nothing will appear on screen) and then scroll down to the bottom of the code, hold down SHIFT and click after the last letter from the word "end". That will highlight everything in between. Right click anywhere in the highlighted text and click Copy.

Next, open Windows Notepad, right click and click Paste.

For clarity here's the full URL

Code: Select all

https://github.com/surrim/vlc-delete/blob/master/vlc-delete.lua

To create the file:
  1. Click File ---> Save As and where it reads "File name" type: vlc-delete.luac
  2. Directly below that in the field called "Save As Type" change it to All Files via the dropdown menu and then click Save.
  3. Place the file in this location: C:\Program Files\VideoLAN\VLC\lua\extensions

To use, play a video you want to delete and on the top toolbar click View ---> VLC Delete.
I too have the same needs as the Op and this plugin works as expected. now if there is a way to bind a hotkey to the menu item added by the plugin, then the problem will be resolved.

But based on what i'm reading it's not possible currently. correct?

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

Re: hotkey delete file playing?

Postby Hitchhiker » 10 Nov 2021 09:40


I too have the same needs as the Op and this plugin works as expected. now if there is a way to bind a hotkey to the menu item added by the plugin, then the problem will be resolved.

But based on what i'm reading it's not possible currently. correct?

I doubt it somehow since it would have been implemented by now if it was. A search through the latest 3.0.x documentation yields zero results.

I also sent the guy who wrote the script an email last Thursday, but haven't received a reply yet. You can have a go yourself if you wish: contact details here: https://spirit.surrim.org/contact

sean_incali
Blank Cone
Blank Cone
Posts: 13
Joined: 28 May 2010 09:06

Re: hotkey delete file playing?

Postby sean_incali » 10 Nov 2021 10:20

ok. thank you. it will be a nice addition for people who want to clean up their video folders. hopefully some day.

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

Re: hotkey delete file playing?

Postby Hitchhiker » 10 Nov 2021 15:43

This thread might be of interest to you all: https://forum.videolan.org/viewtopic.ph ... 01#p520201

According to one of the developers you can bind certain keys to a mouse button which can then be used to perform a specific function. Since the standard keyboard Delete key isn't assigned to a key already on vlc it might be possible to use the third party tool one of the mods on here (mederi) recommended to achieve that goal: https://www.highrez.co.uk/downloads/XMo ... ontrol.htm

Rémi Denis-Courmont
Developer
Developer
Posts: 15312
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: hotkey delete file playing?

Postby Rémi Denis-Courmont » 12 Nov 2021 17:14

The delete key removes an entry from playlist or media library. It would confusing if it started deleting the underlying file as well...

As a developer, I simply do not want to have to deal with complaints about personal files accidentally deleted via VLC. Some users already found ways to accidentally delete their files with VLC (or to believe that they did so), so it is not hard to imagine how much worse that would get. Call that idiot proofing perhaps, but that's that.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

sean_incali
Blank Cone
Blank Cone
Posts: 13
Joined: 28 May 2010 09:06

Re: hotkey delete file playing?

Postby sean_incali » 26 Nov 2021 07:06

The delete key removes an entry from playlist or media library. It would confusing if it started deleting the underlying file as well...

As a developer, I simply do not want to have to deal with complaints about personal files accidentally deleted via VLC. Some users already found ways to accidentally delete their files with VLC (or to believe that they did so), so it is not hard to imagine how much worse that would get. Call that idiot proofing perhaps, but that's that.
you could probably add customizable hot key to the delete.lua plug in that shows up under the
view menu?

that way only people who know what they're doing will be able to bind a shot key to deleting a file from the disk.

Because as of now, there is no way to add a custom hotkey/menu combo under the configure hotkey settings.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 44 guests