Help - Search - Members - Calendar
Full Version: foo_recycle: Delete single file to Recycle Bin
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
darrel
Hi there...

Since foo_delete doesn't work very well with foobar 0.8, I just made this and thought it would be convenient for people who need it...

Right click and select "Recycle File" to delete the file to Recycle Bin. No confirmation.

http://www.destined-to-fall.com/download/foo_recycle.zip

http://www.destined-to-fall.com/download/foo_recycle_src.zip

Thanx "eweaverp" for his foo_delete. I basically just modified his source code a bit...
Lyx
Thank you :)

- Lyx
darrel
updated... added support for unicode filenames...
mimeryme
Could you allow it for multiple files?
darrel
QUOTE(mimeryme @ Mar 12 2004, 11:58 AM)
Could you allow it for multiple files?

I'll look into it...
darrel
updated again... now it will delete all selections...
kode54
Maybe a quick tip, you could also just get the current file's index/handle once, and only if the core is playing a track from the visible playlist. If it is not playing, or playing a track from another list, playlist_oper::get_now_playing() will return -1. You could also check if it's merely paused, and then you could pause the track after you start it.

Also, maybe to save just a little time, you could retrieve pointers to each of the services you will be using only once in each function and store them in variables.

Meh, I better get out before I take this over and reshape it how I see fit...
darrel
QUOTE(kode54 @ Mar 12 2004, 06:07 PM)
Meh, I better get out before I take this over and reshape it how I see fit...

Hey man I'll be gald if you do laugh.gif

I've no intention to create a complex plugin and maintain it... I actually believe that this should be a native feature. It's just I needed it and it's not there, and some other people are also requesting it...

I don't fully understand what you talked about, hehe. With all due respest to Peter and other developers (it's a wonder player), I found this foobar SDK amazingly lack of documentation and comments. Call me lame but I had a hard time finding the functions I needed to call. I can only guess by names and do subdirectory search... I wonder how you guys did it... Am I missing a tutorial or something?

Again thanx for all the explainations you did to my questions... tongue.gif bed time...
ssamadhi97
QUOTE(darrel @ Mar 13 2004, 04:25 AM)
With all due respest to Peter and other developers (it's a wonder player), I found this foobar SDK amazingly lack of documentation and comments.


oh.. we all find it to be rather self-explanatory wink.gif

QUOTE(darrel @ Mar 13 2004, 04:25 AM)
Am I missing a tutorial or something?


yes, actually - there is a work-in-progress "3rd party" tutorial by foosion, the thread on it is found in the developer section of this forum.

Other than that, there are tons of sample plugins in the sdk and there are more open source 3rd party plugins on top of that.
ndrake
The plugin works perfectly, thanks for updating it!

In the future, would there be any way to have the plugin delete the entire folder that a selection is in? Often if I'm deleting a single file, I'm also deleting the entire folder (album) it is in. Maybe I'm the only one...
upNorth
QUOTE(ndrake @ Mar 13 2004, 06:50 PM)
In the future, would there be any way to have the plugin delete the entire folder that a selection is in? Often if I'm deleting a single file, I'm also deleting the entire folder (album) it is in.  Maybe I'm the only one...

No, you're not as I though about requesting the exact same thing. Not necessarily only for a selection, but also when selecting a single file.
It should probably come with a warning though, as I reckon that mixed with the right (or should I say wrong) directory structure, it could lead to great loss blink.gif

Thanks to darrel and eweaverp for this the(se) plugin(s).
upNorth
...I love this server these days...
darrel
QUOTE(ndrake @ Mar 13 2004, 08:50 AM)
The plugin works perfectly, thanks for updating it!

You are welcome.

QUOTE(ndrake @ Mar 13 2004, 06:50 PM)
In the future, would there be any way to have the plugin delete the entire folder that a selection is in? Often if I'm deleting a single file, I'm also deleting the entire folder (album) it is in.


I need some help in this case.

1) Is there a lookup function, given a metadb_handle*, it returns the item number of that handle in the playlist?

2) Someone can give me a quick tutorial on this multiple playlist thing?

Thanx....
eweaverp
the thing to do would be only delete the folder if it is empty

i have no clue about multiple playlists. does my original plugin even work for multiple playlists? i guess it does

yeah the documentation is non-existent but the functions are named pretty well... my biggest problem was getting the environment right so i could compile. most other things were done in a fairly obvious way. if you look at the class list or whatever, and then type like playlist::get()-> into the VC++6 editor it gives you a window of functions, i would pick from that and try to guess the parameter list or look in other peoples code.

and the foobar core complains if you have pointer leakage, which is great.

i got started by hacking up the source from foo_moreinfo or some plugin like that, i forget. didn't help that i hadn't used C in like 3 years.

what happens to your plugin if the recycle bin is full?

does it confirm for multiple files? i guess my philosophy is confirm for everything, even if recycle bin is used.

some people have recycle bin disabled, what then?

don't let the plugin get too complicated though! the original 0-features version took me barely 4 hours to make, even though i had no clue what i was doing.

i guess i will roll UTF support into it and update the plugins page and then let it alone, i dunno

peace

evan
darrel
QUOTE(eweaverp @ Mar 15 2004, 12:08 PM)
the thing to do would be only delete the folder if it is empty

i have no clue about multiple playlists. does my original plugin even work for multiple playlists? i guess it does

yeah the documentation is non-existent but the functions are named pretty well... my biggest problem was getting the environment right so i could compile. most other things were done in a fairly obvious way. if you look at the class list or whatever, and then type like playlist::get()-> into the VC++6 editor it gives you a window of functions, i would pick from that and try to guess the parameter list or look in other peoples code.

and the foobar core complains if you have pointer leakage, which is great.

i got started by hacking up the source from foo_moreinfo or some plugin like that, i forget. didn't help that i hadn't used C in like 3 years.

what happens to your plugin if the recycle bin is full?

does it confirm for multiple files? i guess my philosophy is confirm for everything, even if recycle bin is used.

some people have recycle bin disabled, what then?

don't let the plugin get too complicated though! the original 0-features version took me barely 4 hours to make, even though i had no clue what i was doing.

i guess i will roll UTF support into it and update the plugins page and then let it alone, i dunno

peace

evan

You are right. If the recycle bin is full then the files are silently gone! I'm not sure how to handle this at this time, since I don't want to make this plugin too complicated... Also no matter whether the deletion succeeded, the files are removed from the playlist anyways.

However I'm too busy to maintain this plugin right now... updates will be very slow... are you interested in taking it over?
Geek4life
I would have to put in a recommendation for confirmations, everything should have the option to confirm. it's quite easy to hit the wrong button at times. or if someone else gets on your pc.
eweaverp
updated the original foo_Delete to use recycle bin instead

http://pelit.koillismaa.fi/plugins/general.php#68
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.