Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Jav-It

The most comprehensive JAV video cataloging tool. · By jav-it

[TUTORIAL] Udpdated. Script that downloads from list using itch.io version of jav-it

A topic by itchastitch created Sep 27, 2022 Views: 956 Replies: 9
Viewing posts 1 to 7
(3 edits) (+1)

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.

I would love to use this , but i still have not  found out how to get the whole thing even running , or where to put in my data, that it works.

I do understand basic :P but not how to use this

You need to create two files.

First open notepad and copy and paste the large block of text in the original post. Then save as downloadlist.bat.

Then create a text file in which you copy and paste the IDs for the five videos you want to download. Each ID has to be in a new line. Save that file as ids.txt.

Put both of these files in the same location as jav-it.exe. Then double-click on downloadlist.bat and the script should run.

The readme.txt is kind of useless. Follow what Download.bat is doing, although you don't really need to understand what the script is doing to use it. Extract and move contents from GUIDE.zip and jav-it_v1.7.3_windows.zip into a single folder. For cookies.txt use this extension for firefox. A little cookie should appear where extensions live. Log into R18 and go to library. Click on the cookie and export from R18.com, the middle one. If that one doesn't work try the top one, you know it fails because jav-it will close pretty quickly. Save and rename to cookies.txt, move file to the folder you put the other stuff. From here double clicking on Download.bat should work. Try downloading something from your library. If that works then you can use my script. Open notepad.exe. Copy and paste code into notepad. File > save as, type "downloadlist.bat" and save. Move the file to the folder with all the other stuff. Double clicking downloadlist.bat should start downloads. Script assumes you're downloading from R18 and grabs the CIDs from ids.txt. Once one file has finished downloading it starts the next until it goes through the entire list. 

hi 

lets clarify i can use the normal script.

You bats shows me a list of 5 titeles from the id.txt

I dont know if anything else is happening the same with parameters.

It starts 5 instances of jav-it.exe, each downloading 1 video from ids.txt. I set argument so that they start minimized because popup will set cmd.exe as active window. Once 1 jav-it.exe closes for whatever reason it starts another jav-it download. If it stays at first 5 then they're probably downloading. Downloads usually last 1 hr, which is why i created script, so i wouldn't need to babysit while stuff downloads. The script has no idea what jav-it.exe is doing, it just knows how many jav-it.exes are running. You can always click on the minimized windows which should appear on taskbar. There should be info on what that instance jav-it is doing there. If your list is only 5 then I guess it downloads all at the same time.

Deleted 2 years ago
Developer

As far as I am aware, Patreon is still active. If your looking for the link, you can find it in your README.txt file.

thank you

"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. "

Does this mean all .ts files in the same  location as downloadlist.bat are checked or is the script checking files that were moved too? And does it matter if we renamed the files?

Everything inside the folder where the script is located. This include subfolders. It does not have access to anything outside the folder. As long as file is a .ts file then it is checked. Name does not matter.

Deleted 2 years ago