Comando personalizado fallando

No estoy seguro de qué lo desencadenó, si una actualización del SO o una actualización de MCEB, pero en las compilaciones .7 y .8 los archivos convertidos ya no se están moviendo a mi unidad de red.

Esto ha funcionado durante años, así que no estoy seguro de qué hice para arruinarlo.

Como siempre, he actualizado el servicio con un usuario de cuenta de administrador. También he intentado agregar el mismo usuario a la configuración de Autenticación de Red en la interfaz, en configuración.

Noté esto en el registro de conversión, pero no entiendo por qué, ya que no hay caracteres ilegales en la ruta.

E:\VideoCaptures\Cleaned Files\Zoo Drop It Like Its Hot s03 e05 07-27-2017.ts

INFORMATION> 2017-07-28T16:15:09 MCEBuddy.Engine.ConversionJob → Running custom commands
→ Custom Renaming Command → %showname% %episodename% s%season%## e%episode%## %airmonth%-%airday%-%airyear% %rating%
WARNING> → Cannot find Parental Rating
2017-07-28T16:15:09 MCEBuddy.Transcode.CustomCommand → Custom command parameters read →
PostCustomCommandPath = “e:\videocaptures\cleaned files\mcebpostprocess.bat”
PostCustomCommandParameters = “%convertedfile%” %sourcefile% “%destinationpath%” 1080 .%convertedext% 0 %airmonth% %airday% %airyear% %season%##
PostCustomCommandHangPeriod = 0
PostCustomCommandCritical = False
PostCustomCommandUISession = False
PostCustomCommandShowWindow = True
PostCustomCommandExitCodeCheck = False
ERROR> 2017-07-28T16:15:09 MCEBuddy.Engine.ConversionJob → Unhanded error during conversion, conversion cancelled
System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.IsPathRooted(String path)
at MCEBuddy.Transcode.CustomCommand.Run()
at MCEBuddy.Engine.ConversionJob.Convert()
INFORMATION> 2017-07-28T16:15:09 MCEBuddy.Engine.ConversionJob →
→ Performance Metrics for the Current Conversion
→

Subí ambos registros al servidor FTP.

Eso se debe a que tu comando personalizado está generando un comando inválido:

PostCustomCommandPath = “e:\videocaptures\cleaned files\mcebpostprocess.bat”
PostCustomCommandParameters = "%convertedfile% %sourcefile% “%destinationpath%” 1080 .%convertedext% 0 %airmonth% %airday% %airyear% %season%##
PostCustomCommandHangPeriod = 0
PostCustomCommandCritical = False
PostCustomCommandUISession = False
PostCustomCommandShowWindow = True
PostCustomCommandExitCodeCheck = False
ERROR> 2017-07-28T16:15:09 MCEBuddy.Engine.ConversionJob → Unhanded error during conversion, conversion cancelled
System.ArgumentException: Caracteres no válidos en la ruta.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.IsPathRooted(String path)
at MCEBuddy.Transcode.CustomCommand.Run()
at MCEBuddy.Engine.ConversionJob.Convert()

Tu comando personalizado está generando caracteres de ruta inválidos para tu archivo de comandos por lotes.

Hmmmm ¿Algo cambió en la compilación .7 (.8), o metí la pata? (No hice ningún cambio a propósito). He revisado las copias de seguridad de mi sistema y retrocedí 30 días, y no veo cambios en nada de lo siguiente.

Aquí está la cadena de comandos tal como se presenta en el perfil

PostCustomCommandPath=“E:\VideoCaptures\Cleaned Files\MCEBPostProcess.bat”
PostCustomCommandParameters=“%convertedfile%” %sourcefile% “%destinationpath%” 1080 .%convertedext% 0 %airmonth% %airday% %airyear% %season%##
PostCustomCommandHangPeriod=0
PostCustomCommandCritical=false

Aquí está el archivo .bat llamado:

@ECHO OFF

setlocal EnableDelayedExpansion

SET BatFile=“E:\VideoCaptures\Cleaned Files\TVTransfer.bat”
SET OutputFileName=“%~n1”
SET InputFileName=“%~n2”
SET FolderOutput=“%~3”
SET WideoWidth=“%~4”
SET OutputExtension=“%~5”
SET OutputFileSize=“%~z1”
SET OADMonth=“%~7”
SET OADDay=“%~8”
SET OADYear=“%~9”
SHIFT /4
SET SEASON=%~9
Call %BatFile% %OutputFileName% %InputFileName% %FolderOutput% %WideoWidth% %OutputExtension% %OutputFileSize% %OADMonth% %OADDay% %OADYear% %SEASON%

Aquí está el archivo .bat donde se realiza todo el trabajo.

@ECHO ON
setlocal EnableDelayedExpansion

SET sPAT=“\SERVER\Recorded TV\Other Shows”
SET OUTPUT_NAME=“%~1”
SET INPUT_NAME=%~2
SET OUTPUT_FOLDER=%~3
SET VIEDO_WIDTH=%~4
SET OUTPUT_Ext=%~5
SET OUTPUT_FILE_SIZE_MB=%~6
SET OAD_MONTH=%~7
SET OAD_DAY=%~8
SET OAD_YEAR=%~9
SHIFT /4
SET SEASON=%~9
SET SEARCHNAME=

If “%OAD_MONTH%” == “” (
SET OAD_MONTH=NA
)
If “%OAD_DAY%” == “” (
SET OAD_MONTH=NA
)
If “%OAD_YEAR%” == “” (
SET OAD_MONTH=NA
)
If “%SEASON%” == “” (
SET SEASON=NA
)

echo.%OAD_MONTH%
echo.%OUTPUT_FILE_SIZE_MB%

::Todays Date
FOR %%A IN (%Date%) DO (
FOR /F “tokens=1-3 delims=/-" %%B in (”%%~A") DO (
SET MMDDYYYY=%%B-%%C-%%D
)
)

If %OAD_MONTH% NEQ NA (
SET MMDDYYYY=%OAD_MONTH%-%OAD_DAY%-%OAD_YEAR%
)

echo.%MMDDYYYY%

:: Only procc. the video files, otherwise just delete
If %OUTPUT_FILE_SIZE_MB% LEQ 200000000 (
DEL /q “%OUTPUT_FOLDER%%~1%OUTPUT_Ext%”
EXIT
)

::Remove any Spaces from Search Name
set HAYSTACK=%INPUT_NAME%
set HAYSTACK=%HAYSTACK: =%

echo.%HAYSTACK%

:: Grab the string before the first “-”.
for /f “delims=-” %%i in (“%HAYSTACK%”) do set string=%%i
SET SEARCHNAME=%string%

echo.%SEARCHNAME%

:: Get the Show Params
for /f “tokens=2-3 delims=;” %%A in (‘findstr /b /i “%SEARCHNAME%” “C:\FTPSyncFiles\Bat Files\SHOWPARMS.txt”’) do (

SET sPAT=%%A
)

echo This is the program path %sPAT%

:: Copy to the Server
If %sPAT% NEQ “” (

IF %SEASON% NEQ NA (
:: Check to see if Dir exist already
if NOT EXIST %sPAT%\SEASON-%SEASON% (
MD %sPAT%\SEASON-%SEASON%
)

  :: Removed the use of OUTPUT_NAME becuase of special charictors and used %~1 (Which removes the quotes) instead
  	START "MCE Move" /b cmd /c move /y "%OUTPUT_FOLDER%\%~1%OUTPUT_Ext%" %sPAT%\SEASON-%SEASON%	
  	:: Update the root directory with the current date using Touch.exe
  	touch -m %sPAT%
) ELSE ( 
  :: Check to see if Dir exist already
  if NOT EXIST %sPAT%\%MMDDYYYY% (
	   MD %sPAT%\%MMDDYYYY%
  )
  	:: Removed the use of OUTPUT_NAME becuase of special charictors and used %~1 (Which removes the quotes) instead
  	START "MCE Move" /b cmd /c move /y "%OUTPUT_FOLDER%\%~1%OUTPUT_Ext%" %sPAT%\%MMDDYYYY%
  	:: Update the root directory with the current date using Touch.exe
  	touch -m %sPAT%
 )

:: Delete the .properties files if present
DEL /q “E:\VideoCaptures\QSF%INPUT_NAME%.ts.properties”
DEL /q “E:\VideoCaptures\QSF%INPUT_NAME%.mpg.properties”
)

Comienza imprimiendo las variables que se están pasando a tu comando personalizado. Las variables provienen de tus metadatos. Mira tus registros para ver qué metadatos se están pasando a MCEBuddy y tendrás tu respuesta sobre por qué hay un carácter ilegal en tu ruta.

¿Cómo veo las variables que MCE transmite en .7 o .8? Las versiones anteriores registraban la salida de MCE en un registro de depuración, pero parece que ya no es así. Lo único que encuentro son los nombres de las variables reales utilizadas registradas.

He confirmado que MCEBPostProcess.bat y TVTransfer.bat funcionan al construir manualmente una sesión CMD usando el nombre de archivo producido por MCE.

Simplemente modifica tu archivo por lotes para imprimir las variables de entrada y enciérralas entre comillas para que puedas ver los espacios en blanco o escríbelas en un archivo de texto.

Parece que no se está pasando nada.

El archivo de texto está vacío (estoy escribiendo las variables en un archivo de texto), pero si ejecuto el archivo .bat manualmente usando:

“e:\videocaptures\cleaned files\mcebpostprocess.bat” “E:\VideoCaptures\Cleaned Files\Cops Dirty Laundry s30 e07 07-29-2017.ts” E:\VideoCaptures\Cops-S30E07-DirtyLaundry-62792569-0.ts “E:\VideoCaptures\Cleaned Files” 1080 .ts 2.500.852 07 28 2017 05

Obtengo esto:

BatFileName “E:\VideoCaptures\Cleaned Files\TVTransfer.bat”
VideoOutPut “Cops Dirty Laundry s30 e07 07-29-2017”
VideoInPut “Cops-S30E07-DirtyLaundry-62792569-0”
FolderOutPut “E:\VideoCaptures\Cleaned Files”
VideoWidth “1080”
OutputExt “.ts”
FileSize “2.500.852”
Month “07”
Year “2017”
Season 05

Aquí está el mcebpostprocess.bat modificado

ECHO ON

setlocal EnableDelayedExpansion

SET BatFile=“E:\VideoCaptures\Cleaned Files\TVTransfer.bat”
SET OutputFileName=“%~n1”
SET InputFileName=“%~n2”
SET FolderOutput=“%~3”
SET WideoWidth=“%~4”
SET OutputExtension=“%~5”
SET OutputFileSize=“%~6”
SET OADMonth=“%~7”
SET OADDay=“%~8”
SET OADYear=“%~9”
SHIFT /4
SET SEASON=%~9

echo BatFileName %BatFile% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo VideoOutPut %OutputFileName% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo VideoInPut %InputFileName% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo FolderOutPut %FolderOutput% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo VideoWidth %WideoWidth% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo OutputExt %OutputExtension% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo FileSize %OutputFileSize% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo Month %OADMonth% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo Year %OADYear% >> C:\Users\Wolverine\Desktop\MCEVARS.txt
echo Season %SEASON% >> C:\Users\Wolverine\Desktop\MCEVARS.txt

Call %BatFile% %OutputFileName% %InputFileName% %FolderOutput% %WideoWidth% %OutputExtension% %OutputFileSize% %OADMonth% %OADDay% %OADYear% %SEASON%

Entonces tu archivo no tiene metadatos. Revisa tu registro de conversión para ver qué metadatos se están extrayendo de tu archivo o adjunta tu registro de conversión.

No sé qué buscar, así que lo he adjuntado.

Cops-S30E07-DirtyLaundry-62792569-0.ts-TS-2017-08-02T16-01-23.2099867-04-00.zip (36,3 KB)

No entiendo cómo MCE puede renombrar el archivo con la mayor parte de la misma información que se solicita en las variables y aún así fallar. ¿Supondré que la información proviene de 2 lugares diferentes?

No lo sé, pero esto me tiene la cabeza dando vueltas.

Asumo que el archivo bat realmente está configurado como SET sPAT=\"\\\\SERVER\\Recorded TV\\Other Shows\" para el servidor y el software del foro lo convirtió en SET sPAT="\SERVER\Recorded TV\Other Shows" en el comentario anterior.

Sí, eso es correcto.

Me perdí esto por completo, este es tu problema. Has encapsulado tu ejecutable entre comillas, cuando se pasa a Windows lanza un error de ruta ilegal porque la ruta o los nombres de archivo no deben contener el carácter \". Si lo quitas debería funcionar bien, debería verse así:

PostCustomCommandPath=E:\\VideoCaptures\\Cleaned Files\\MCEBPostProcess.bat

Nota aparte, quizás quieras actualizar a la versión BETA 2.4.8 de hoy, noté un problema con tu coincidencia de metadatos de IMDB que hemos corregido y eso debería darte también tu clasificación parental faltante.

EDIT: En la versión de hoy también hemos agregado una verificación para este carácter \" inválido y MCEBuddy lo eliminará de CustomCommandPath si se encuentra para evitar este fallo.

Eso fue todo, quité las comillas y ¡presto, funcionó de maravilla!

¡Gracias por corregir el problema de clasificación parental tan rápido!