Help - Search - Members - Calendar
Full Version: foo_removeplayed
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
Chronial
As requested by a friend, I made this quite simple component. It removes tracks from the playlist once they've been played (or skipped). So every time playback advances, the previously played track will disappear from the playlist.

This is a very basic component at the moment (with just an option to switch it on and off), but if people are interested in something like that, I might extend it.

If you have any feature requests, here's the right place to make them public and to allow me to know about them wink.gif

Current Version: v 1.4 (2007-09-02)

Download:
http://chron.visiondesigns.de/foobar2000/f...played_v1.4.zip

Feature Requests
  • Apply only to playlists matching a pattern
  • Apply only to tracks matching a pattern
  • Options to define when you see a track as "played"
  • Send deleted tracks to a special playlist
  • - Keyboard shortcut to do this manualy
  • Option for delete on stop
  • Option for deleting playlist after it hast been played empty
Changelog:
v1.4
- Added "remove when skipped" functionality (has toggle in the menu)

v1.3
- Added a toggle to the menu (Playback->Remove played tracks)

v1.2
- Using another way to find out if a song has been played

v1.1
Fixed some bugs:
- Tracks are removed instantly instead of with 1 sec. delay
- Tracks are also removed if they are the last item of the playlist

v1.0
- Initial Release
vkeios
Thank you, I've got a playlist or two, this would be perfect for.
luckycatfu
This is a great idea- i would use it if it could be applied to certain playlists only, or better yet as a check/uncheck like Stop After Current.

This could effectively replace the playback queue i think, and yet still allow it to be re-ordered, add/remove songs etc as the queue should have been originally.
fabiospark
QUOTE(Chronial @ Nov 19 2006, 03:18) *

If you have any feature requests, here's the right place to make them public and to allow me to know about them wink.gif


Maybe:

1 - ability to set it to remove only if played track matches a criteria. For instance, a certain value in a certain tag. I have this "To tag" playlist where I load currently untagged tracks. I'm usually tagging them (rating, tempo and situations) with a remote control while they are playing. Sometimes, I fail to do it because I'm involved in something else. It would be useful (for me, at least) if the untagged ones would stay in the playlist even if they have already been played. The tagged ones should disappear, instead.

2 - ability to set when a track must be removed. If I'm previewing some tracks, manually or with the preview plugin, I could consider "played" a track even if it has not been played to the end.

3 - ability to send the removed tracks to another (existing or not) playlist as a sort of "bin playlist"

4 - make averything above avalaible in the keyboard shortcut configurator

Thanks.
Chronial
Could you explain this further?
QUOTE
2 - ability to set when a track must be removed. If I'm previewing some tracks, manually or with the preview plugin, I could consider "played" a track even if it has not been played to the end.

If a certain percentage of the track has been played?
Chronial
QUOTE(luckycatfu @ Nov 19 2006, 08:06) *

This is a great idea- i would use it if it could be applied to certain playlists only, or better yet as a check/uncheck like Stop After Current.

Done wink.gif
fabiospark
QUOTE(Chronial @ Nov 19 2006, 12:43) *

Could you explain this further?
QUOTE
2 - ability to set when a track must be removed. If I'm previewing some tracks, manually or with the preview plugin, I could consider "played" a track even if it has not been played to the end.

If a certain percentage of the track has been played?


Yes.

Another way could be something like this:

IF (elapsed time seconds > x) OR (end of track) OR (percentage > y) THEN remove.

The seconds could be more precise than the % when you're using the Preview mode.
---------
Another thing would be a "remove" command on the shortcuts list working only on the now playing track.
I'm not sure but I think the existent "remove from playlist" works on the selected one.

Thanks.

Edit: sorry, I read the first post after sending my reply. Of course, ignore the things you have already done.
nightfishing
great plugin (thanks).

It doesn't seem to work with playlsts generated by "autoplaylist" though.

Other than that it is working beautifully.
Frank Bicking
QUOTE
It doesn't seem to work with playlsts generated by "autoplaylist" though.

Not a bug. Autoplaylists are supposed to behave this way.

If you were able to remove tracks from an autoplaylist, it wouldn't contain the tracks specified by its query anymore.
nightfishing
Wasn't inferring that it was a bug, sorry if that's the way the post came off.

black92
Very useful component. Thanks smile.gif
q-stankovic
Nice plugin!

I took a look in Dro's file removal plugin for Winamp to see which good ideas he already implemented. So here are some ideas:

1. Option for "Remove on next" and "Remove on stop"

2. Option for "Load played playlist after last file was removed"

What i would like to have is a variable to display in trackinfo if file removal is activated or not.
Another idea: Make the option for removal in main menu independent for each playlist so that you can switch from playlist to playlist and check this option fot just that playlist you like to have the removal (to avoid confusion the option could be greyed out for read only or autoplaylists)

Thanks for this sweet little plugin! smile.gif
metal_termite
I think you forgot to change the version number; it reads 1.2.0
tool++
foo_playlist_eat would be a far more creative name for this biggrin.gif
Chronial
QUOTE(metal_termite @ Nov 20 2006, 19:00) *

I think you forgot to change the version number; it reads 1.2.0
Thx, fixed

QUOTE(tool++ @ Nov 20 2006, 19:06) *

foo_playlist_eat would be a far more creative name for this biggrin.gif
Too late ^^
q-stankovic
I think it would also be useful to have in main menu an additional toggle option to remove skipped tracks (on next or stop). So that you at whole have three modes: remove played, remove skipped or remove both. Sometimes you like just to remove that tracks that are not worth being heard in full length. That wouldn't touch a possible option to consider tracks as played wich was played f.e. 80%
Remedial Sound
Thanks for the very nice plugin Chronial.

I'm wondering how feasible it would be to...

add a user option to remove files from the playlist only after the all songs of the album (i.e., all songs matching %album% in the playlist) are played? I mainly listen to music in "album mode," it would be nice to keep the entire album's tracks in the playlist until it's done. Thanx for considering this feature!
Chronial
QUOTE(Remedial Sound @ Nov 21 2006, 20:27) *

add a user option to remove files from the playlist only after the all songs of the album (i.e., all songs matching %album% in the playlist) are played? I mainly listen to music in "album mode," it would be nice to keep the entire album's tracks in the playlist until it's done. Thanx for considering this feature!

Why do you want that?
Remedial Sound
I'd just be interested in having the option to remove albums after they're played (rather than tracks after they're played). If it's too strange/bizarre of a request then fughettaboutit.
Chronial
I understood that - I just wanted to ask, what would be the use of such a feature?
Only for visual pleasure? (having full albums in the playlist just looks better ^^)
Remedial Sound
QUOTE(Chronial @ Nov 21 2006, 14:07) *

I understood that - I just wanted to ask, what would be the use of such a feature?
Only for visual pleasure? (having full albums in the playlist just looks better ^^)

Hmm, I suppose it is just a visual thing. I just like being able to see all the tracks of the album I'm currently listening to. Thanks for listening, but don't bother if I'm the only person interested in this feature.
GeSomeone
I have use for this. Now I should just remember to disable it when I don't want to remove played tracks dry.gif

BTW. When I first started up with this dll, the remove function was enabled. I don't think that's a good idea. The other users on this computer will wonder where their tracks went unsure.gif
Chronial
QUOTE(GeSomeone @ Nov 23 2006, 22:41) *
BTW. When I first started up with this dll, the remove function was enabled. I don't think that's a good idea. The other users on this computer will wonder where their tracks went unsure.gif

Well, wouldn't you enable it anyway after installation?
I just wanted to prevent those "can't find the component after installing it" questions I've seen alot around here wink.gif
fabiospark
Chronial, how are you? smile.gif

Still developing this? wink.gif

Thanks.
Killmaster
bump because I'd really like to see some kind of playlist-specific options added
mrinferno
Chronial any chance you are still out there?

I'm a long time Winamp user trying to fully convert to Foobar2000, however my favorite plugin for winamp is Playlist File Remover by DrO.

The major feature from that plugin which I use is removing the playlist item on Skip/Next, not just after Play completes 100% successfully.

I think you may have this functionality referenced in the feature requests section in the 1st post:
  • Options to define when you see a track as "played"

If you don't have time, maybe someone with the appropriate skills might volunteer to code some of the feature requests? (according to Chronial's website the source code is available upon request)
Chronial
That's funny - DrO's plugin is just the plugin my fried was using in winamp (see first post).

Well - The functionality you requested is indeed quite important, and it doesn't need any preferences dialog (I hate win32 gui...). So here you go:

New Version: Version 1.4
Get here: http://chron.visiondesigns.de/foobar2000/#foo_removeplayed

It does delete the track if you start playing any other track (by double clicking, the next button etc.) - even if you double click on the same track again (it's quite hard to prevent this).
So if "remove played" and "remove skipped" are activated, the only possibility to change tracks without removing is pressing stop then playing the new track.
mrinferno
thank you so much. that's exactly what i was looking for.

you are awesome!
dypsis
I love this plugin, but I store all my albums as playlists. So when I use it on my playlists, they are empty the nest time I go to play them.

I use another player that has this same feature built-in. It is called Pruning Mode on that player, and if you play a playlist, Pruning Mode will remove each track after it has been player or if you press next, but the next time you revisit that playlist, it will still have all the tracks intact.

So is there a way to set foobar2000 so it doesn't save my playlists after foo_removeplayed has removed each track?
Kuukunen
I agree with luckycatfu.
If this plugin had enough features for it, I would use it instead of the playback queue. Most importantly you'd need the "only apply to playlist(s) x" feature. (I'd bind a hotkey for "Add to playist Queue".)

Well, to be fully usable as a queue, there would be a couple of other features....

*It would automatically add the first song of a certain playlist to the foobar's internal queue and make sure it stays there. So even if a song is played from another playlist, the first song would be re-added to the internal queue. Or when the first song of that playlist is changed, it would modify the internal queue accordingly.

*It would automatically change playback to go in order and automatically revert to the previous mode when the playlist runs out.

*It would automatically jump back to the previous song that wasn't played from the certain playlist and then would skip to the next song using whatever playback order was used before queue. Or maybe even stop playing if playback was stopped.

Alternatively, it could let foobar play the next song, but immediately when it does, it would remember that song, and jump to the first song of the certain playlist. And when the playlists is empty again, it would jump back to the song that was going to play, but didn't. I don't know how possible it is to notice if the song was selected manually (in which case it should be played before the queue playlist, or msybr better yet added to the playback queue) or if it was because the previous song ended (in which case it should jump to the first song of the queue playlist).


As far as I know, the current queue still isn't editable and I see this has been talked about before, so I feel that I have to explain myself a bit. The reason I want this is because I usually listen to songs randomly from a big playlist. But occasionally I want to queue couple of songs, so I do just that. Sometimes, however I might want to edit the queue. Like setting the "really fun song" to play next before the rest of the queue.

This is especially important in party situations. (I have a bad reputation of installing foobar on other peoples' computers. :/) In these situations I often have to guard the computer in case someone wants to play a song. (So I can stop him from destroying the queue.) Or if I used a normal playlist, I would still have to keep track of where it goes and after the playlist, I'd have to manually modify playback order and move to the random playlist. Not to mention the problems when I have to explain the fancy pants system to everyone who wants to play a song.

I was reminded by this once again when I uploaded my foobar installation to my server in case other people would want to use it. I mentioned this in IRC and the first question that was asked by a Winamp person: "Is the queue fixed yet?" :/
Chronial
Just try this plugin in combination with foo_trackpos
dypsis
I love this plugin.

But there is a small bug with it. On the last track, it doesn't remove it. Instead, it keeps repeating the track on my Vista 64 PC.

Also. Is there a way to stop it saving playlists after it removes tracks from saved playlists? I would like to be able to go back to my playlist later with all the tracks still intact.
Chronial
QUOTE(dypsis @ Mar 22 2008, 10:49) *

I love this plugin.

But there is a small bug with it. On the last track, it doesn't remove it. Instead, it keeps repeating the track on my Vista 64 PC.

I just had a look at the code - it should work. This may be a bug in foobar (that has to notify my plugin that a new track is beeing played). But there's a simple solution: Just set the playback mode from repeat to default.

QUOTE
Also. Is there a way to stop it saving playlists after it removes tracks from saved playlists? I would like to be able to go back to my playlist later with all the tracks still intact.

No, sry - that's default behavior of foobar that no plugin can change. I could restore a backup of the playlist - but that would be veeeery complicated (how do I know which version you want to be restored?).
But why don't you do that yourself? Just safe the playlist to a file and load it again after the one in foobar has been played empty.
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.