Help - Search - Members - Calendar
Full Version: check a directory for new files
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
BlueScreenJunky
Now with the tabbed playlist, I think it would be great if foobar could check my "incoming" directory each times it starts, and add the files to a specific playlist. is that possible ? does anyone feel like coding it ? (yeah I know what you think but no, I can't code tongue.gif )
AlexJ
Please!
treech
*VERY* good idea! biggrin.gif
Lego
you can use a Batch-*Haiku* cmd-script

make a new File incoming.txt

insert this code and change Paths

CODE
pushd "c:\incoming\"
DIR /s /b *.mp* > incoming.m3u
start /MIN C:\..........\foobar2000.exe "incoming.m3u"
Exit


pls change the extension of "incoming.txt" when finished, to "incoming.cmd" and doubleclick

*Have Fun* laugh.gif
treech
Hmm, yeah sure, but this would put duplicated entries in the playlist .... ohmy.gif
Killmaster
I'd like something like this as well.
Lego
...
neoufo51
I was just going to ask about this.

However, this is no good for a plugin. Peter should add this feature himself for it to work seamlessly. It would help the MANY people who use p2p programs and have to add the directory all over again or have to hunt for the file, which ISN'T ALWAYS ALPHABETICAL in the directory. It would be a GREAT advantage over other lesser featured players like Winamp.

We need a button, something along the lines, of "refresh directory" or "refresh playlist" so that it works as the reverse of "remove duplicates" but rather adds new files. Most p2p and mp3 scanning programs have this refresh feature, so I think it would be fairly easy for Peter to add such a feature.

With the higher up's permission, can we make a another thread asking for this in the General Threads? Or, better yet, just move this thread to "general" so Peter can see this request and take it under consideration?
BlueScreenJunky
Thanx Lego, your batch file works fine (I was actually thinking about doing something like that but I didn't know how to do it).
However, a plug-in or foobar feature would allow fb2k to check for new files each time it is started, when you click on the component in the menu, when you use a hotkey, or even every 30 minutes or something.

It would also enable the incoming files to go into a specific playlist, not just clear your current playlist and add the files (like "aaarrrgghhh ! I didn't save that one !").
I thought there might be a command line parameter to add files to a specific playlist, but I couldn't find it :-/
diskreet
What you said about Peter putting this right in the code defeats everything foobar stands for. The point is that if you dont use a feature you can delete it and never see it again in your life. If he put every good idea right in the code it would be horrible. smile.gif
{tama}
This idea would rock as a plugin. Sure hope someone creates something efficient like this soon!
infrared
Has any progress been made with this? Still a great idea!
Fiend Angelical
I second/third/fourth/fifth this idea.
Moonwhaler
Would be a great addition to an audiophile's plugin-library!

Moon
Killmaster
For what it's worth, there's actually a pretty decent solution for this, using the extended playlist generator plugin. Here's what you do:

1. Get the Extended Playlist Generator Plugin here
2. After installing, open it under components and configure playlist query
3. Here's where you set up the playlist generator to scan a directory (or directories) of your choice. To do this, do something like so (making sure that the directories you want are uniquely named):

(%_path% HAS directoryname/mp3s) AND (NOT %_path% HAS _christmas) AND (NOT %_path% HAS !Misc)

Of course, there's a whole lot more control you can have over this, the stuff here is just a the tip of the iceberg smile.gif Anyways, put your sort spec and sort format in there if you care about such things, make sure that it searches the database, give it a playlist name, and hit save. Now whenever you want to update that folder, there's only two things you've gotta do:

1. Add the file to the database. Unfortunately, none of this will work without adding your songs to the database. Fortunately, however, this is as simple as going into explorer and arranging your folders by "modified", which will put all the newly modifed files at the front.

2. Go to extended playlist generator --> generate playlist. Updated folder, no duplicates smile.gif
jkwarras
Hi,

You may want to read this post:
http://www.hydrogenaudio.org/forums/index....topic=21326&hl=

Mig says that he's coding a plugin named foo_dbupdate, which exactly will update automatically the database biggrin.gif It's expected to be done in 2-3 weeks..
jkwarras
Fi someone doesn't know it already, mig did stop the automatic database updater development:
http://www.hydrogenaudio.org/forums/index....showtopic=23627

He releases the sources of what he already did, so we'll have to wait someone pick up the work wink.gif

About the batch files, is there a way of via a batch file do this?

1) Open foobar
2) Scan the database
3) Remove dead entries from database
4) Create all 'preset' playlist in extended playlist generator.

Now you can laught at me biggrin.gif
janjan
QUOTE(jkwarras @ Jul 30 2004, 02:18 PM)
Fi someone doesn't know it already, mig did stop the automatic database updater development:
http://www.hydrogenaudio.org/forums/index....showtopic=23627

He releases the sources of what he already did, so we'll have to wait someone pick up the work  wink.gif


I got the source compiled and basically it's working but I ran into a heavy crash when enabling/disabling the update function several times. I stripped down the code to see where it crashs but I'm not able to locate the problem. So you have to wait for someone with more coding knowledge and experience than me sad.gif
jkwarras
QUOTE(janjan @ Jul 30 2004, 04:28 AM)
So you have to wait for someone with more coding knowledge and experience than me sad.gif
*



Anyway, thanks for trying, janjan. great appreciated smile.gif
Squeller
QUOTE(BlueScreenJunky @ Aug 24 2003, 02:02 AM)
Now with the tabbed playlist, I think it would be great if foobar could check my "incoming" directory each times it starts, and add the files to a specific playlist. is that possible ? does anyone feel like coding it ? (yeah I know what you think but no, I can't code  tongue.gif )
*

I was thinking about this as well. Its damn easy, with columns ui, to simply drag folders into the sidebar and it would be helpful, if it was an option of a playlist to auto update.
It would be a good concept for a plugin to choose eather a static playlist or a reference to a folder.
.zolder
QUOTE
About the batch files, is there a way of via a batch file do this?

1) Open foobar
2) Scan the database
3) Remove dead entries from database
4) Create all 'preset' playlist in extended playlist generator.

I think it would be a better idea if this would be integrated into Foobar's core itself. It could be added in the Database entry in the Prefs window. This feature should:

1) Scan the database
2) Remove dead entries from database

It should give the user the choice of a few methods of updating, for instance:

* Update at startup
* Update every X minutes, where X should be a variable set by the user
* Update when the user presses some sort of hotkey
* Don't update automatically

Integrating this feature like the way i described above, gives the user the choice of when Foobar should update it's database. In order to achieve this, a section in the Database entry should be made in which a number of options should be given.
When the already existing "Database enabled" checkbox is unchecked the options should be greyed out.
When the already existing "Database enabled" checkbox gets checked, the 2 formerly greyed-out checkbox options should be accessible:

* "Update at startup"
* "Update every X minutes" (where X should be a variable set by the user using a menu, giving the option of rescanning every X minutes)





There should also be an option of scanning when the user wants it to scan. This can be accomplished fairly easy by making a menu entry in the main menu's dropdown menu. That way there can be assigned a keyboard shortcut to the operation using the already existing way in Foobar.

PS:

-- These auto-scan options should be disabled by default, so that the average Joe doesn't get annoyed with the periodical high hd-usage
- The already existing "Restrict directories to" and "Restrict file types" should be used when auto-scanning
- Of course, this is nothing more than a suggestion of how to do it smile.gif
- Getting the extended playlist generator to make playlists automatically is a job for the author of that plugin.
jkwarras
I second what .zolder propose smile.gif

QUOTE
About the batch files, is there a way of via a batch file do this?

1) Open foobar
2) Scan the database
3) Remove dead entries from database
4) Create all 'preset' playlist in extended playlist generator.


I should add:

3.5) Reload info from files if changed.

wink.gif
Jayphen
I third, fourth, and fifth it tongue.gif
poiuytr
QUOTE(Killmaster @ May 13 2004, 05:12 PM)
For what it's worth, there's actually a pretty decent solution for this, using the extended playlist generator plugin. Here's what you do:

1. Get the Extended Playlist Generator Plugin here


The extended playlist generator is a component used to create, update and manage playlists based on Database queries.
I guess it can not scan folder for files.
kheops
bump

something that might be similar for me is a plugin able to scan folder to find orphans files (not in the active playlist)

i wonder if a solution exists now ?

thanks smile.gif
Chronial
You can modify the batch-file to make foobar remove duplicate entrys in the db (by calling foobar with the /command switch).
You can use this batch-file as foobar shortcut, so the directory is scanned every startup.
You can set it to run every 30mins, you can assign it a hotkey. Whatever you want.
QUOTE
About the batch files, is there a way of via a batch file do this?

1) Open foobar
2) Scan the database
3) Remove dead entries from database
4) Create all 'preset' playlist in extended playlist generator.

Yes, it is.
just run foobar.exe /h and you will see how to do this.
poiuytr
QUOTE(Chronial @ May 7 2005, 06:30 AM)
just run foobar.exe /h and you will see how to do this.
*


CODE

ERROR (CORE) : unknown commandline parameter: /h

kjoonlee
foobar2000 /?
poiuytr
Oh yeah, foo_scheduler and CMD file did the trick!
Content of scan.cmd file:
CODE
foobar2000 /playlist_command:add directory "d:\My Downloads\" /playlist_command:remove duplicates /playlist_command:remove dead entries

foo_scheduler can run this file on an event.
Chronial
rofl

you know that windows has it's own scheduler?
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.