"Delete currently playing file & remove from DB&quo
Moderator: Gurus
"Delete currently playing file & remove from DB&quo
There should have been a method to "delete currently playing file & remove it from DB"
- this function should be possible to map to a hotkey or be trigged by WM_message
Thank you.
- this function should be possible to map to a hotkey or be trigged by WM_message
Thank you.
If a track is selected in the Now Playing window then hitting the "Del" key will bring up a confirmation box asking if you want to:
1) Remove from Now Playing only
2) Delete from Now Playing and the library only
3) Delete from Now Playing, the library, and the computer
You can also check "In the future, do not ask me" if you wish this behaviour to remain the same every time.
1) Remove from Now Playing only
2) Delete from Now Playing and the library only
3) Delete from Now Playing, the library, and the computer
You can also check "In the future, do not ask me" if you wish this behaviour to remain the same every time.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
no good.
- The currently playing track is almost never "selected" - I do not plan to be sitting there and selecting each thing manually as they play, it is not enough to show MM window, and my goal is obviously to be able to do it even in minimized mode - for remote control purposes.
(It's a pity MM does not have as complete & advanced WM_message /hotkey interface as Zoomplayer does..)
- The currently playing track is almost never "selected" - I do not plan to be sitting there and selecting each thing manually as they play, it is not enough to show MM window, and my goal is obviously to be able to do it even in minimized mode - for remote control purposes.
(It's a pity MM does not have as complete & advanced WM_message /hotkey interface as Zoomplayer does..)
Well you could have an external hotkey program linking to a script which deletes the currently playing song and skips onto the next. This been discussed recently, not with you I presume! 
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
-
Alcapone.
Create a file called something like "DeleteAndSkip.vbs" containing this code:
Then use an external hotkey program to launch this script. Most multimedia keyboards have a few assignable keys so you could probably use one of those, or you can download software which allows you to add global hotkey shortcuts.
Code: Select all
Set SDB = CreateObject("SongsDB.SDBApplication")
curindex = SDB.CurrentSongIndex
SDB.Player.Next
SDB.Player.PlaylistDelete(curindex)
Set SDB = NothingDownload my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Remember that the intention is to "delete currently playing file & remove it from DB".
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Deleting from Now Playing in this way should trigger the confirmation box which allows you to choose that you want it removed from the db and/or your computer as well.
If not, please let me know, and I'll try harder!
If not, please let me know, and I'll try harder!
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Well, I put the following in an autostart vbs and the first now playing track is removed without confirmation (manually, there is a confirmation).
That's all I can say for now...
Cheers
Steegy
Code: Select all
Sub OnStartup
SDB.Player.PlaylistDelete(0)
End SubCheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Well still not sure about removing from the library, but this will delete from now playing and the computer.
However, now it's deleted from the computer you can use the "Dead Links" node to delete all the tracks from the library in one go.
Code: Select all
Set SDB = CreateObject("SongsDB.SDBApplication")
curindex = SDB.CurrentSongIndex
curpath = SDB.CurrentSong.Path
SDB.Player.Next
SDB.Player.PlaylistDelete(curindex)
Set filesys = CreateObject("Scripting.FileSystemObject")
filesys.DeleteFile curpath, True
Set filesys = Nothing
Set SDB = Nothing
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Sorry, typo, try this:
Code: Select all
Set SDB = CreateObject("SongsDB.SDBApplication")
curindex = SDB.Player.CurrentSongIndex
curpath = SDB.Player.CurrentSong.Path
SDB.Player.Next
SDB.Player.PlaylistDelete(curindex)
Set filesys = CreateObject("Scripting.FileSystemObject")
filesys.DeleteFile curpath, True
Set filesys = Nothing
Set SDB = Nothing Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
trixmoto:
Thank you.
It works wery well - I use Girder for all automation, so getting a confirmation dialog is not a problem, and your script does just what I were looking for
Thank you.
BTW: do you have any idea how I could fetch path information ?
(I would like to make a confirmation-dialog that displays the file to be deleted.)
Regards.
Thank you.
It works wery well - I use Girder for all automation, so getting a confirmation dialog is not a problem, and your script does just what I were looking for
Thank you.
BTW: do you have any idea how I could fetch path information ?
(I would like to make a confirmation-dialog that displays the file to be deleted.)
Regards.
Try this:
N.B. Yes = 6
Code: Select all
Set SDB = CreateObject("SongsDB.SDBApplication")
curindex = SDB.Player.CurrentSongIndex
curpath = SDB.Player.CurrentSong.Path
message = "Would you like to delete '"&curpath&"'?"
If SDB.MessageBox(message, mtConfirmation, Array(mbYes,mbNo)) = 6 Then
SDB.Player.Next
SDB.Player.PlaylistDelete(curindex)
Set filesys = CreateObject("Scripting.FileSystemObject")
filesys.DeleteFile curpath, True
Set filesys = Nothing
End If
Set SDB = NothingDownload my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
By the way, this: will delete read-only files. If you wish to only delete writeable files then change it to: 
Code: Select all
filesys.DeleteFile curpath, TrueCode: Select all
filesys.DeleteFile curpath, FalseDownload my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.