aubuti;395352 Wrote: 
> Sorry for a really basic question here, but if it was mentioned in this
> thread then I missed it. Does the SrvrPowerControl plugin check to see
> if the server is doing things unrelated to SC before it
> suspends/hibernates? Or is not suspending/hibernating in the middle of
> a process already handled by the power management utilities on the
> server? Just having these visions of my server suspending in the middle
> of a big transfer of FLAC files.... Thanks.
No, there's no mechanism to check for server activity besides SB
playback or firmware updating.  However, it's very easy to temporarily
block SrvrPowerCtrl's actions, using any of 3 different methods:

1). On linux, if SrvrPowerCtrl sees that the file "/var/lock/sc-block
exists, it won't take any action.  (This will change with the next
version of SrvrPowerCtrl: for linux it will be /var/lock/spc-block, for
Windows, it will be C:\Windows\temp\spc-block)

2). You can use either the IR remote or an SBC to block actions by
selecting a menu item.

3).  You can issue a CLI request ("srvrpowerctrl setblock reason
viacli").

Any of those can be used to temporarily block on-idle
shutdown/suspend/hibernation/etc..

What sort of a system are you transferring those flacs from?  Windows? 
If so, you could put a couple of shortcuts on your quick-launch task bar
to block and unblock.  Or, if you use a batch file for transferring the
flacs to the server, you could do what I do:  include a ping-check to
see if the server is awake...and if not, WOL it; then set a block;
transfer the files; clear the block.

This is the batch file I use for copying flacs to my server.  It copies
the flac in question to the music server and also to a backup music
drive.  You'd need to change the details (ip address of your server,
mac address, source path head to your rip directory, etc.  

CopyFlacToSCServer.cmd

Code:
--------------------
    
  @echo off
  
  :checkwake
  rem Check the server status..
  ping scserver -n 1 -w 10 >NUL
  if errorlevel 1 goto wakeup
  goto awake
  
  
  :wakeup
  echo Server is asleep...attempting to wake it up..
  rem Wakeup the server..
  %windir%\util\wolcmd.exe AABBCCDDEEFF 192.168.0.255 255.255.255.0 7 >NUL
  sleep 15
  goto checkwake
  
  :awake
  
  :setblock
  %windir%\util\SCCliTool.exe srvrpowerctrl setblock nada viacli -h scserver -p 
9090
  
  set RIPSOURCE=E:\Recordings\Music_New\
  
  :CHGDIR
  rem change to the input file drive and directory..
  %~d1
  cd "%~p1"
  if "%CD%\"=="%~dp1" goto CHK_FLAC
  echo Sorry.  "%CD%\" does not == "%~dp1"
  goto end
  
  :CHK_FLAC
  if exist "%~n1.flac" goto COPYFLAC
  echo Sorry.  I only process FLAC files.  Better luck next time.
  pause
  goto end
  
  :COPYFLAC
  set SRC=.\
  set XDST=%~dp1
  rem set YDST=\\scserver\Media\Music\%XDST:%RIPSOURCE%=%
  set YDST=\\scserver\Media\Music\%XDST:E:\Recordings\Music_New\=%
  if "%~d1"=="G:" set YDST=\\scserver\Media\Music\%XDST:G:\Music\=%
  set DST=%YDST:~0,-1%
  set FIL="%~n1.flac"
  
  rem echo YDST: %YDST%
  rem echo SRC: %SRC%
  rem echo DST: %DST%
  
  "%~dp0robocopy" %SRC%   "%DST%"   %FIL%   /NJH /NJS /NDL /r:0   /w:0   /FFT
  if "%~d1"=="G:" goto done
  
  set YDST=G:\Music\%XDST:E:\Recordings\Music_New\=%
  set DST=%YDST:~0,-1%
  "%~dp0robocopy" %SRC%   "%DST%"   %FIL%   /NJH /NJS /NDL /r:0   /w:0   /FFT
  
  :MARKASDONE
  if exist "%~n1.flac" move /y "%~n1.flac" "%~n1.flac.done"
  
  :done
  if "%2"=="nopause" goto end
  echo Done!
  
  :clearblock
  %windir%\util\SCCliTool.exe srvrpowerctrl clear nada viacli -h scserver -p 
9090
  
  :end
  
--------------------


I rip to "E:\Recordings\Music_New\Genre Name\Composer Name" and the
batch file copies the flacs to a samba share
"\\scserver\Media\Music\Genre Name\Composer Name".

You could make a shortcut to this batch file and just drag & drop the
flac onto it to initiate the copy.  Or, as I do, call the script from
another script...in my case, I always rip flacs to single-file-per-cd
images so I have a "post rip" batch file that fixes up the cuesheet
with genre & composer info, embeds the cuesheet, embeds the lyrics,
embeds the rip log, calculates the replay-gain, embeds the
coverart....and THEN copies the processed flac to the server and the
backup.


-- 
gharris999
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=48521

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to