add/rescan from a script

Post a reply

Visual Confirmation

To prevent automated access and spam, you are required to confirm that you are human. Please place a check mark next to all images of monkeys or apes. If you cannot see any images, please contact the Board Administrator.

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: add/rescan from a script

Re: add/rescan from a script

Post by trixmoto » Mon Aug 02, 2010 3:03 pm

Unfortunately some ini values cannot be changed because they are stored internally and cannot be updated here. You can't change the auto-tag from web source either, which I have complained about before! I've been assured this will be resolved in a future version, but looks like this won't be possible at the moment.

Re: add/rescan from a script

Post by jon_beeker » Mon Aug 02, 2010 12:36 pm

Ok, that did not go so well.

I can read from the mediamonkey.ini file with "msgbox SDB.IniFile.BoolValue("AutoScan","ScanOnStart1")" -->Returns true
but if I set the value with "SDB.IniFile.BoolValue("AutoScan","ScanOnStart1") = False", the next time I start the program it is back to True.

How do you write to the ini file?

Thanks again, Jon

Re: add/rescan from a script

Post by jon_beeker » Sun Aug 01, 2010 1:34 pm

Thanks, that might work for me. I will give it a try.

Re: add/rescan from a script

Post by trixmoto » Sun Aug 01, 2010 4:44 am

It might have been clearer if you'd described what "a.vbs" and "b.vbs" were doing, but on the assumption that if "a.vbs" is taking a long time then it's the one that you want to run the file monitor, and only once a week. As you can't currently trigger the file monitor from a script, how about setting the "ScanOnStart" to true as you shutdown once a week and then at shutdown switch it off if it's on. I believe this would have the desired affect. The file monitor settings are stored in "MediaMonkey.ini" here...

Code: Select all
[AutoScan]
autoRemoveDeadLinks=0
autoRemoveAttributes=1
FolderCount=2
Path1=D:\Music\_Downloaded\
Subfolders1=1
ScanOnStart1=1
Path2=D:\Music\
Subfolders2=1
ScanOnStart2=0


...so for me I have the whole "Music" folder monitored, but only the "_Downloaded" folder at startup. It's the "ScanOnStart1" and/or "ScanOnStart2" which would need to be modified for me. Does this make sense?

add/rescan from a script

Post by jon_beeker » Sat Jul 31, 2010 12:53 pm

Hi, I have a simple question that I cannot figure out. I am trying to completely automate the handling of my library with scripts, but cannot see a way to get MM to add/rescan from a script. Is this possible?

Also, is there a command line option that will run a specific script at startup? ie, once a week, I would like to run script “a.vbs” on startup, but most of the time script “b.vbs” where a.vbs is a maintenance script that takes a long time to run and I do not want to do it all the time. Like I said, I am trying to completely automate various tasks.

Thanks in advance, Jon

Top