eadir extraction working

This commit is contained in:
2025-10-12 16:31:41 -06:00
parent b140883b90
commit b8418641e1
3 changed files with 468 additions and 24 deletions

View File

@@ -29,6 +29,14 @@ if "%WINPATH%"=="" (
exit /b
)
REM Convert Windows path to NAS path and pre-seed eaDir_tmp from @eaDir on NAS
set "RELPATH=%WINPATH:~3%"
set "RELPATH=%RELPATH:\=/%"
set "NASPATH=/volume1/Hydra/%RELPATH%"
echo Seeding existing thumbnails on NAS (extract_eadir_to_tmp.sh)...
ssh Hydra "bash -lc '~/extract_eadir_to_tmp.sh \"%NASPATH%\" || true'"
REM Run psthumbgen.py
python psthumbgen.py --directory "%WINPATH%"
goto END
@@ -50,17 +58,9 @@ echo DEBUG: WINPATH = %WINPATH%
echo DEBUG: RELPATH = %RELPATH%
echo DEBUG: NASPATH = %NASPATH%
echo.
REM SSH cleanup commands (run separately)
echo Running SSH cleanup commands...
echo.
echo Please run these commands manually on your NAS:
echo.
echo ssh nathan@hydra
echo find "%NASPATH%" -type d -name '@eaDir' -exec rm -rf '{}' \;
echo find "%NASPATH%" -type d -name 'eaDir_tmp' -exec bash -c 'mv "$0" "${0%%/*}/@eaDir"' {} \;
echo.
echo Press any key when done...
REM SSH cleanup - run nascleanup.sh on NAS if available
echo Running SSH cleanup on NAS...
ssh Hydra "bash -lc 'if [ -x ~/nascleanup.sh ]; then ~/nascleanup.sh \"%NASPATH%\"; else echo \"nascleanup.sh not found on NAS at ~/nascleanup.sh. Upload it or run cleanup manually.\"; fi'"
goto END
:BOTH
@@ -71,9 +71,6 @@ if "%WINPATH%"=="" (
exit /b
)
REM Run psthumbgen.py
python psthumbgen.py --directory "%WINPATH%"
REM Convert Windows path to NAS path
set "RELPATH=%WINPATH:~3%"
set "RELPATH=%RELPATH:\=/%"
@@ -84,16 +81,16 @@ echo DEBUG: RELPATH = %RELPATH%
echo DEBUG: NASPATH = %NASPATH%
echo.
REM SSH cleanup commands (run separately)
echo Running SSH cleanup commands...
echo.
echo Please run these commands manually on your NAS:
echo.
echo ssh nathan@hydra
echo find "%NASPATH%" -type d -name '@eaDir' -exec rm -rf '{}' \;
echo find "%NASPATH%" -type d -name 'eaDir_tmp' -exec bash -c 'mv "$0" "${0%%/*}/@eaDir"' {} \;
echo.
echo Press any key when done...
REM Pre-seed eaDir_tmp from @eaDir on NAS before generation
echo Seeding existing thumbnails on NAS (extract_eadir_to_tmp.sh)...
ssh Hydra "bash -lc '~/extract_eadir_to_tmp.sh \"%NASPATH%\" || true'"
REM Run psthumbgen.py
python psthumbgen.py --directory "%WINPATH%"
REM SSH cleanup - run nascleanup.sh on NAS if available
echo Running SSH cleanup on NAS...
ssh Hydra "bash -lc 'if [ -x ~/nascleanup.sh ]; then ~/nascleanup.sh \"%NASPATH%\"; else echo \"nascleanup.sh not found on NAS at ~/nascleanup.sh. Upload it or run cleanup manually.\"; fi'"
goto END
:FIX_ONEDRIVE