PDA

View Full Version : Scanner.exe command line switches



rodlogic
2009-11-06, 05:23
In previous version I have run a scheduled job to update ny Music Library - are the swirches the same for the 7.4.x releases as they are not easy to find.
The rescan from the control panel fails regularly (as detailed my many people - and no it isn't my Anti-Virus and yes I have excluded scanning of *.my* files)

So if anyone can point me to any documents/threads or just post the switches I would be grateful.

Rodlogic

JJZolx
2009-11-06, 23:58
Just run scanner.exe with no arguments to see the command line options.



Usage: scanner [debug options] [--rescan] [--wipe] [--itunes] [--musicip] <path or URL>

Command line options:

--force Force a scan, even if we think a scan is already taking place.
--cleanup Run a database cleanup job at the end of the scan
--rescan Look for new files since the last scan.
--wipe Wipe the DB and start from scratch
--playlists Only scan files in your playlistdir.
--itunes Run the iTunes Importer.
--musicip Run the MusicIP Importer.
--progress Show a progress bar of the scan.
--json FILE Write progress information to a JSON file.
--prefsdir Specify alternative preferences directory.
--priority set process priority from -20 (high) to 20 (low)
--logfile Send all debugging messages to the specified logfile.
--logdir Specify folder location for log file
--logconfig Specify pre-defined logging configuration file
--debug various debug options
--quiet keep silent

Examples:

scanner --rescan /Users/dsully/Music

scanner http://www.somafm.com/groovesalad.pls

rodlogic
2009-11-08, 07:21
thanks - I had tried that under Windows XP in a command window and it just hung !
Thanks for the reply - I will now print it out !

many thanks

ITemplate
2009-11-26, 15:48
Anyone knows what command options is used for the "Clear everything and rescan" option in the SqueezeBox Server control panel?

I have tried this:
Call "C:\Program Files\Squeezebox\server\scanner.exe" --force --wipe --quiet --rescan

But somehow this leaves me with fubar remote control (no music within artist folders). A full rescan from Control Panel solves it though...

Any suggestions on how to mimic that Control Panel option?

--

JJZolx
2009-11-26, 15:55
Anyone knows what command options is used for the "Clear everything and rescan" option in the SqueezeBox Server control panel?

I have tried this:
Call "C:\Program Files\Squeezebox\server\scanner.exe" --force --wipe --quiet --rescan

But somehow this leaves me with fubar remote control (no music within artist folders). A full rescan from Control Panel solves it though...

Any suggestions on how to mimic that Control Panel option?

Use either --rescan _or_ --wipe, not both. These options correspond with the two choices in the web interface. The help documentation doesn't make that very clear.

ITemplate
2009-11-26, 16:20
Use either --rescan _or_ --wipe, not both. These options correspond with the two choices in the web interface. The help documentation doesn't make that very clear.

Yep that did the trick, thanks!

ITemplate
2009-11-28, 09:21
Well not quite unfortunately. Now I have this:
Call "C:\Program Files\Squeezebox\server\scanner.exe" --force --wipe --quiet

However it still does some fubar. For example it will show 90% of all artists with empty content. Again, running a full scan from the Control Panel fixes everything. Unfortunately the scanner log from the Control Panel doesnt show the command line arguments used :(

Any advices?

Edit: A restart of the service seems to have corrected the problem - at least it has run 2 times without fubar. Strange, will report back if the problem re-appears..

ITemplate
2009-12-10, 10:46
No it doesnt work. Anyone know what command line arguments the Control Panel uses?

mherger
2009-12-10, 11:00
> No it doesnt work. Anyone know what command line arguments the Control
> Panel uses?

It's talking to the server, not launching the scanner directly.

ITemplate
2009-12-10, 11:58
> No it doesnt work. Anyone know what command line arguments the Control
> Panel uses?

It's talking to the server, not launching the scanner directly.

No? It creates the same log files...but it could of course explain why it doesnt work as expected. It sucks though, because afaik the scanner command is the only way to update the system from automatic - like after a cd-rip.

:(

--

mherger
2009-12-10, 23:14
Please post your scanner.log file

ITemplate
2009-12-14, 14:30
Please post your scanner.log file

Thanks. I just ran the scan using this command line:
Call "C:\Program Files\Squeezebox\server\scanner.exe" --force --wipe --quiet --logdir C:\IInstall\SqueezeBox D:\shares\Music\Flac

(I have tried several other command argument combinations but it seems to do equally bad. Attached is the log file.

The result of it all is a correct list of artists, but with empty contents.

JJZolx
2009-12-14, 15:09
It sucks though, because afaik the scanner command is the only way to update the system from automatic - like after a cd-rip.

If you want to scan for new music why not just launch the scanner from the web interface's server settings page?

And if you want to schedule a daily scan why not use the 'Rescan Music Library' plugin?

gharris999
2009-12-14, 15:24
For situations like this, use the SysInternals Process Explorer utility: http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

Unlike the task manager, Procexp.exe will tell you the exact command line of a running process...and let you copy it to the clipboard.

So, initiate the kind of scan you're interested in from the SBS web interface, check out the full command line of scanner.exe via procexp.exe and then create a short cut or what have you with that command line.

ITemplate
2009-12-15, 07:39
If you want to scan for new music why not just launch the scanner from the web interface's server settings page?

And if you want to schedule a daily scan why not use the 'Rescan Music Library' plugin?

Its about running the scanner on demand. And running it from the Control panel or the settings page is what I do now. Works alright but its too complicated for wife and kids.

This was investigated in advance you see. This is one of the reasons I got a Squeezebox - the possibility to run a scan from a command line. I have the whole setup where the wife only has to insert a new disc when she has one. Then its supposed to rip the CD, update SqueezeCenter and eject the disc. This works - except the update part.

--

ITemplate
2009-12-15, 07:40
For situations like this, use the SysInternals Process Explorer utility: http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

Unlike the task manager, Procexp.exe will tell you the exact command line of a running process...and let you copy it to the clipboard.

So, initiate the kind of scan you're interested in from the SBS web interface, check out the full command line of scanner.exe via procexp.exe and then create a short cut or what have you with that command line.

But accordingly to "mherger" this is not how the Control panel does things. But I could give it a go. Will report back about result...

JJZolx
2009-12-15, 09:52
Its about running the scanner on demand. And running it from the Control panel or the settings page is what I do now. Works alright but its too complicated for wife and kids.

This was investigated in advance you see. This is one of the reasons I got a Squeezebox - the possibility to run a scan from a command line. I have the whole setup where the wife only has to insert a new disc when she has one. Then its supposed to rip the CD, update SqueezeCenter and eject the disc. This works - except the update part.

You posted a log that looks perfectly normal. Are there files missing from the log?

Why are you doing a --wipe if you want to update following the ripping of a CD? A new & changed scan (--rescan) is much faster and the library is usable during the scan.

ITemplate
2009-12-15, 10:12
You posted a log that looks perfectly normal. Are there files missing from the log?

Why are you doing a --wipe if you want to update following the ripping of a CD? A new & changed scan (--rescan) is much faster and the library is usable during the scan.

I'm not doing a rescan because that doesnt work either. So just to start off at some point I'm trying to do a complete "new" scan.

The log is complete if thats what you ask. I havent edited it at all.

JJZolx
2009-12-15, 10:18
I'm not doing a rescan because that doesnt work either. So just to start off at some point I'm trying to do a complete "new" scan.

The log is complete if thats what you ask. I havent edited it at all.

No, that's not what I ask. When you see the "problem" following a scan (missing content) have you looked at the scanner log and found that the missing tracks were not scanned?

ITemplate
2009-12-15, 11:44
No, that's not what I ask. When you see the "problem" following a scan (missing content) have you looked at the scanner log and found that the missing tracks were not scanned?

No everything is there. Let me explain. I took the processexplorer and found out that the Control Panel runs this command:

C:/PROGRA~1/SQUEEZ~2/server/scanner.exe "--logconfig=C:\Documents and Settings\All Users\Application Data\Squeezebox\prefs\log.conf" --priority=0 --wipe --prefsdir=C:\DOCUME~1\ALLUSE~1\APPLIC~1\SQUEEZ~2\pr efs --debug scan=ERROR,artwork=ERROR,scan.import=ERROR,scan.sc anner=ERROR,plugin.musicip=ERROR,plugin.itunes=ERR OR

So I copied it and ran it just now with the SAME results as I see from my other trys. And this is what I see in my remote:

Artists, Albums displays all artists and albums. But their content is "empty". Genres is empty.

Years, New Music and Random mix works as they should!!!!!

So the music IS there, and can be played using either Years, New Music or Mix.

This is very odd - I guess that control panel does additional stuff after running the scanner. I have compared the log file from the above command line with the logfile created after an update from the Control Panel. They are bit equal. Do you guys have any problem with the scanner if you run it? I mean - is it just on my WHS this is happening or is there a bug in the scanner?

--

ITemplate
2009-12-15, 12:52
Ok some new information / development.

I see now that the problem apparantly is only seen on the remote. The web interface shows all songs under each artist correct (and plays them). It doesnt help to restart the remote.

As usual, running the full scan from the Control Panel and the remote is back in business...sigh - I'd better play a poker tournament and get my mind on something else :)

JJZolx
2009-12-15, 13:24
http://forums.slimdevices.com/showthread.php?t=57783

http://forums.slimdevices.com/showthread.php?t=69323

http://forums.slimdevices.com/showthread.php?t=70070

and more. The Controller has issues. Always has. Probably always will.

ITemplate
2009-12-15, 13:44
http://forums.slimdevices.com/showthread.php?t=57783

http://forums.slimdevices.com/showthread.php?t=69323

http://forums.slimdevices.com/showthread.php?t=70070

and more. The Controller has issues. Always has. Probably always will.

Well perhaps, but this is different. Remember if I run the update from the Control Panel I do not have any problems with the controller - at all. I only have problems when running the scanner manually.

This indicates a "bug" with the scanner that the control panel (squeezesvr service) somehow fixes. This is not "some" issues with certain artists or missing artwork. I'm having empty content for ALL artists and ALL albums. So while it manifests itself the same way as the sporadic problems from those threads (empty content) its probably just the controller saying "I'm having a problem" - not actually the same problem.

Is this the correct forum for logitech support? Or how to get in contact with them? I guess I must escalate it to some support case because this is a real problem for me, and should be fairly easy to investigate for some Developer looking at what the heck the diff is for running an update from the CP versus running it manually...

mherger
2009-12-15, 14:41
> I see now that the problem apparantly is only seen on the remote. The
> web interface shows all songs under each artist correct (and plays
> them). It doesnt help to restart the remote.

Controller is served some cached set of items. This cache very likely isn't built when you run the scanner externally, but only if the server is aware of the scan. What you should do is the same as the control panel: use the CLI to tell the server to trigger a new scan.

telnet localhost 9090
rescan

(or "wipecache" for a full rescan). Netcat or similar can help automate this.
--

Michael

gharris999
2009-12-15, 15:23
As long as you're operating in Windows, you could use the SCCLITool.exe utility: http://srvrpowerctrl.googlecode.com/files/SCPowerTool_latest.exe Finding non-scary windows binaries for netcat can be something of a chore.

Batch file to initiate a scan from the local server or from a remote machine (like a laptop) --

wipenscan.cmd:


@echo off
set SCIP=your_servers_ip
set CLIPORT=9090

rem Rescan the whole library:
SCCLITool.exe wipecache -q -w 0 -h %SCIP% -p %CLIPORT%

rem Scan for new music:
rem SCCLITool.exe rescan -q -w 0 -h %SCIP% -p %CLIPORT%


And attached, some handy Squeezebox icons. Make a shortcut to that batch file, set the shortcut's icon to one of the icons included in the zip, and drop the shortcut onto your task bar's quick-launch tool bar. Easy-peasy.

Here's another trickier CLI batch file:

new_random_play.cmd:


@echo off
setlocal ENABLEDELAYEDEXPANSION
set SCIP=your_servers_ip
set CLIPORT=9090
set MACADDR=your_players_mac_address

rem This script starts a new random play..

rem Select a random number:

set /A RN=%random% %% 4 + 1

if "%RN%"=="1" set SEL=tracks
if "%RN%"=="2" set SEL=albums
if "%RN%"=="3" set SEL=contributors
if "%RN%"=="4" set SEL=year


echo Selecting randomplay by %SEL%

rem Must stop any playback before a new random play..
SCCLITool.exe %MACADDR% stop -q -w 0 -h %SCIP% -p %CLIPORT%

SCCLITool.exe %MACADDR% randomplay %SEL% -q -w 0 -h %SCIP% -p %CLIPORT%

ITemplate
2009-12-15, 15:51
Yes! That did it - this is excellent. Thanks so much both, everything is working now :)