Updates were made to script. Video corruption occurs with CIDs with multiple streams so script now checks for and deletes any corrupted videos. If there were corrupted videos, script automatically tries to download list again. Script doesn't care if the video it deleted wasn't originally in the ids.txt, all .ts files are checked. Script shouldn't disappear suddenly when finished, it now waits for user input. I only bothered to test once in Terminal which doesn't disappear after task is complete.
Script uses ffprobe.exe to check for corruption. Download from here: https://ffmpeg.org/download.html
Extract and place in the same folder as script.
@echo off setlocal enabledelayedexpansion title JAV-IT Download List Script set /a maxProcesses = 5 set count=0 for /f "tokens=*" %%n in (ids.txt) do ( set /a count+=1 set cid[!count!]=%%n ) :beforetheloop set /a x=1 :loop if %x% GTR %count% (goto :wait) for /f %%a in ('tasklist^|find /c "jav-it.exe"') do (set numProcesses=%%a) if %numProcesses% lss %maxProcesses% ( call echo "%time% starting %%cid[!x!]%%" start /min jav-it.exe download /c cookies.txt /i "!cid[%x%]!" /o %CD% set /a x+=1 timeout /t 5 /nobreak > nul ) else ( timeout /t 5 /nobreak > nul ) goto :loop :wait set /a currentProcesses=%numProcesses% for /f %%a in ('tasklist^|find /c "jav-it.exe"') do (set numProcesses=%%a) if !numProcesses! == 0 ( echo "All downloads complete" goto :check ) else ( if %numProcesses% lss %currentProcesses% ( echo "waiting for %numProcesses% processes to finish" ) timeout /t 5 /nobreak > nul goto :wait ) :check set /a numError=0 FOR /F "delims=*" %%G in ('dir /b *.ts') DO ( ffprobe -i %%G -show_error -loglevel fatal | findstr /C:"ERROR">nul && ( Echo "%%G has fatal errors, deleting" del %%G set /a numError+=1 ) || ( Echo "%%G has no fatal errors" ) ) if !numError! == 0 ( echo "no errors found, all downloads complete" pause goto :eof ) else ( echo "errors were found and deleted, starting downloads again" goto :beforetheloop )
OG post:
Since R18 is shutting down I thought it be a good idea to download the videos I purchased from them. However, I didn't know the itch.io version of this program is unbearably slow. I can increase speed by downloading multiple videos at once, but it's annoying to keep track of. To use script, create a file named ids.txt in the same directory as jav-it.exe and cookies with the content IDs you want to download following this format:
jav1 jav2 jav3
Script downloads 5 videos at a time. Some videos are really several videos with the same content ID, those will always download sequentially. Don't run multiple instances of this script. Script does not check if .partial exists, it is possible to have two .exes downloading the same thing at the same location. Increase maxProcesses value to increase number of videos downloaded at once. Copy the following and save as downloadlist.bat and run it like you would Download.bat in the GUIDE.
@echo off setlocal enabledelayedexpansion title JAV-IT Download List Script set /a maxProcesses = 5 set count=0 for /f "tokens=*" %%n in (ids.txt) do ( set /a count+=1 set cid[!count!]=%%n ) set /a x=1 :loop if %x% GTR %count% (goto :eof) for /f %%a in ('tasklist^|find /c "jav-it.exe"') do (set numProcesses=%%a) if %numProcesses% lss %maxProcesses% ( call echo "%time% starting %%cid[!x!]%%" start /min jav-it.exe download /c cookies.txt /i "!cid[%x%]!" /o %CD% set /a x+=1 timeout /t 5 > nul ) else ( timeout /t 5 > nul ) goto :loop pause
This is my first time writing a batch script so feel free to improve it.